add isEnabled to parabolic Ability

pull/21/head
Michail Vourlakos 4 years ago
parent ee37bffb24
commit 88ea6e370e

@ -27,6 +27,7 @@ import org.kde.latte.core 0.2 as LatteCore
import "./privates" as Ability
Ability.ParabolicEffectPrivate {
isEnabled: factor.zoom>1 && !root.inConfigureAppletsMode
factor.zoom: LatteCore.WindowSystem.compositingActive && animations.active ? ( 1 + (plasmoid.configuration.zoomLevel / 20) ) : 1
factor.maxZoom: Math.max(factor.zoom, animations.requirements.zoomFactor)
restoreZoomIsBlocked: (view && view.contextMenuIsShown)

@ -34,7 +34,7 @@ Item{
property bool neighbourSeparator: rightSpacer ? appletItem.headAppletIsSeparator : appletItem.tailAppletIsSeparator
property int separatorSpace: neighbourSeparator && !appletItem.isSeparator && root.parabolicEffectEnabled
property int separatorSpace: neighbourSeparator && !appletItem.isSeparator && appletItem.parabolic.isEnabled
&& !appletItem.latteApplet ? ((LatteCore.Environment.separatorLength/2)+appletItem.metrics.margin.length) : subtrackedMargins
property real nHiddenSize: {

@ -40,7 +40,7 @@ Item{
return 0;
}
if (isSeparator && root.parabolicEffectEnabled) {
if (isSeparator && appletItem.parabolic.isEnabled) {
return -1;
}

@ -80,7 +80,7 @@ Item{
// USE CASE: it can be used from applets that want to be adjusted based
// on the parabolic Effect or not
// @since: 0.9
readonly property bool parabolicEffectEnabled: root.parabolicEffectEnabled && !appletItem.originalAppletBehavior
readonly property bool parabolicEffectEnabled: appletItem.parabolic.isEnabled && !appletItem.originalAppletBehavior
// NAME: iconSize
// USAGE: read-only

@ -220,7 +220,6 @@ Item {
true : false
readonly property bool inConfigureAppletsMode: root.editMode && plasmoid.configuration.inConfigureAppletsMode
readonly property bool parabolicEffectEnabled: parabolic.factor.zoom>1 && !inConfigureAppletsMode
property bool dockIsShownCompletely: !(dockIsHidden || inSlidingIn || inSlidingOut)
property bool closeActiveWindowEnabled: plasmoid.configuration.closeActiveWindowEnabled

@ -26,6 +26,7 @@ AbilityDefinition.ParabolicEffect {
property Item bridge: null
readonly property bool isActive: bridge !== null
isEnabled: ref.parabolic.isEnabled
factor: ref.parabolic.factor
restoreZoomIsBlocked: bridge ? (bridge.parabolic.host.restoreZoomIsBlocked || local.restoreZoomIsBlocked) : local.restoreZoomIsBlocked

@ -30,6 +30,7 @@ AbilityDefinition.ParabolicEffect {
//! This needs to be rethought and rechecked in order for public api to provide
//! functionality that functionality must already exist in the definition
readonly property Item publicApi: Item {
readonly property alias isEnabled: apis.isEnabled
readonly property alias directRenderingEnabled: apis.directRenderingEnabled
readonly property alias factor: apis.factor
readonly property alias lastIndex: apis.lastIndex

@ -22,9 +22,11 @@ import QtQuick 2.0
import "./paraboliceffect" as ParabolicEffectTypes
Item {
property ParabolicEffectTypes.Factor factor: ParabolicEffectTypes.Factor{}
property bool isEnabled: true
property bool restoreZoomIsBlocked: false
property ParabolicEffectTypes.Factor factor: ParabolicEffectTypes.Factor{}
readonly property ParabolicEffectTypes.PrivateProperties _privates: ParabolicEffectTypes.PrivateProperties {}
signal sglClearZoom();

@ -152,7 +152,6 @@ Item {
property bool dockIsHidden: latteView ? latteView.dockIsHidden : false
property bool groupTasksByDefault: plasmoid.configuration.groupTasksByDefault
property bool highlightWindows: hoverAction === LatteTasks.Types.HighlightWindows || hoverAction === LatteTasks.Types.PreviewAndHighlightWindows
property bool parabolicEffectEnabled: latteView ? latteView.parabolicEffectEnabled : parabolic.factor.zoom > 1 && !root.inEditMode
property bool scrollingEnabled: plasmoid.configuration.scrollTasksEnabled
property bool autoScrollTasksEnabled: scrollingEnabled && plasmoid.configuration.autoScrollTasksEnabled
@ -949,6 +948,7 @@ Item {
Ability.ParabolicEffect {
id: _parabolic
bridge: latteBridge
local.isEnabled: factor.zoom > 1
local.restoreZoomIsBlocked: root.contextMenu || windowsPreviewDlg.containsMouse
}

@ -45,7 +45,7 @@ Item{
//and it is used later on Behaviors in order to not break
//the activity change animations from removal/additions of tasks
//! && !root.inActivityChange (deprecated) in order to check if it is fixed
property int separatorSpace: neighbourSeparator && !isSeparator && root.parabolicEffectEnabled
property int separatorSpace: neighbourSeparator && !isSeparator && taskItem.parabolic.isEnabled
&& !(taskItem.indexer.separators.length>0 && root.dragSource) ?
((LatteCore.Environment.separatorLength/2)+taskItem.metrics.margin.length) : 0

@ -55,7 +55,7 @@ MouseArea{
if (root.vertical) {
return taskItem.metrics.totals.thickness + taskItem.metrics.margin.screenEdge;
} else {
if (root.dragSource || !root.parabolicEffectEnabled) {
if (root.dragSource || !taskItem.parabolic.isEnabled) {
return LatteCore.Environment.separatorLength+2*taskItem.metrics.margin.length;
}
}
@ -82,7 +82,7 @@ MouseArea{
if (!root.vertical) {
return taskItem.metrics.totals.thickness + taskItem.metrics.margin.screenEdge;
} else {
if (root.dragSource || !root.parabolicEffectEnabled) {
if (root.dragSource || !taskItem.parabolic.isEnabled) {
return LatteCore.Environment.separatorLength+2*taskItem.metrics.margin.length;
}
}

Loading…
Cancel
Save