1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-08-15 21:49:28 +03:00

fix #248,option to shring thick margins to minimum

This commit is contained in:
Michail Vourlakos
2017-03-11 19:32:43 +02:00
parent ced4d67f55
commit 178874be64
4 changed files with 31 additions and 7 deletions

View File

@ -28,6 +28,9 @@
<entry name="iconSize" type="Int">
<default>64</default>
</entry>
<entry name="shrinkThickMargins" type="Bool">
<default>false</default>
</entry>
<entry name="proportionIconSize" type="Double">
<default>-1</default>
</entry>

View File

@ -61,6 +61,7 @@ DragDrop.DropArea {
: (layoutsContainer.hoveredIndex !== -1) //|| wholeArea.containsMouse
property bool normalState : false
property bool onlyAddingStarup: true //is used for the initialization phase in startup where there arent removals, this variable provides a way to grow icon size
property bool shrinkThickMargins: plasmoid.configuration.shrinkThickMargins
property bool solidPanel: plasmoid.configuration.solidPanel
//FIXME: possibly this is going to be the default behavior, this user choice
//has been dropped from the Dock Configuration Window
@ -115,8 +116,8 @@ DragDrop.DropArea {
//decouple iconMargin which now is used only for length calculations with thickMargins
//which are used for thickness calculations
property int thickMarginBase: Math.ceil(iconMargin/2)
property int thickMarginHigh: Math.ceil(iconMargin/2)
property int thickMarginBase: shrinkThickMargins ? 1 : Math.ceil(iconMargin/2)
property int thickMarginHigh: shrinkThickMargins ? 1 : Math.ceil(iconMargin/2)
property int thickMargin: thickMarginBase + thickMarginHigh
//it is used in order to not break the calculations for the thickness placement

View File

@ -151,7 +151,7 @@ PlasmaComponents.Page {
//! BEGIN: Tasks Filters
ColumnLayout {
spacing: units.smallSpacing
Header {
text: i18n("Filters")
}
@ -160,8 +160,8 @@ PlasmaComponents.Page {
id: showOnlyCurrentScreen
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from the current screen")
checked: plasmoid.configuration.showOnlyCurrentScreen
checked: plasmoid.configuration.showOnlyCurrentScreen
onClicked: {
plasmoid.configuration.showOnlyCurrentScreen = checked
}
@ -172,7 +172,7 @@ PlasmaComponents.Page {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from the current desktop")
checked: plasmoid.configuration.showOnlyCurrentDesktop
onClicked: {
plasmoid.configuration.showOnlyCurrentDesktop = checked
}
@ -183,7 +183,7 @@ PlasmaComponents.Page {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from the current activity")
checked: plasmoid.configuration.showOnlyCurrentActivity
onClicked: {
plasmoid.configuration.showOnlyCurrentActivity = checked
}

View File

@ -40,6 +40,26 @@ PlasmaComponents.Page {
anchors.centerIn: parent
Layout.leftMargin: units.smallSpacing * 2
//! BEGIN: Appearance
ColumnLayout {
spacing: units.smallSpacing
Header {
text: i18n("Appearance")
}
PlasmaComponents.CheckBox {
id: shrinkThickness
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Shrink thickness margins to minimum")
checked: plasmoid.configuration.shrinkThickMargins
onClicked: {
plasmoid.configuration.shrinkThickMargins = checked
}
}
}
//! BEGIN: Behavior
ColumnLayout {
spacing: units.smallSpacing