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

fix #281,enable/disable auto decrease applets size

--the setting can be accessed through the tweaks page
This commit is contained in:
Michail Vourlakos
2017-03-19 12:23:17 +02:00
parent 4403c3d1e0
commit 799d995a10
4 changed files with 34 additions and 14 deletions

View File

@ -51,8 +51,8 @@
<entry name="blurEnabled" type="Bool">
<default>true</default>
</entry>
<entry name="automaticIconSize" type="Bool">
<default>false</default>
<entry name="autoDecreaseIconSize" type="Bool">
<default>true</default>
</entry>
<entry name="smallAutomaticIconJumps" type="Bool">
<default>true</default>

View File

@ -328,6 +328,14 @@ Window{
text: " ----------- "
}
Text{
text: "Icon Size (current)"+space
}
Text{
text: root.iconSize
}
Text{
text: "Icon Size (user)"+space
}
@ -345,21 +353,21 @@ Window{
}
Text{
text: "Icon Size (automatic)"+space
text: "Icon Size (auto decrease), Enabled"+space
}
Text{
text: root.autoDecreaseIconSize
}
Text{
text: "Icon Size (auto decrease)"+space
}
Text{
text: root.automaticIconSizeBasedSize
}
Text{
text: "Icon Size (current)"+space
}
Text{
text: root.iconSize
}
Text{
text: "Icon Margin (pixels)"+space
}

View File

@ -47,7 +47,7 @@ DragDrop.DropArea {
property bool globalDirectRender: false //it is used to check both the applet and the containment for direct render
property bool automaticSize: plasmoid.configuration.automaticIconSize
property bool autoDecreaseIconSize: plasmoid.configuration.autoDecreaseIconSize
property bool blurEnabled: plasmoid.configuration.blurEnabled
property bool confirmedDragEntered: false
property bool drawShadowsExternal: visibilityManager.panelIsBiggerFromIconSize && (zoomFactor === 1.0)
@ -83,8 +83,9 @@ DragDrop.DropArea {
//what is the highest icon size based on what icon size is used, screen calculated or user specified
property int maxIconSize: proportionIconSize!==-1 ? proportionIconSize : plasmoid.configuration.iconSize
property int iconSize: automaticIconSizeBasedSize > 0 ? Math.min(automaticIconSizeBasedSize, root.maxIconSize) :
root.maxIconSize
property int iconSize: automaticIconSizeBasedSize > 0 && autoDecreaseIconSize ?
Math.min(automaticIconSizeBasedSize, root.maxIconSize) :
root.maxIconSize
property int proportionIconSize: { //icon size based on screen height
if ((plasmoid.configuration.proportionIconSize===-1) || !dock)

View File

@ -89,6 +89,17 @@ PlasmaComponents.Page {
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Decrease applets size when it is needed")
checked: plasmoid.configuration.autoDecreaseIconSize
tooltip: i18n("Applets size is decreased automatically when the contents \nexceed the maximum length")
onClicked: {
plasmoid.configuration.autoDecreaseIconSize = checked;
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Behave as a normal dock window")