Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions corners/components/PowerPanel.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import QtGraphicalEffects 1.15
import QtQuick.Effects
import QtQuick 2.15
import QtQuick.Controls 2.15

Expand Down Expand Up @@ -127,7 +127,7 @@ Item {

PropertyChanges {
target: iconOverlay
color: Qt.darker(config.PopupActiveColor, 1.2)
colorizationColor: Qt.darker(config.PopupActiveColor, 1.2)
}

PropertyChanges {
Expand Down Expand Up @@ -161,12 +161,14 @@ Item {
sourceSize: Qt.size(powerEntry.width * 0.5, powerEntry.height * 0.5)
}

ColorOverlay {
MultiEffect {
id: iconOverlay

anchors.fill: powerIcon
source: powerIcon
color: config.PopupColor
colorizationColor: config.PopupColor
colorization: 1.0
brightness: 1.0
}

Text {
Expand Down Expand Up @@ -196,7 +198,7 @@ Item {

transitions: Transition {
PropertyAnimation {
properties: "color, opacity"
properties: "color, opacity, colorizationColor"
duration: 150
}
}
Expand Down
3 changes: 1 addition & 2 deletions corners/components/UserFieldPanel.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import QtGraphicalEffects 1.12
import QtQuick 2.15
import QtQuick.Controls 2.15

Expand All @@ -22,7 +21,7 @@ TextField {
color: config.InputTextColor
selectionColor: config.InputTextColor
renderType: Text.NativeRendering

states: [
State {
name: "focused"
Expand Down
31 changes: 20 additions & 11 deletions corners/components/UserPanel.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import QtGraphicalEffects 1.12
import QtQuick.Effects
import QtQml.Models 2.15
import QtQuick 2.15
import QtQuick.Controls 2.15
Expand Down Expand Up @@ -217,28 +217,37 @@ Column {

Image {
id: userPicture

enabled: config.UserPictureEnabled === "true"
visible: config.UserPictureEnabled === "true"

source: ""
height: inputWidth / 1.5
width: inputWidth / 1.5
anchors.horizontalCenter: parent.horizontalCenter
fillMode: Image.PreserveAspectCrop
layer.enabled: true
visible: false // required for clipping the image... although it looks weird
}

Rectangle {
id: mask
Item {
id: mask
width: userPicture.width
height: userPicture.height
layer.enabled: true // required as maskSource for MultiEffect
visible: false

Rectangle {
anchors.fill: parent
radius: inputWidth / 3
visible: false
width: parent.width
height: parent.height
radius: width
color: "black" // need alpha channel = 1 for the clipped image to be opaque
}
}

layer.effect: OpacityMask {
maskSource: mask
}
MultiEffect {
source: userPicture
anchors.fill: userPicture
maskEnabled: true
maskSource: mask
}

Popup {
Expand Down