use automatic icon size for behaveAsPlasmaPanel

--this way the panel can be shrinked because it
exceeds screen boundaries even when view is used
as a plasma panel
pull/9/head
Michail Vourlakos 5 years ago
parent ac11a3a2d7
commit eb564fdc7d

@ -70,6 +70,8 @@ Item{
//! is used from Panel in edit mode in order to provide correct masking //! is used from Panel in edit mode in order to provide correct masking
property int thicknessEditMode: thicknessNormalOriginalValue + editModeVisual.settingsThickness property int thicknessEditMode: thicknessNormalOriginalValue + editModeVisual.settingsThickness
//! when Latte behaves as Plasma panel
property int thicknessAsPanel: root.iconSize + root.thickMargins
//! is used to increase the mask thickness //! is used to increase the mask thickness
readonly property int marginBetweenContentsAndRuler: root.editMode ? 10 : 0 readonly property int marginBetweenContentsAndRuler: root.editMode ? 10 : 0
@ -104,7 +106,7 @@ Item{
property:"maxThickness" property:"maxThickness"
//! prevents updating window geometry during closing window in wayland and such fixes a crash //! prevents updating window geometry during closing window in wayland and such fixes a crash
when: latteView && !inTempHiding && !inForceHiding when: latteView && !inTempHiding && !inForceHiding
value: thicknessZoomOriginal value: root.behaveAsPlasmaPanel && !root.editMode ? thicknessAsPanel : thicknessZoomOriginal
} }
property bool validIconSize: (root.iconSize===root.maxIconSize || root.iconSize === root.automaticIconSizeBasedSize) property bool validIconSize: (root.iconSize===root.maxIconSize || root.iconSize === root.automaticIconSizeBasedSize)
@ -114,7 +116,7 @@ Item{
target: latteView target: latteView
property:"normalThickness" property:"normalThickness"
when: latteView && inPublishingState when: latteView && inPublishingState
value: thicknessNormalOriginal value: root.behaveAsPlasmaPanel && !root.editMode ? thicknessAsPanel : thicknessNormalOriginal
} }
Binding{ Binding{

Loading…
Cancel
Save