add two new Communicator options for applets

--activeIndicatorEnabled, applets can use it in order
to enable/disable the Latte Active Indicator for them
--parabolicEffectEnabled, applets can use it in order
to disable Parabolic Effect (zoom) for them
pull/4/head
Michail Vourlakos 6 years ago
parent 6fe73c40e1
commit 3908b668a3

@ -509,8 +509,9 @@ Item {
//! Active Indicator loader
Loader{
anchors.fill: parent
active: root.activeIndicator === Latte.Types.AllIndicator
|| (root.activeIndicator === Latte.Types.InternalsIndicator && communicator.overlayLatteIconIsActive)
active: (root.activeIndicator === Latte.Types.AllIndicator
|| (root.activeIndicator === Latte.Types.InternalsIndicator && communicator.overlayLatteIconIsActive))
&& communicator.activeIndicatorEnabled
sourceComponent: Item{
anchors.fill: parent
@ -594,7 +595,7 @@ Item {
id: appletMouseArea
anchors.fill: parent
enabled: applet && !latteApplet && canBeHovered && !root.editMode && !lockZoom
enabled: applet && !latteApplet && canBeHovered && !root.editMode && !lockZoom && communicator.parabolicEffectEnabled
hoverEnabled: !root.editMode && (!latteApplet) ? true : false
propagateComposedEvents: true
@ -602,7 +603,8 @@ Item {
//! only to support springloading for plasma 5.10
//! also on this is based the tooltips behavior by enabling it
//! plasma tooltips are disabled
visible: applet && !appletItem.latteApplet && !lockZoom && canBeHovered && !(appletItem.isSeparator && !root.editMode) //&& (root.zoomFactor>1)
visible: applet && !appletItem.latteApplet && !lockZoom && communicator.parabolicEffectEnabled
&& canBeHovered && !(appletItem.isSeparator && !root.editMode)
property bool blockWheel: false
property bool pressed: false
@ -613,7 +615,7 @@ Item {
}
onEntered: {
if (containsMouse && !appletItem.lockZoom && appletItem.canBeHovered){
if (containsMouse && !appletItem.lockZoom && communicator.parabolicEffectEnabled && appletItem.canBeHovered){
root.stopCheckRestoreZoomTimer();
}
@ -634,7 +636,7 @@ Item {
layoutsContainer.hoveredIndex = index;
}
if (lockZoom || !canBeHovered) {
if (lockZoom || !communicator.parabolicEffectEnabled || !canBeHovered) {
return;
}

@ -25,6 +25,10 @@ Item{
mainCommunicator.disableLatteSideColoring = value;
} else if (parameter === "disableLatteIconOverlay") {
mainCommunicator.disableLatteIconOverlay = value;
} else if (parameter === "activeIndicatorEnabled") {
mainCommunicator.activeIndicatorEnabled = value;
} else if (parameter === "parabolicEffectEnabled") {
mainCommunicator.parabolicEffectEnabled = value;
}
}
@ -33,6 +37,10 @@ Item{
return mainCommunicator.disableLatteSideColoring;
} else if (parameter === "disableLatteIconOverlay") {
return mainCommunicator.disableLatteIconOverlay;
} else if (parameter === "activeIndicatorEnabled") {
return mainCommunicator.activeIndicatorEnabled;
} else if (parameter === "parabolicEffectEnabled") {
return mainCommunicator.parabolicEffectEnabled;
}
return null;

@ -52,6 +52,8 @@ Item{
//! BEGIN OF PUBLIC PROPERTIES SET THROUGH LATTEBRIDGE.ACTIONS
property bool disableLatteSideColoring: false
property bool disableLatteIconOverlay: false
property bool activeIndicatorEnabled: true
property bool parabolicEffectEnabled: true
//! END OF PUBLIC PROPERTIES SET THROUGH LATTEBRIDGE.ACTIONS
//! BEGIN OF PROPERTY CHANGES

@ -79,6 +79,21 @@ Item{
// parabolic effect experience.
// @since: 0.9
// NAME: activeIndicatorEnabled
// TYPE: bool
// USAGE: writable through actions.setProperty
// EXPLANATION: when is TRUE, Latte can show its own Active Indicator
// when needed. For FALSE, the Latte Active Indicator is not drawn
// or used for that applet.
// @since: 0.9
// NAME: parabolicEffectEnabled
// TYPE: bool
// USAGE: writable through actions.setProperty
// EXPLANATION: when is TRUE, Latte can use Parabolic Effect in order
// to draw that applet. For FALSE, this applet is considered locked
// and can not be zoomed.
// @since: 0.9
//! Initialize

Loading…
Cancel
Save