parent
94271ba42e
commit
c1d7bcb2b6
4 changed files with 84 additions and 33 deletions
modules/quickshell/config
|
@ -1,7 +1,5 @@
|
|||
import QtQuick
|
||||
|
||||
import "../../Config/Theme"
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
|
@ -12,8 +10,8 @@ Item {
|
|||
BottomRight
|
||||
}
|
||||
|
||||
property color color: theme.windowBg
|
||||
property int corner: RoundCorner.Corner.TopLeft // Default to TopLeft
|
||||
property color color: "black"
|
||||
property int corner: RoundCorner.Corner.TopLeft
|
||||
|
||||
property int size: 15
|
||||
|
||||
|
@ -24,11 +22,6 @@ Item {
|
|||
canvas.requestPaint();
|
||||
}
|
||||
|
||||
Theme {
|
||||
id: theme
|
||||
|
||||
}
|
||||
|
||||
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.namespace: "quickshell:screenCorners"
|
||||
color: "transparent"
|
||||
exclusionMode: ExclusionMode.Normal
|
||||
margins.bottom: -1
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
screen: modelData
|
||||
|
||||
mask: Region {
|
||||
item: null
|
||||
}
|
||||
|
||||
anchors {
|
||||
bottom: true
|
||||
left: 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 {
|
||||
|
|
|
@ -1,32 +1,13 @@
|
|||
import Quickshell
|
||||
import QtQuick
|
||||
|
||||
import "./Widgets/Bar"
|
||||
import "./Widgets/ScreenCorners"
|
||||
import "./Config/Theme"
|
||||
|
||||
ShellRoot {
|
||||
Theme {
|
||||
id: theme
|
||||
|
||||
Bar {
|
||||
}
|
||||
|
||||
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