bar/activewindow: add option to invert rotate (#922)
* feat(activeWindow): Add rotation option to rotate counter-clockwise * feat(activeWindow): Change rotation to inverted boolean option * feat(activeWindow): Do not expose inverted property
This commit is contained in:
parent
8cd2fa2c03
commit
11282f6abe
3 changed files with 18 additions and 5 deletions
|
|
@ -399,6 +399,9 @@ default, you must create it manually.
|
||||||
"icon": "sports_esports"
|
"icon": "sports_esports"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"activeWindow": {
|
||||||
|
"inverted": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ JsonObject {
|
||||||
property ScrollActions scrollActions: ScrollActions {}
|
property ScrollActions scrollActions: ScrollActions {}
|
||||||
property Popouts popouts: Popouts {}
|
property Popouts popouts: Popouts {}
|
||||||
property Workspaces workspaces: Workspaces {}
|
property Workspaces workspaces: Workspaces {}
|
||||||
|
property ActiveWindow activeWindow: ActiveWindow {}
|
||||||
property Tray tray: Tray {}
|
property Tray tray: Tray {}
|
||||||
property Status status: Status {}
|
property Status status: Status {}
|
||||||
property Clock clock: Clock {}
|
property Clock clock: Clock {}
|
||||||
|
|
@ -78,6 +79,10 @@ JsonObject {
|
||||||
property list<var> specialWorkspaceIcons: []
|
property list<var> specialWorkspaceIcons: []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
component ActiveWindow: JsonObject {
|
||||||
|
property bool inverted: false
|
||||||
|
}
|
||||||
|
|
||||||
component Tray: JsonObject {
|
component Tray: JsonObject {
|
||||||
property bool background: false
|
property bool background: false
|
||||||
property bool recolour: false
|
property bool recolour: false
|
||||||
|
|
|
||||||
|
|
@ -79,11 +79,16 @@ Item {
|
||||||
color: root.colour
|
color: root.colour
|
||||||
opacity: root.current === this ? 1 : 0
|
opacity: root.current === this ? 1 : 0
|
||||||
|
|
||||||
transform: Rotation {
|
transform: [
|
||||||
angle: 90
|
Translate {
|
||||||
|
x: Config.bar.activeWindow.inverted ? -implicitWidth + text.implicitHeight : 0
|
||||||
|
},
|
||||||
|
Rotation {
|
||||||
|
angle: Config.bar.activeWindow.inverted ? 270 : 90
|
||||||
origin.x: text.implicitHeight / 2
|
origin.x: text.implicitHeight / 2
|
||||||
origin.y: text.implicitHeight / 2
|
origin.y: text.implicitHeight / 2
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
|
||||||
width: implicitHeight
|
width: implicitHeight
|
||||||
height: implicitWidth
|
height: implicitWidth
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue