mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
feat: Optimize capsule color computation by using Style.qml property
This commit is contained in:
@@ -78,7 +78,7 @@ Item {
|
||||
width: root.width
|
||||
height: pillHeight
|
||||
radius: halfPillHeight
|
||||
color: hovered ? Color.mHover : Settings.data.bar.showCapsule ? Qt.alpha(Color.mSurfaceVariant, Settings.data.bar.capsuleOpacity) : Color.transparent
|
||||
color: hovered ? Color.mHover : Style.capsuleColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
readonly property int halfPillHeight: Math.round(pillHeight * 0.5)
|
||||
|
||||
@@ -89,7 +89,7 @@ Item {
|
||||
width: buttonSize
|
||||
height: revealed ? (buttonSize + maxPillHeight - pillOverlap) : buttonSize
|
||||
radius: halfButtonSize
|
||||
color: hovered ? Color.mHover : Settings.data.bar.showCapsule ? Qt.alpha(Color.mSurfaceVariant, Settings.data.bar.capsuleOpacity) : Color.transparent
|
||||
color: hovered ? Color.mHover : Style.capsuleColor
|
||||
|
||||
readonly property int halfButtonSize: Math.round(buttonSize * 0.5)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user