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:
@ -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>
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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")
|
||||
|
Reference in New Issue
Block a user