mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-26 23:21:37 +03:00
add Communicator::lengthMarginsEnabled for applets
--applets can now inform Latte if they want length margins or not
This commit is contained in:
parent
6fbb2d7d0d
commit
08f3855292
@ -35,7 +35,7 @@ Item{
|
||||
property int separatorSpace: neighbourSeparator && !appletItem.isSeparator && !appletItem.latteApplet && root.zoomFactor>1 ? (2+root.lengthMargin) : 0
|
||||
|
||||
property real nHiddenSize: {
|
||||
if (isSeparator || isSpacer) {
|
||||
if (isSeparator || !communicator.lengthMarginsEnabled) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ Item{
|
||||
root.thickMargins :
|
||||
(root.inFullJustify && atScreenEdge ? 0 : localLengthMargins) //Fitt's Law
|
||||
|
||||
property int localLengthMargins: isSpacer || isSeparator ? 0 : root.lengthMargins
|
||||
property int localLengthMargins: isSeparator || !communicator.lengthMarginsEnabled ? 0 : root.lengthMargins
|
||||
|
||||
property real scaledWidth: zoomScaleWidth * (layoutWidth + marginWidth)
|
||||
property real scaledHeight: zoomScaleHeight * (layoutHeight + marginHeight)
|
||||
|
@ -51,6 +51,14 @@ Item{
|
||||
// or used for that applet.
|
||||
// @since: 0.9
|
||||
|
||||
// NAME: lengthMarginsEnabled
|
||||
// TYPE: bool
|
||||
// USAGE: writable through actions.setProperty
|
||||
// EXPLANATION: when is TRUE, all length margins are drawn including
|
||||
// indicator padding and applets distance. For FALSE, length margins
|
||||
// are not drawn at all.
|
||||
// @since: 0.9
|
||||
|
||||
// NAME: parabolicEffectEnabled
|
||||
// TYPE: bool
|
||||
// USAGE: writable through actions.setProperty
|
||||
@ -74,6 +82,8 @@ Item{
|
||||
mainCommunicator.latteIconOverlayEnabled = value;
|
||||
} else if (parameter === "activeIndicatorEnabled") {
|
||||
mainCommunicator.activeIndicatorEnabled = value;
|
||||
} else if (parameter === "lengthMarginsEnabled") {
|
||||
mainCommunicator.lengthMarginsEnabled = value;
|
||||
} else if (parameter === "parabolicEffectLocked") {
|
||||
mainCommunicator.parabolicEffectLocked = value;
|
||||
} else if (parameter === "windowsTrackingEnabled") {
|
||||
@ -88,6 +98,8 @@ Item{
|
||||
return mainCommunicator.latteIconOverlayEnabled;
|
||||
} else if (parameter === "activeIndicatorEnabled") {
|
||||
return mainCommunicator.activeIndicatorEnabled;
|
||||
} else if (parameter === "lengthMarginsEnabled") {
|
||||
return mainCommunicator.lengthMarginsEnabled;
|
||||
} else if (parameter === "parabolicEffectLocked") {
|
||||
return mainCommunicator.parabolicEffectLocked;
|
||||
} else if (parameter === "windowsTrackingEnabled") {
|
||||
|
@ -53,6 +53,7 @@ Item{
|
||||
property bool latteSideColoringEnabled: true
|
||||
property bool latteIconOverlayEnabled: true
|
||||
property bool activeIndicatorEnabled: true
|
||||
property bool lengthMarginsEnabled: true
|
||||
property bool windowsTrackingEnabled: false
|
||||
property bool parabolicEffectLocked: false
|
||||
//! END OF PUBLIC PROPERTIES SET THROUGH LATTEBRIDGE.ACTIONS
|
||||
|
Loading…
Reference in New Issue
Block a user