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

fixes for separators

This commit is contained in:
Michail Vourlakos 2019-02-24 15:21:06 +02:00
parent 5a0948591e
commit c64df5a078
4 changed files with 30 additions and 11 deletions

View File

@ -8,8 +8,8 @@ Item {
readonly property bool horizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal readonly property bool horizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal
readonly property bool planar: plasmoid.formFactor === PlasmaCore.Types.Planar readonly property bool planar: plasmoid.formFactor === PlasmaCore.Types.Planar
Layout.fillWidth: horizontal ? false : true // Layout.fillWidth: horizontal ? false : true
Layout.fillHeight: horizontal ? true : false // Layout.fillHeight: horizontal ? true : false
Layout.minimumWidth: horizontal ? 5.0 : -1 Layout.minimumWidth: horizontal ? 5.0 : -1
Layout.maximumWidth: horizontal ? 5.0 : -1 Layout.maximumWidth: horizontal ? 5.0 : -1
Layout.minimumHeight: !horizontal ? 5.0 : -1 Layout.minimumHeight: !horizontal ? 5.0 : -1
@ -25,7 +25,22 @@ Item {
Plasmoid.removeAction( 'configure' ) Plasmoid.removeAction( 'configure' )
} }
PlasmaExtras.Heading { //BEGIN Latte Dock Communicator
property QtObject latteBridge: null // current Latte v0.9 API
onLatteBridgeChanged: {
if (latteBridge) {
//plasmoid.configuration.containmentType = 2; /*Latte containment with new API*/
latteBridge.actions.setProperty(plasmoid.id, "latteSideColoringEnabled", false);
}
}
//END Latte Dock Communicator
//BEGIN Latte based properties
readonly property bool enforceLattePalette: latteBridge && latteBridge.applyPalette && latteBridge.palette
readonly property bool latteInEditMode: latteBridge && latteBridge.inEditMode
//END Latte based properties
/* PlasmaExtras.Heading {
id: inf id: inf
level: 2 level: 2
text: i18n("For all your separation tasks") text: i18n("For all your separation tasks")
@ -36,15 +51,17 @@ Item {
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
visible: planar visible: planar
&& ( width > contentWidth && height > contentHeight ) && ( width > contentWidth && height > contentHeight )
} }*/
Rectangle { Rectangle {
id: sep id: sep
anchors.centerIn: parent
width: horizontal ? 1 : parent.width - 4 width: horizontal ? 1 : parent.width - 4
height: !horizontal ? 1 : parent.height - 4 height: !horizontal ? 1 : parent.height - 4
color: theme.textColor color: enforceLattePalette ? latteBridge.palette.textColor : theme.textColor
opacity: 0.5 opacity: 0.4
visible: !planar visible: !planar
} }
} }

View File

@ -38,7 +38,7 @@ Item{
return 0; return 0;
if (appletItem.isSeparator && !root.isVertical) { if (appletItem.isSeparator && !root.isVertical) {
return -1; return root.editMode ? 7 + root.lengthMargins : -1;
} }
//! width for applets that use fillWidth/fillHeight such plasma taskmanagers and AWC //! width for applets that use fillWidth/fillHeight such plasma taskmanagers and AWC
@ -69,7 +69,7 @@ Item{
return 0; return 0;
if (appletItem.isSeparator && root.isVertical) { if (appletItem.isSeparator && root.isVertical) {
return -1; return root.editMode ? 7 + root.lengthMargins : -1;
} }
//! height for applets that use fillWidth/fillHeight such plasma taskmanagers and AWC //! height for applets that use fillWidth/fillHeight such plasma taskmanagers and AWC

View File

@ -243,8 +243,10 @@ Item {
} }
} }
//END Latte Dock Communicator //END Latte Dock Communicator
//BEGIN Latte based properties
readonly property bool enforceLattePalette: latteBridge && latteBridge.applyPalette && latteBridge.palette
readonly property bool latteInEditMode: latteBridge && latteBridge.inEditMode
//END Latte based properties
Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation
Plasmoid.backgroundHints: PlasmaCore.Types.NoBackground Plasmoid.backgroundHints: PlasmaCore.Types.NoBackground

View File

@ -366,7 +366,7 @@ MouseArea{
width: root.vertical ? root.iconSize - 4 : 1 width: root.vertical ? root.iconSize - 4 : 1
height: !root.vertical ? root.iconSize - 4 : 1 height: !root.vertical ? root.iconSize - 4 : 1
color: theme.textColor color: enforceLattePalette ? latteBridge.palette.textColor : theme.textColor
} }
} }