Commit aca7fd38 authored by Krešimir Čohar's avatar Krešimir Čohar

[sddm-theme/lock screen] Improve appearance in software rendering mode (outlines and icons)

Summary: This patch improves the appearance of the sddm theme and the lock screen with software rendering in place (QT_QUICK_BACKEND=software) by adding an outline to the action buttons, correcting the error that prevented the username outline from appearing and by adding a background to the action buttons that are otherwise impossible to see on top of a very bright background in software rendering mode.

Test Plan:
Before (white background):
{F6673579}
After (white background):
{F6673580}
Before (Next):
{F6673581}
After (Next):
{F6673582}

Reviewers: #plasma, #vdg, ngraham, filipf

Reviewed By: #vdg, ngraham

Subscribers: plasma-devel

Tags: #plasma

Maniphest Tasks: T10325

Differential Revision: https://phabricator.kde.org/D19609
parent 28a6ef22
......@@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 2.2
import QtQuick 2.8
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
......@@ -30,6 +30,7 @@ Item {
property alias labelRendering: label.renderType
property alias circleOpacity: iconCircle.opacity
property alias circleVisiblity: iconCircle.visible
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
signal clicked
activeFocusOnTab: true
......@@ -53,8 +54,8 @@ Item {
width: iconSize + units.smallSpacing
height: width
radius: width / 2
color: PlasmaCore.ColorScope.textColor
opacity: activeFocus || containsMouse ? 0.15 : 0
color: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : PlasmaCore.ColorScope.textColor
opacity: activeFocus || containsMouse ? (softwareRendering ? 0.8 : 0.15) : (softwareRendering ? 0.6 : 0)
Behavior on opacity {
PropertyAnimation { // OpacityAnimator makes it turn black at random intervals
duration: units.longDuration * 3
......@@ -81,10 +82,12 @@ Item {
font.pointSize: theme.defaultFont.pointSize + 1
anchors {
top: icon.bottom
topMargin: units.smallSpacing
topMargin: (softwareRendering ? 1.5 : 1) * units.smallSpacing
left: parent.left
right: parent.right
}
style: softwareRendering ? Text.Outline : Text.Normal
styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignTop
wrapMode: Text.WordWrap
......
......@@ -168,7 +168,7 @@ Item {
width: constrainText ? parent.width : implicitWidth
text: wrapper.name
style: softwareRendering ? Text.Outline : Text.Normal
styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
//make an indication that this has active focus, this only happens when reached with keyboard navigation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment