|
|
@ -33,17 +33,34 @@ import org.kde.latte 0.1 as Latte
|
|
|
|
Item{
|
|
|
|
Item{
|
|
|
|
id:barLine
|
|
|
|
id:barLine
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
width: root.isHorizontal ? panelWidth : smallSize
|
|
|
|
|
|
|
|
height: root.isVertical ? panelHeight : smallSize
|
|
|
|
|
|
|
|
|
|
|
|
opacity: root.useThemePanel ? 1 : 0
|
|
|
|
opacity: root.useThemePanel ? 1 : 0
|
|
|
|
|
|
|
|
|
|
|
|
property int panelWidth: root.drawShadowsExternal ? root.width :
|
|
|
|
property int panelWidth: {
|
|
|
|
(root.panelAlignment === Latte.Dock.Justify) && root.isHorizontal && !root.editMode ?
|
|
|
|
if (root.drawShadowsExternal) {
|
|
|
|
layoutsContainer.contentWidth + spacing : mainLayout.width + spacing
|
|
|
|
return root.width;
|
|
|
|
property int panelHeight: root.drawShadowsExternal ? root.height :
|
|
|
|
} else {
|
|
|
|
(root.panelAlignment === Latte.Dock.Justify) && root.isVertical && !root.editMode ?
|
|
|
|
if ((root.panelAlignment === Latte.Dock.Justify) && root.isHorizontal && !root.editMode) {
|
|
|
|
layoutsContainer.contentHeight + spacing : mainLayout.height + spacing
|
|
|
|
return root.maxLength;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return mainLayout.width + spacing;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
width: root.isHorizontal ? panelWidth : smallSize
|
|
|
|
property int panelHeight: {
|
|
|
|
height: root.isVertical ? panelHeight : smallSize
|
|
|
|
if (root.drawShadowsExternal) {
|
|
|
|
|
|
|
|
return root.height;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if ((root.panelAlignment === Latte.Dock.Justify) && root.isVertical && !root.editMode) {
|
|
|
|
|
|
|
|
return root.maxLength;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return mainLayout.height + spacing;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
property int spacing: (root.panelAlignment === Latte.Dock.Center
|
|
|
|
property int spacing: (root.panelAlignment === Latte.Dock.Center
|
|
|
|
|| plasmoid.configuration.panelPosition === Latte.Dock.Justify) ?
|
|
|
|
|| plasmoid.configuration.panelPosition === Latte.Dock.Justify) ?
|
|
|
@ -82,8 +99,8 @@ Item{
|
|
|
|
PlasmaCore.FrameSvgItem{
|
|
|
|
PlasmaCore.FrameSvgItem{
|
|
|
|
id: shadowsSvgItem
|
|
|
|
id: shadowsSvgItem
|
|
|
|
|
|
|
|
|
|
|
|
width: root.isVertical ? panelSize + marginsWidth : parent.width + marginsWidth
|
|
|
|
width: root.isVertical ? panelSize + marginsWidth : Math.min(parent.width + marginsWidth, root.width - marginsWidth)
|
|
|
|
height: root.isVertical ? parent.height + marginsHeight : panelSize + marginsHeight
|
|
|
|
height: root.isVertical ? Math.min(parent.height + marginsHeight, root.height - marginsHeight) : panelSize + marginsHeight
|
|
|
|
|
|
|
|
|
|
|
|
imagePath: root.drawShadowsExternal ? "" : "widgets/panel-background"
|
|
|
|
imagePath: root.drawShadowsExternal ? "" : "widgets/panel-background"
|
|
|
|
prefix: root.drawShadowsExternal ? "" : "shadow"
|
|
|
|
prefix: root.drawShadowsExternal ? "" : "shadow"
|
|
|
|