parent
94271ba42e
commit
c1d7bcb2b6
4 changed files with 84 additions and 33 deletions
modules/quickshell/config
|
@ -1,7 +1,5 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
import "../../Config/Theme"
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
@ -12,8 +10,8 @@ Item {
|
||||||
BottomRight
|
BottomRight
|
||||||
}
|
}
|
||||||
|
|
||||||
property color color: theme.windowBg
|
property color color: "black"
|
||||||
property int corner: RoundCorner.Corner.TopLeft // Default to TopLeft
|
property int corner: RoundCorner.Corner.TopLeft
|
||||||
|
|
||||||
property int size: 15
|
property int size: 15
|
||||||
|
|
||||||
|
@ -24,11 +22,6 @@ Item {
|
||||||
canvas.requestPaint();
|
canvas.requestPaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
Theme {
|
|
||||||
id: theme
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Canvas {
|
Canvas {
|
||||||
id: canvas
|
id: canvas
|
||||||
|
|
||||||
|
|
66
modules/quickshell/config/Widgets/Bar/Bar.qml
Normal file
66
modules/quickshell/config/Widgets/Bar/Bar.qml
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
import Quickshell
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
import "../../Components/RoundCorner"
|
||||||
|
import "../../Config/Theme"
|
||||||
|
|
||||||
|
PanelWindow {
|
||||||
|
id: toplevel
|
||||||
|
|
||||||
|
color: "transparent"
|
||||||
|
exclusiveZone: bar.height
|
||||||
|
|
||||||
|
Theme {
|
||||||
|
id: theme
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
left: true
|
||||||
|
right: true
|
||||||
|
top: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: bar
|
||||||
|
|
||||||
|
color: theme.windowBg
|
||||||
|
height: 30
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
color: theme.windowFg
|
||||||
|
text: "hello world"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
spacing: bar.width - leftCorner.width - rightCorner.width
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
top: bar.bottom
|
||||||
|
}
|
||||||
|
|
||||||
|
RoundCorner {
|
||||||
|
id: leftCorner
|
||||||
|
|
||||||
|
color: theme.windowBg
|
||||||
|
corner: RoundCorner.Corner.TopLeft
|
||||||
|
}
|
||||||
|
|
||||||
|
RoundCorner {
|
||||||
|
id: rightCorner
|
||||||
|
|
||||||
|
color: theme.windowBg
|
||||||
|
corner: RoundCorner.Corner.TopRight
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -19,18 +19,29 @@ Scope {
|
||||||
WlrLayershell.layer: WlrLayer.Overlay
|
WlrLayershell.layer: WlrLayer.Overlay
|
||||||
WlrLayershell.namespace: "quickshell:screenCorners"
|
WlrLayershell.namespace: "quickshell:screenCorners"
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
exclusionMode: ExclusionMode.Normal
|
exclusionMode: ExclusionMode.Ignore
|
||||||
margins.bottom: -1
|
|
||||||
screen: modelData
|
screen: modelData
|
||||||
|
|
||||||
mask: Region {
|
mask: Region {
|
||||||
item: null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
bottom: true
|
bottom: true
|
||||||
left: true
|
left: true
|
||||||
right: true
|
right: true
|
||||||
|
top: true
|
||||||
|
}
|
||||||
|
|
||||||
|
RoundCorner {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
corner: RoundCorner.Corner.TopLeft
|
||||||
|
}
|
||||||
|
|
||||||
|
RoundCorner {
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
corner: RoundCorner.Corner.TopRight
|
||||||
}
|
}
|
||||||
|
|
||||||
RoundCorner {
|
RoundCorner {
|
||||||
|
|
|
@ -1,32 +1,13 @@
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
|
import "./Widgets/Bar"
|
||||||
import "./Widgets/ScreenCorners"
|
import "./Widgets/ScreenCorners"
|
||||||
import "./Config/Theme"
|
|
||||||
|
|
||||||
ShellRoot {
|
ShellRoot {
|
||||||
Theme {
|
Bar {
|
||||||
id: theme
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenCorners {
|
ScreenCorners {
|
||||||
}
|
}
|
||||||
|
|
||||||
PanelWindow {
|
|
||||||
color: theme.windowBg
|
|
||||||
height: 30
|
|
||||||
|
|
||||||
anchors {
|
|
||||||
bottom: true
|
|
||||||
left: true
|
|
||||||
right: true
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
color: theme.windowFg
|
|
||||||
text: "hello world"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue