edge bar groups follow screen corner curvature
This commit is contained in:
parent
f65bd90bfd
commit
61b49a6aa8
2 changed files with 25 additions and 4 deletions
|
|
@ -127,6 +127,7 @@ PanelWindow {
|
|||
spacing: M.Theme.barSpacing
|
||||
|
||||
M.BarGroup {
|
||||
leftEdge: true
|
||||
M.Workspaces {
|
||||
bar: bar
|
||||
visible: M.Modules.workspaces.enable
|
||||
|
|
@ -214,6 +215,7 @@ PanelWindow {
|
|||
|
||||
// Power
|
||||
M.BarGroup {
|
||||
rightEdge: true
|
||||
M.Battery {}
|
||||
M.Power {
|
||||
bar: bar
|
||||
|
|
|
|||
|
|
@ -17,6 +17,13 @@ Item {
|
|||
return Math.max(0, Math.min(1, gx / scr.width));
|
||||
}
|
||||
property color borderColor: Qt.rgba(M.Theme.base0C.r + (M.Theme.base09.r - M.Theme.base0C.r) * _posFrac, M.Theme.base0C.g + (M.Theme.base09.g - M.Theme.base0C.g) * _posFrac, M.Theme.base0C.b + (M.Theme.base09.b - M.Theme.base0C.b) * _posFrac, 1)
|
||||
property bool leftEdge: false
|
||||
property bool rightEdge: false
|
||||
|
||||
readonly property real _tlr: leftEdge ? M.Theme.screenRadius : M.Theme.radius
|
||||
readonly property real _trr: rightEdge ? M.Theme.screenRadius : M.Theme.radius
|
||||
readonly property real _blr: M.Theme.radius
|
||||
readonly property real _brr: M.Theme.radius
|
||||
|
||||
visible: row.visibleChildren.length > 0
|
||||
|
||||
|
|
@ -32,7 +39,10 @@ Item {
|
|||
color: "transparent"
|
||||
border.color: root.borderColor
|
||||
border.width: 1
|
||||
radius: M.Theme.radius
|
||||
topLeftRadius: root._tlr
|
||||
topRightRadius: root._trr
|
||||
bottomLeftRadius: root._blr
|
||||
bottomRightRadius: root._brr
|
||||
visible: false
|
||||
}
|
||||
|
||||
|
|
@ -49,14 +59,20 @@ Item {
|
|||
// Solid background
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: M.Theme.radius
|
||||
topLeftRadius: root._tlr
|
||||
topRightRadius: root._trr
|
||||
bottomLeftRadius: root._blr
|
||||
bottomRightRadius: root._brr
|
||||
color: M.Theme.base01
|
||||
}
|
||||
|
||||
// Accent gradient overlay
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: M.Theme.radius
|
||||
topLeftRadius: root._tlr
|
||||
topRightRadius: root._trr
|
||||
bottomLeftRadius: root._blr
|
||||
bottomRightRadius: root._brr
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0
|
||||
|
|
@ -75,7 +91,10 @@ Item {
|
|||
color: "transparent"
|
||||
border.color: root.borderColor
|
||||
border.width: 1
|
||||
radius: M.Theme.radius
|
||||
topLeftRadius: root._tlr
|
||||
topRightRadius: root._trr
|
||||
bottomLeftRadius: root._blr
|
||||
bottomRightRadius: root._brr
|
||||
}
|
||||
|
||||
Row {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue