mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-13 05:17:48 +03:00
improve appearance in Plasma panels/desktop
This commit is contained in:
parent
f8a3eeae66
commit
1a08a476ae
@ -25,14 +25,30 @@ import org.kde.latte.abilities.applets 0.1 as AppletAbility
|
||||
|
||||
AppletAbility.Metrics {
|
||||
//! Public Local Properties
|
||||
local.iconSize: Math.max(plasmoid.configuration.iconSize, 16)
|
||||
local.iconSize: {
|
||||
if (inPlasmaDesktop) {
|
||||
return maxIconSizeInPlasma;
|
||||
}
|
||||
|
||||
return panelThickness - 2*margin.thickness;
|
||||
}
|
||||
|
||||
local.backgroundThickness: totals.thickness
|
||||
|
||||
local.margin.length: 0.1 * iconSize
|
||||
local.margin.thickness: 0.16 * iconSize
|
||||
local.margin.thickness: {
|
||||
if (inPlasmaDesktop) {
|
||||
return 0.16 * iconSize;
|
||||
}
|
||||
|
||||
return Math.max(2, (panelThickness - maxIconSizeInPlasma) / 2);
|
||||
}
|
||||
local.margin.screenEdge: 0
|
||||
local.padding.length: 0.04 * iconSize
|
||||
|
||||
local.mask.thickness.normalForItems: totals.thickness
|
||||
local.mask.thickness.zoomedForItems: parabolic.factor.maxZoom * totals.thickness
|
||||
|
||||
readonly property int maxIconSizeInPlasma: Math.max(plasmoid.configuration.iconSize, 16)
|
||||
readonly property int panelThickness: (root.vertical ? root.width : root.height)
|
||||
}
|
||||
|
@ -26,8 +26,10 @@ import org.kde.latte.abilities.applets 0.1 as AppletAbility
|
||||
|
||||
AppletAbility.ParabolicEffect {
|
||||
id: parabolic
|
||||
local.factor.zoom: ( 1 + (plasmoid.configuration.zoomLevel / 20) )
|
||||
local.factor.maxZoom: Math.max(local.factor.zoom, 1.6)
|
||||
|
||||
isEnabled: !root.inPlasma || root.inPlasmaDesktop
|
||||
local.factor.zoom: isEnabled ? ( 1 + (plasmoid.configuration.zoomLevel / 20) ) : 1
|
||||
local.factor.maxZoom: isEnabled ? Math.max(local.factor.zoom, 1.6) : 1
|
||||
|
||||
readonly property bool horizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal
|
||||
|
||||
|
@ -66,7 +66,7 @@ Item {
|
||||
RowLayout{
|
||||
|
||||
Label {
|
||||
text: i18n("Icon size: ")
|
||||
text: i18n("Maximum icon size: ")
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
|
@ -232,7 +232,12 @@ Item {
|
||||
//BEGIN Latte Dock Communicator
|
||||
property QtObject latteBridge: null
|
||||
|
||||
readonly property bool inPlasmaPanel: latteBridge === null
|
||||
readonly property bool inPlasma: latteBridge === null
|
||||
readonly property bool inPlasmaDesktop: inPlasma && !inPlasmaPanel
|
||||
readonly property bool inPlasmaPanel: inPlasma && (plasmoid.location === PlasmaCore.Types.LeftEdge
|
||||
|| plasmoid.location === PlasmaCore.Types.RightEdge
|
||||
|| plasmoid.location === PlasmaCore.Types.BottomEdge
|
||||
|| plasmoid.location === PlasmaCore.Types.TopEdge)
|
||||
readonly property bool enforceLattePalette: latteBridge && latteBridge.applyPalette && latteBridge.palette
|
||||
readonly property bool latteInEditMode: latteBridge && latteBridge.inEditMode
|
||||
//END Latte Dock Communicator
|
||||
|
Loading…
Reference in New Issue
Block a user