plasmoid:access screenGeometry from MyView Ability

work/spdx
Michail Vourlakos 4 years ago
parent f09a6e0026
commit 173a3cf16b

@ -51,7 +51,7 @@ Ability.MyViewPrivate {
itemShadow.isEnabled: plasmoid.configuration.appletShadowsEnabled itemShadow.isEnabled: plasmoid.configuration.appletShadowsEnabled
itemShadow.size: itemShadow.isEnabled ? (0.5*metrics.iconSize) * (plasmoid.configuration.shadowSize/100) : 0 itemShadow.size: itemShadow.isEnabled ? (0.5*metrics.iconSize) * (plasmoid.configuration.shadowSize/100) : 0
itemShadow.shadowColor: "#" + myView.decimalToHex(appShadowOpacity) + myView.itemShadowOpacity itemShadow.shadowColor: "#" + myView.decimalToHex(itemShadowOpacity) + myView.itemShadowOpacity
itemShadow.shadowSolidColor: "#" + myView.itemShadowCurrentColor itemShadow.shadowSolidColor: "#" + myView.itemShadowCurrentColor
} }

@ -379,8 +379,6 @@ Item {
} }
property int tasksCount: latteApplet ? latteApplet.tasksCount : 0 property int tasksCount: latteApplet ? latteApplet.tasksCount : 0
property rect screenGeometry: latteView ? latteView.screenGeometry : plasmoid.screenGeometry
///END properties from latteApplet ///END properties from latteApplet

@ -193,9 +193,6 @@ Item {
property alias tasksCount: tasksModel.count property alias tasksCount: tasksModel.count
readonly property real screenGeometryHeightRatio: screenGeometry.height / screenGeometry.width
readonly property rect screenGeometry: latteView ? latteView.screenGeometry : plasmoid.screenGeometry
property Item latteView: null property Item latteView: null
//END Latte Dock Panel properties //END Latte Dock Panel properties
@ -526,7 +523,7 @@ Item {
id: tasksModel id: tasksModel
virtualDesktop: virtualDesktopInfo.currentDesktop virtualDesktop: virtualDesktopInfo.currentDesktop
screenGeometry: root.screenGeometry screenGeometry: appletAbilities.myView.screenGeometry
// comment in order to support LTS Plasma 5.8 // comment in order to support LTS Plasma 5.8
// screen: plasmoid.screen // screen: plasmoid.screen
activity: appletAbilities.myView.isReady ? appletAbilities.myView.lastUsedActivity : activityInfo.currentActivity activity: appletAbilities.myView.isReady ? appletAbilities.myView.lastUsedActivity : activityInfo.currentActivity

@ -176,10 +176,12 @@ Column {
width: header.width width: header.width
// similar to 0.5625 = 1 / (16:9) as most screens are // similar to 0.5625 = 1 / (16:9) as most screens are
// round necessary, otherwise shadow mask for players has gap! // round necessary, otherwise shadow mask for players has gap!
height: Math.round(root.screenGeometryHeightRatio * width) + (!winTitle.visible? Math.round(winTitle.height) : 0) + activeTaskLine.height height: Math.round(screenGeometryHeightRatio * width) + (!winTitle.visible? Math.round(winTitle.height) : 0) + activeTaskLine.height
visible: isWin visible: isWin
readonly property real screenGeometryHeightRatio: appletAbilities.myView.screenGeometry.height / appletAbilities.myView.screenGeometry.width
Item { Item {
id: thumbnailSourceItem id: thumbnailSourceItem
anchors.fill: parent anchors.fill: parent

@ -538,7 +538,7 @@ Item {
scaleFactor: taskItem.wrapper.mScale scaleFactor: taskItem.wrapper.mScale
panelOpacity: root.currentPanelOpacity panelOpacity: root.currentPanelOpacity
shadowColor: taskItem.abilities.myView.itemShadow.shadowColorSolid shadowColor: taskItem.abilities.myView.itemShadow.shadowSolidColor
progressVisible: wrapper.progressVisible /*since 0.9.2*/ progressVisible: wrapper.progressVisible /*since 0.9.2*/
progress: wrapper.progress /*since 0.9.2*/ progress: wrapper.progress /*since 0.9.2*/
@ -1040,16 +1040,16 @@ Item {
if (taskItem.abilities.myView.isHidden) { if (taskItem.abilities.myView.isHidden) {
if (root.location === PlasmaCore.Types.BottomEdge) { if (root.location === PlasmaCore.Types.BottomEdge) {
globalChoords.y = root.screenGeometry.y+root.screenGeometry.height-1; globalChoords.y = taskItem.abilities.myView.screenGeometry.y + taskItem.abilities.myView.screenGeometry.height-1;
globalChoords.height = 1; globalChoords.height = 1;
} else if (root.location === PlasmaCore.Types.TopEdge) { } else if (root.location === PlasmaCore.Types.TopEdge) {
globalChoords.y = root.screenGeometry.y+1; globalChoords.y = taskItem.abilities.myView.screenGeometry.y+1;
globalChoords.height = 1; globalChoords.height = 1;
} else if (root.location === PlasmaCore.Types.LeftEdge) { } else if (root.location === PlasmaCore.Types.LeftEdge) {
globalChoords.x = root.screenGeometry.x+1; globalChoords.x = taskItem.abilities.myView.screenGeometry.x+1;
globalChoords.width = 1; globalChoords.width = 1;
} else if (root.location === PlasmaCore.Types.RightEdge) { } else if (root.location === PlasmaCore.Types.RightEdge) {
globalChoords.x = root.screenGeometry.x+root.screenGeometry.width - 1; globalChoords.x = taskItem.abilities.myView.screenGeometry.x + taskItem.abilities.myView.screenGeometry.width - 1;
globalChoords.width = 1; globalChoords.width = 1;
} }
} }

@ -28,7 +28,7 @@ Item {
readonly property int gradientLength: appletAbilities.metrics.iconSize / 3 readonly property int gradientLength: appletAbilities.metrics.iconSize / 3
readonly property int thickness: appletAbilities.metrics.backgroundThickness readonly property int thickness: appletAbilities.metrics.backgroundThickness
readonly property color appliedColor: root.abilities.myView.itemShadow.shadowSolidColor readonly property color appliedColor: appletAbilities.myView.itemShadow.shadowSolidColor
property Item flickable property Item flickable

@ -169,7 +169,7 @@ Flickable{
var block = !root.autoScrollTasksEnabled && !duringDragging; var block = !root.autoScrollTasksEnabled && !duringDragging;
if (block || !contentsExceed || root.tasksCount < 3 if (block || !contentsExceed || root.tasksCount < 3
|| (task.itemIndex===task.abilities.indexer.lastVisibleItemIndex && appletAbilities.parabolic.factor.zoom>1)) { || (task.itemIndex === appletAbilities.indexer.lastVisibleItemIndex && appletAbilities.parabolic.factor.zoom>1)) {
//last task with parabolic effect breaks the autoscolling behavior //last task with parabolic effect breaks the autoscolling behavior
return; return;
} }

Loading…
Cancel
Save