mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-22 09:33:54 +03:00
introduce thickness margin influence option
This commit is contained in:
parent
b6a38e3830
commit
40b4851dac
@ -17,6 +17,7 @@ const bool Preferences::METAPRESSFORAPPLAUNCHER;
|
||||
const bool Preferences::METAHOLDFORBADGES;
|
||||
const int Preferences::PARABOLICSPREAD;
|
||||
const int Preferences::SCREENSDELAY;
|
||||
const float Preferences::THICKNESSMARGININFLUENCE = 1.0f;
|
||||
const Settings::MouseSensitivity Preferences::MOUSESENSITIVITY;
|
||||
|
||||
Preferences::Preferences()
|
||||
@ -34,6 +35,7 @@ Preferences::Preferences(Preferences &&o)
|
||||
metaHoldForBadges(o.metaHoldForBadges),
|
||||
mouseSensitivity(o.mouseSensitivity),
|
||||
parabolicSpread(o.parabolicSpread),
|
||||
thicknessMarginInfluence(o.thicknessMarginInfluence),
|
||||
screensDelay(o.screensDelay)
|
||||
{
|
||||
}
|
||||
@ -49,6 +51,7 @@ Preferences::Preferences(const Preferences &o)
|
||||
metaHoldForBadges(o.metaHoldForBadges),
|
||||
mouseSensitivity(o.mouseSensitivity),
|
||||
parabolicSpread(o.parabolicSpread),
|
||||
thicknessMarginInfluence(o.thicknessMarginInfluence),
|
||||
screensDelay(o.screensDelay)
|
||||
{
|
||||
}
|
||||
@ -65,6 +68,7 @@ Preferences &Preferences::operator=(const Preferences &rhs)
|
||||
metaHoldForBadges = rhs.metaHoldForBadges;
|
||||
mouseSensitivity = rhs.mouseSensitivity;
|
||||
parabolicSpread = rhs.parabolicSpread;
|
||||
thicknessMarginInfluence = rhs.thicknessMarginInfluence;
|
||||
screensDelay = rhs.screensDelay;
|
||||
|
||||
return (*this);
|
||||
@ -82,6 +86,7 @@ Preferences &Preferences::operator=(Preferences &&rhs)
|
||||
metaHoldForBadges = rhs.metaHoldForBadges;
|
||||
mouseSensitivity = rhs.mouseSensitivity;
|
||||
parabolicSpread = rhs.parabolicSpread;
|
||||
thicknessMarginInfluence = rhs.thicknessMarginInfluence;
|
||||
screensDelay = rhs.screensDelay;
|
||||
|
||||
return (*this);
|
||||
@ -99,6 +104,7 @@ bool Preferences::operator==(const Preferences &rhs) const
|
||||
&& (metaHoldForBadges == rhs.metaHoldForBadges)
|
||||
&& (mouseSensitivity == rhs.mouseSensitivity)
|
||||
&& (parabolicSpread == rhs.parabolicSpread)
|
||||
&& (thicknessMarginInfluence == rhs.thicknessMarginInfluence)
|
||||
&& (screensDelay == rhs.screensDelay);
|
||||
}
|
||||
|
||||
@ -119,6 +125,7 @@ bool Preferences::inDefaultValues() const
|
||||
&& (metaHoldForBadges == METAHOLDFORBADGES)
|
||||
&& (mouseSensitivity == MOUSESENSITIVITY)
|
||||
&& (parabolicSpread == PARABOLICSPREAD)
|
||||
&& (thicknessMarginInfluence == THICKNESSMARGININFLUENCE)
|
||||
&& (screensDelay == SCREENSDELAY);
|
||||
}
|
||||
|
||||
@ -134,6 +141,7 @@ void Preferences::setToDefaults()
|
||||
metaHoldForBadges = METAHOLDFORBADGES;
|
||||
mouseSensitivity = MOUSESENSITIVITY;
|
||||
parabolicSpread = PARABOLICSPREAD;
|
||||
thicknessMarginInfluence = THICKNESSMARGININFLUENCE;
|
||||
screensDelay = SCREENSDELAY;
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@ public:
|
||||
static const bool METAHOLDFORBADGES = true;
|
||||
static const int PARABOLICSPREAD = 3;
|
||||
static const int SCREENSDELAY = 2500;
|
||||
static const float THICKNESSMARGININFLUENCE;
|
||||
static const Settings::MouseSensitivity MOUSESENSITIVITY = Settings::HighMouseSensitivity;
|
||||
|
||||
Preferences();
|
||||
@ -44,6 +45,7 @@ public:
|
||||
bool metaHoldForBadges{METAHOLDFORBADGES};
|
||||
int parabolicSpread{PARABOLICSPREAD};
|
||||
int screensDelay{SCREENSDELAY};
|
||||
float thicknessMarginInfluence{THICKNESSMARGININFLUENCE};
|
||||
QStringList contextMenuAlwaysActions{Data::ContextMenu::ACTIONSALWAYSVISIBLE};
|
||||
Settings::MouseSensitivity mouseSensitivity{MOUSESENSITIVITY};
|
||||
|
||||
|
@ -533,59 +533,7 @@
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="preferencesGridLayout" columnstretch="5,9">
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="broadcastGeomChkBox">
|
||||
<property name="text">
|
||||
<string>Inform Plasma desktop for available desktop space</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="noBordersForMaximizedChkBox">
|
||||
<property name="toolTip">
|
||||
<string>Activate support for borderless maximized windows between different layouts</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Support borderless maximized windows in different layouts</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="17" column="0">
|
||||
<layout class="QHBoxLayout" name="plasmaThemeHeaderRowLayout"/>
|
||||
</item>
|
||||
<item row="14" column="1">
|
||||
<spacer name="verticalSpacer_14">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="16" column="1">
|
||||
<spacer name="verticalSpacer_11">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<layout class="QGridLayout" name="preferencesGridLayout" columnstretch="5,0">
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="infoWindowChkBox">
|
||||
<property name="toolTip">
|
||||
@ -596,39 +544,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="verticalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="17" column="1">
|
||||
<layout class="QHBoxLayout" name="plasmaThemeRowLayout"/>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QCheckBox" name="metaPressHoldChkBox">
|
||||
<property name="toolTip">
|
||||
<string>Press and hold ⌘ to show shortcuts badges for applets and tasks</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Press and Hold ⌘ to show shortcuts badges</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="0">
|
||||
<layout class="QHBoxLayout" name="screensHeaderRowLayout">
|
||||
<item row="10" column="0">
|
||||
<layout class="QHBoxLayout" name="parabolicHeaderRowLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -641,7 +560,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="screensLbl">
|
||||
<widget class="QLabel" name="parabolicEffectLbl">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
@ -649,7 +568,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Screens:</string>
|
||||
<string>Parabolic Effect:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
@ -658,59 +577,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QCheckBox" name="metaPressChkBox">
|
||||
<property name="toolTip">
|
||||
<string>Forward ⌘ press from KWin to Latte in order to activate Application Launcher. It is suggested to disable that option if you remove Latte.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Press ⌘ to activate Application Launcher</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QPushButton" name="contextMenuActionsBtn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Actions...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_11">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<item row="10" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QToolButton" name="smallParabolicBtn">
|
||||
@ -818,10 +685,143 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<layout class="QHBoxLayout" name="contextMenuRowLayout">
|
||||
<item row="20" column="0">
|
||||
<layout class="QHBoxLayout" name="plasmaThemeHeaderRowLayout"/>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<spacer name="verticalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="15" column="1">
|
||||
<spacer name="verticalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="autostartChkBox">
|
||||
<property name="toolTip">
|
||||
<string>Start the application automatically after each relogin</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable autostart during startup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="17" column="1">
|
||||
<spacer name="verticalSpacer_14">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QCheckBox" name="metaPressHoldChkBox">
|
||||
<property name="toolTip">
|
||||
<string>Press and hold ⌘ to show shortcuts badges for applets and tasks</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Press and Hold ⌘ to show shortcuts badges</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="badges3DStyleChkBox">
|
||||
<property name="text">
|
||||
<string>Use 3D style for notification and shortcut badges</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<layout class="QHBoxLayout" name="marginInfluenceRowLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_10">
|
||||
<widget class="QPushButton" name="noMarginInfluenceBtn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">0%</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="halfMarginInfluenceBtn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">50%</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="fullMarginInfluenceBtn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">100%</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="marginInfluenceLbl">
|
||||
<property name="text">
|
||||
<string notr="true">thickness margin influence</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_13">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -833,15 +833,15 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="contextMenuLbl">
|
||||
<property name="text">
|
||||
<string>Context Menu:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="broadcastGeomChkBox">
|
||||
<property name="text">
|
||||
<string>Inform Plasma desktop for available desktop space</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="behaviorHeaderRowLayout">
|
||||
<item>
|
||||
@ -875,124 +875,44 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<layout class="QHBoxLayout" name="mouseSensitivityRowLayout">
|
||||
<item row="2" column="1">
|
||||
<spacer name="verticalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="16" column="0">
|
||||
<layout class="QHBoxLayout" name="contextMenuRowLayout">
|
||||
<item>
|
||||
<widget class="QToolButton" name="lowSensitivityBtn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Low sensitivity for parabolic effect (low cpu usage and performance)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string comment="low sensitivity">Low</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="mediumSensitivityBtn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Medium sensitivity for parabolic effect (normal cpu usage and performance)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string comment="medium sensitivity">Medium</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="highSensitivityBtn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>High sensitivity for parabolic effect (high cpu usage and performance)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string comment="high sensitivity">High</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="mouseSensitivityLbl">
|
||||
<property name="text">
|
||||
<string>mouse sensitivity</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<spacer name="horizontalSpacer_10">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="contextMenuLbl">
|
||||
<property name="text">
|
||||
<string>Context Menu:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
@ -1022,7 +942,82 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="15" column="1">
|
||||
<item row="16" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QPushButton" name="contextMenuActionsBtn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Actions...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_11">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="18" column="0">
|
||||
<layout class="QHBoxLayout" name="screensHeaderRowLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="screensLbl">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Screens:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="18" column="1">
|
||||
<layout class="QHBoxLayout" name="screenDelayRowLayout">
|
||||
<item>
|
||||
<widget class="QSpinBox" name="screenTrackerSpinBox">
|
||||
@ -1106,85 +1101,13 @@ This tracker is used in order to not lose any screen related update.</string>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<layout class="QHBoxLayout" name="parabolicHeaderRowLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="parabolicEffectLbl">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Parabolic Effect:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<spacer name="verticalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="badges3DStyleChkBox">
|
||||
<property name="text">
|
||||
<string>Use 3D style for notification and shortcut badges</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<spacer name="verticalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="autostartChkBox">
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="noBordersForMaximizedChkBox">
|
||||
<property name="toolTip">
|
||||
<string>Start the application automatically after each relogin</string>
|
||||
<string>Activate support for borderless maximized windows between different layouts</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable autostart during startup</string>
|
||||
<string>Support borderless maximized windows in different layouts</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -1215,8 +1138,8 @@ This tracker is used in order to not lose any screen related update.</string>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<spacer name="verticalSpacer_9">
|
||||
<item row="9" column="1">
|
||||
<spacer name="verticalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
@ -1231,6 +1154,35 @@ This tracker is used in order to not lose any screen related update.</string>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="20" column="1">
|
||||
<layout class="QHBoxLayout" name="plasmaThemeRowLayout"/>
|
||||
</item>
|
||||
<item row="19" column="1">
|
||||
<spacer name="verticalSpacer_11">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QCheckBox" name="metaPressChkBox">
|
||||
<property name="toolTip">
|
||||
<string>Forward ⌘ press from KWin to Latte in order to activate Application Launcher. It is suggested to disable that option if you remove Latte.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Press ⌘ to activate Application Launcher</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -34,30 +34,26 @@ TabPreferences::TabPreferences(Latte::Settings::Dialog::SettingsDialog *parent)
|
||||
void TabPreferences::initUi()
|
||||
{
|
||||
//! exclusive groups
|
||||
m_mouseSensitivityButtons = new QButtonGroup(this);
|
||||
m_mouseSensitivityButtons->addButton(m_ui->lowSensitivityBtn, Latte::Settings::LowMouseSensitivity);
|
||||
m_mouseSensitivityButtons->addButton(m_ui->mediumSensitivityBtn, Latte::Settings::MediumMouseSensitivity);
|
||||
m_mouseSensitivityButtons->addButton(m_ui->highSensitivityBtn, Latte::Settings::HighMouseSensitivity);
|
||||
m_mouseSensitivityButtons->setExclusive(true);
|
||||
|
||||
m_parabolicSpreadButtons = new QButtonGroup(this);
|
||||
m_parabolicSpreadButtons->addButton(m_ui->smallParabolicBtn, Data::Preferences::PARABOLICSPREAD);
|
||||
m_parabolicSpreadButtons->addButton(m_ui->mediumParabolicBtn, 5);
|
||||
m_parabolicSpreadButtons->addButton(m_ui->largeParabolicBtn, 7);
|
||||
m_parabolicSpreadButtons->setExclusive(true);
|
||||
|
||||
m_thicknessMarginInfluenceButtons = new QButtonGroup(this);
|
||||
m_thicknessMarginInfluenceButtons->addButton(m_ui->noMarginInfluenceBtn, 0); // 0%
|
||||
m_thicknessMarginInfluenceButtons->addButton(m_ui->halfMarginInfluenceBtn, 50); // 50%
|
||||
m_thicknessMarginInfluenceButtons->addButton(m_ui->fullMarginInfluenceBtn, 100); // 100%
|
||||
m_thicknessMarginInfluenceButtons->setExclusive(true);
|
||||
|
||||
m_ui->noMarginInfluenceBtn->setText(i18nc("number in percentage, e.g. 85%","%1%").arg(0));
|
||||
m_ui->halfMarginInfluenceBtn->setText(i18nc("number in percentage, e.g. 85%","%1%").arg(50));
|
||||
m_ui->fullMarginInfluenceBtn->setText(i18nc("number in percentage, e.g. 85%","%1%").arg(100));
|
||||
|
||||
//! Buttons
|
||||
connect(m_ui->contextMenuActionsBtn, &QPushButton::clicked, this, &TabPreferences::onActionsBtnPressed);
|
||||
|
||||
//! signals
|
||||
connect(m_mouseSensitivityButtons, static_cast<void(QButtonGroup::*)(int, bool)>(&QButtonGroup::buttonToggled),
|
||||
[ = ](int id, bool checked) {
|
||||
if (checked) {
|
||||
m_preferences.mouseSensitivity = static_cast<Latte::Settings::MouseSensitivity>(id);
|
||||
emit dataChanged();
|
||||
}
|
||||
});
|
||||
|
||||
connect(m_parabolicSpreadButtons, static_cast<void(QButtonGroup::*)(int, bool)>(&QButtonGroup::buttonToggled),
|
||||
[ = ](int id, bool checked) {
|
||||
if (checked) {
|
||||
@ -66,6 +62,14 @@ void TabPreferences::initUi()
|
||||
}
|
||||
});
|
||||
|
||||
connect(m_thicknessMarginInfluenceButtons, static_cast<void(QButtonGroup::*)(int, bool)>(&QButtonGroup::buttonToggled),
|
||||
[ = ](int id, bool checked) {
|
||||
if (checked) {
|
||||
m_preferences.thicknessMarginInfluence = (id / 100.0f);
|
||||
emit dataChanged();
|
||||
}
|
||||
});
|
||||
|
||||
connect(m_ui->screenTrackerSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), [ = ](int i) {
|
||||
m_preferences.screensDelay = m_ui->screenTrackerSpinBox->value();
|
||||
emit dataChanged();
|
||||
@ -124,8 +128,8 @@ void TabPreferences::initSettings()
|
||||
o_preferences.metaPressForAppLauncher = m_corona->universalSettings()->kwin_metaForwardedToLatte();
|
||||
o_preferences.metaHoldForBadges = m_corona->universalSettings()->metaPressAndHoldEnabled();
|
||||
o_preferences.borderlessMaximized = m_corona->universalSettings()->canDisableBorders();
|
||||
o_preferences.mouseSensitivity = m_corona->universalSettings()->sensitivity();
|
||||
o_preferences.parabolicSpread = m_corona->universalSettings()->parabolicSpread();
|
||||
o_preferences.thicknessMarginInfluence = m_corona->universalSettings()->thicknessMarginInfluence();
|
||||
o_preferences.screensDelay = m_corona->universalSettings()->screenTrackerInterval();
|
||||
|
||||
m_preferences = o_preferences;
|
||||
@ -160,14 +164,6 @@ void TabPreferences::updateUi()
|
||||
m_ui->noBordersForMaximizedChkBox->setChecked(m_preferences.borderlessMaximized);
|
||||
m_ui->screenTrackerSpinBox->setValue(m_preferences.screensDelay);
|
||||
|
||||
if (m_preferences.mouseSensitivity == Settings::LowMouseSensitivity) {
|
||||
m_ui->lowSensitivityBtn->setChecked(true);
|
||||
} else if (m_preferences.mouseSensitivity == Settings::MediumMouseSensitivity) {
|
||||
m_ui->mediumSensitivityBtn->setChecked(true);
|
||||
} else if (m_preferences.mouseSensitivity == Settings::HighMouseSensitivity) {
|
||||
m_ui->highSensitivityBtn->setChecked(true);
|
||||
}
|
||||
|
||||
if (m_preferences.parabolicSpread == Data::Preferences::PARABOLICSPREAD) {
|
||||
m_ui->smallParabolicBtn->setChecked(true);
|
||||
} else if (m_preferences.parabolicSpread == 5) {
|
||||
@ -176,6 +172,14 @@ void TabPreferences::updateUi()
|
||||
m_ui->largeParabolicBtn->setChecked(true);
|
||||
}
|
||||
|
||||
if (m_preferences.thicknessMarginInfluence == 0.0f) {
|
||||
m_ui->noMarginInfluenceBtn->setChecked(true);
|
||||
} else if (m_preferences.thicknessMarginInfluence == 0.5f) {
|
||||
m_ui->halfMarginInfluenceBtn->setChecked(true);
|
||||
} else if (m_preferences.thicknessMarginInfluence == Data::Preferences::THICKNESSMARGININFLUENCE) {
|
||||
m_ui->fullMarginInfluenceBtn->setChecked(true);
|
||||
}
|
||||
|
||||
emit dataChanged();
|
||||
}
|
||||
|
||||
@ -209,7 +213,6 @@ void TabPreferences::resetDefaults()
|
||||
|
||||
void TabPreferences::save()
|
||||
{
|
||||
m_corona->universalSettings()->setSensitivity(m_preferences.mouseSensitivity);
|
||||
m_corona->universalSettings()->setAutostart(m_preferences.autostart);
|
||||
m_corona->universalSettings()->setBadges3DStyle(m_preferences.badgeStyle3D);
|
||||
m_corona->universalSettings()->setContextMenuActionsAlwaysShown(m_preferences.contextMenuAlwaysActions);
|
||||
@ -219,6 +222,7 @@ void TabPreferences::save()
|
||||
m_corona->universalSettings()->setShowInfoWindow(m_preferences.layoutsInformationWindow);
|
||||
m_corona->universalSettings()->setCanDisableBorders(m_preferences.borderlessMaximized);
|
||||
m_corona->universalSettings()->setParabolicSpread(m_preferences.parabolicSpread);
|
||||
m_corona->universalSettings()->setThicknessMarginInfluence(m_preferences.thicknessMarginInfluence);
|
||||
m_corona->universalSettings()->setScreenTrackerInterval(m_preferences.screensDelay);
|
||||
|
||||
o_preferences = m_preferences;
|
||||
|
@ -69,8 +69,8 @@ private:
|
||||
Ui::SettingsDialog *m_ui{nullptr};
|
||||
Latte::Corona *m_corona{nullptr};
|
||||
|
||||
QButtonGroup *m_mouseSensitivityButtons;
|
||||
QButtonGroup *m_parabolicSpreadButtons;
|
||||
QButtonGroup *m_thicknessMarginInfluenceButtons;
|
||||
|
||||
//! current data
|
||||
Data::Preferences m_preferences;
|
||||
|
@ -55,6 +55,7 @@ UniversalSettings::UniversalSettings(KSharedConfig::Ptr config, QObject *parent)
|
||||
connect(this, &UniversalSettings::screenTrackerIntervalChanged, this, &UniversalSettings::saveConfig);
|
||||
connect(this, &UniversalSettings::showInfoWindowChanged, this, &UniversalSettings::saveConfig);
|
||||
connect(this, &UniversalSettings::singleModeLayoutNameChanged, this, &UniversalSettings::saveConfig);
|
||||
connect(this, &UniversalSettings::thicknessMarginInfluenceChanged, this, &UniversalSettings::saveConfig);
|
||||
connect(this, &UniversalSettings::versionChanged, this, &UniversalSettings::saveConfig);
|
||||
|
||||
connect(this, &UniversalSettings::screenScalesChanged, this, &UniversalSettings::saveScalesConfig);
|
||||
@ -209,6 +210,21 @@ void UniversalSettings::setParabolicSpread(const int &spread)
|
||||
emit parabolicSpreadChanged();
|
||||
}
|
||||
|
||||
float UniversalSettings::thicknessMarginInfluence() const
|
||||
{
|
||||
return m_thicknessMarginInfluence;
|
||||
}
|
||||
|
||||
void UniversalSettings::setThicknessMarginInfluence(const float &influence)
|
||||
{
|
||||
if (m_thicknessMarginInfluence == influence) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_thicknessMarginInfluence = influence;
|
||||
emit thicknessMarginInfluenceChanged();
|
||||
}
|
||||
|
||||
QString UniversalSettings::singleModeLayoutName() const
|
||||
{
|
||||
return m_singleModeLayoutName;
|
||||
@ -450,7 +466,9 @@ void UniversalSettings::setLayoutsMemoryUsage(MemoryUsage::LayoutsMemory layouts
|
||||
|
||||
Settings::MouseSensitivity UniversalSettings::sensitivity()
|
||||
{
|
||||
return m_sensitivity;
|
||||
//! return always default option as the users have not shown any interest in that option
|
||||
return Latte::Settings::HighMouseSensitivity;
|
||||
// return m_sensitivity;
|
||||
}
|
||||
|
||||
void UniversalSettings::setSensitivity(Settings::MouseSensitivity sense)
|
||||
@ -460,7 +478,7 @@ void UniversalSettings::setSensitivity(Settings::MouseSensitivity sense)
|
||||
}
|
||||
|
||||
m_sensitivity = sense;
|
||||
emit sensitivityChanged();
|
||||
// emit sensitivityChanged();
|
||||
}
|
||||
|
||||
float UniversalSettings::screenWidthScale(QString screenName) const
|
||||
@ -544,8 +562,9 @@ void UniversalSettings::loadConfig()
|
||||
m_showInfoWindow = m_universalGroup.readEntry("showInfoWindow", true);
|
||||
m_singleModeLayoutName = m_universalGroup.readEntry("singleModeLayoutName", QString());
|
||||
m_parabolicSpread = m_universalGroup.readEntry("parabolicSpread", Data::Preferences::PARABOLICSPREAD);
|
||||
m_thicknessMarginInfluence = m_universalGroup.readEntry("parabolicThicknessMarginInfluence", Data::Preferences::THICKNESSMARGININFLUENCE);
|
||||
m_memoryUsage = static_cast<MemoryUsage::LayoutsMemory>(m_universalGroup.readEntry("memoryUsage", (int)MemoryUsage::SingleLayout));
|
||||
m_sensitivity = static_cast<Settings::MouseSensitivity>(m_universalGroup.readEntry("mouseSensitivity", (int)Settings::HighMouseSensitivity));
|
||||
//m_sensitivity = static_cast<Settings::MouseSensitivity>(m_universalGroup.readEntry("mouseSensitivity", (int)Settings::HighMouseSensitivity));
|
||||
|
||||
loadScalesConfig();
|
||||
|
||||
@ -568,8 +587,9 @@ void UniversalSettings::saveConfig()
|
||||
m_universalGroup.writeEntry("showInfoWindow", m_showInfoWindow);
|
||||
m_universalGroup.writeEntry("singleModeLayoutName", m_singleModeLayoutName);
|
||||
m_universalGroup.writeEntry("parabolicSpread", m_parabolicSpread);
|
||||
m_universalGroup.writeEntry("parabolicThicknessMarginInfluence", m_thicknessMarginInfluence);
|
||||
m_universalGroup.writeEntry("memoryUsage", (int)m_memoryUsage);
|
||||
m_universalGroup.writeEntry("mouseSensitivity", (int)m_sensitivity);
|
||||
//m_universalGroup.writeEntry("mouseSensitivity", (int)m_sensitivity);
|
||||
syncSettings();
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,7 @@ class UniversalSettings : public QObject
|
||||
Q_PROPERTY(bool showInfoWindow READ showInfoWindow WRITE setShowInfoWindow NOTIFY showInfoWindowChanged)
|
||||
|
||||
Q_PROPERTY(int parabolicSpread READ parabolicSpread WRITE setParabolicSpread NOTIFY parabolicSpreadChanged)
|
||||
Q_PROPERTY(float thicknessMarginInfluence READ thicknessMarginInfluence WRITE setThicknessMarginInfluence NOTIFY thicknessMarginInfluenceChanged)
|
||||
|
||||
Q_PROPERTY(QString singleModeLayoutName READ singleModeLayoutName WRITE setSingleModeLayoutName NOTIFY singleModeLayoutNameChanged)
|
||||
|
||||
@ -103,6 +104,9 @@ public:
|
||||
int screenTrackerInterval() const;
|
||||
void setScreenTrackerInterval(int duration);
|
||||
|
||||
float thicknessMarginInfluence() const;
|
||||
void setThicknessMarginInfluence(const float &influence);
|
||||
|
||||
QString singleModeLayoutName() const;
|
||||
void setSingleModeLayoutName(QString layoutName);
|
||||
|
||||
@ -151,6 +155,7 @@ signals:
|
||||
void screenTrackerIntervalChanged();
|
||||
void showInfoWindowChanged();
|
||||
void singleModeLayoutNameChanged();
|
||||
void thicknessMarginInfluenceChanged();
|
||||
void versionChanged();
|
||||
|
||||
private slots:
|
||||
@ -190,6 +195,7 @@ private:
|
||||
|
||||
int m_screenTrackerInterval{2500};
|
||||
int m_parabolicSpread{Data::Preferences::PARABOLICSPREAD};
|
||||
float m_thicknessMarginInfluence{Data::Preferences::THICKNESSMARGININFLUENCE};
|
||||
|
||||
QString m_singleModeLayoutName;
|
||||
|
||||
|
@ -24,7 +24,7 @@ Ability.ParabolicEffectPrivate {
|
||||
return (maxSize/metrics.iconSize);
|
||||
}
|
||||
factor.maxZoom: Math.max(factor.zoom, animations.requirements.zoomFactor)
|
||||
factor.marginThicknessZoomInPercentage: 1.0 //100%
|
||||
factor.marginThicknessZoomInPercentage: settings ? settings.thicknessMarginInfluence : 1.0 //100%
|
||||
restoreZoomIsBlocked: restoreZoomIsBlockedFromApplet || (view && view.contextMenuIsShown)
|
||||
spread: settings ? settings.parabolicSpread : 3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user