[PATCH] [RFC] make handles obscure less of the screen behind them

Dirk Hohndel dirk at hohndel.org
Sun Feb 14 05:36:31 UTC 2016


I don't think this is the right way to do this. The patch below is the
hack that I used for the last few Subsurface-mobile alpha builds to give
people the idea that the handles really shouldn't be so visually dominant.

So the background is even more transparent and instead of filling the path
we just stroke it.

/D


>From 8a68beef83ab7b4412fad9eec213470138ab3946 Mon Sep 17 00:00:00 2001
From: Dirk Hohndel <dirk at hohndel.org>
Date: Fri, 12 Feb 2016 10:01:05 -0800
Subject: [PATCH 1/3] Make handles obscure less of the screen behind them

Signed-off-by: Dirk Hohndel <dirk at hohndel.org>
---
 components/mobilecomponents/qml/OverlayDrawer.qml             | 3 ++-
 components/mobilecomponents/qml/private/ActionButtonArrow.qml | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/components/mobilecomponents/qml/OverlayDrawer.qml b/components/mobilecomponents/qml/OverlayDrawer.qml
index 1c0efdc7f7e7..d1d592beb10b 100644
--- a/components/mobilecomponents/qml/OverlayDrawer.qml
+++ b/components/mobilecomponents/qml/OverlayDrawer.qml
@@ -373,7 +373,7 @@ AbstractDrawer {
                     height: width
                     Rectangle {
                         color: Theme.viewBackgroundColor
-                        opacity: 0.5 + root.position
+                        opacity: 0.3 + root.position
                         anchors {
                             fill: parent
                             topMargin: Units.gridUnit
@@ -381,6 +381,7 @@ AbstractDrawer {
                             leftMargin: root.edge == Qt.LeftEdge ? 0 : Units.gridUnit
                         }
                         ActionButtonArrow {
+                            opacity: 1.0
                             anchors.centerIn: parent
                             color: handleMouseArea.pressed || root.position != 0 ? Theme.highlightColor : Theme.textColor
                             inverted: root.edge == Qt.RightEdge
diff --git a/components/mobilecomponents/qml/private/ActionButtonArrow.qml b/components/mobilecomponents/qml/private/ActionButtonArrow.qml
index 7b585452bcae..c654de0ff323 100644
--- a/components/mobilecomponents/qml/private/ActionButtonArrow.qml
+++ b/components/mobilecomponents/qml/private/ActionButtonArrow.qml
@@ -34,7 +34,7 @@ Canvas {
 
     onPaint: {
         var ctx = canvas.getContext("2d");
-        ctx.fillStyle = canvas.color;
+        ctx.strokeStyle = canvas.color;
         ctx.beginPath();
         if (inverted) {
             ctx.moveTo(canvas.width, 0);
@@ -50,7 +50,8 @@ Canvas {
             ctx.lineTo(canvas.width, canvas.height/2);
             //ctx.lineTo(0, canvas.height);
         }
-        ctx.fill();
+        ctx.closePath();
+        ctx.stroke();
     }
 }
 
-- 
2.7.0



More information about the Plasma-devel mailing list