forked from Shinonome/dots-hyprland
overlay: refractor widget background
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
import QtQuick
|
||||||
|
import qs.modules.common
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: contentItem
|
||||||
|
anchors.fill: parent
|
||||||
|
color: Appearance.m3colors.m3surfaceContainer
|
||||||
|
}
|
||||||
@@ -6,16 +6,15 @@ import Quickshell
|
|||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import qs.modules.common
|
import qs.modules.common
|
||||||
import qs.modules.common.widgets
|
import qs.modules.common.widgets
|
||||||
|
import qs.modules.ii.overlay
|
||||||
|
|
||||||
Rectangle {
|
OverlayBackground {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
enum State { Normal, Success, Error }
|
enum State { Normal, Success, Error }
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
property real padding: 16
|
property real padding: 16
|
||||||
property var currentState: FpsLimiterContent.State.Normal
|
property var currentState: FpsLimiterContent.State.Normal
|
||||||
color: Appearance.m3colors.m3surfaceContainer
|
|
||||||
implicitWidth: content.implicitWidth + (padding * 2)
|
implicitWidth: content.implicitWidth + (padding * 2)
|
||||||
implicitHeight: content.implicitHeight + (padding * 2)
|
implicitHeight: content.implicitHeight + (padding * 2)
|
||||||
|
|
||||||
|
|||||||
@@ -12,11 +12,9 @@ StyledOverlayWidget {
|
|||||||
minimumWidth: 310
|
minimumWidth: 310
|
||||||
minimumHeight: 130
|
minimumHeight: 130
|
||||||
|
|
||||||
contentItem: Rectangle {
|
contentItem: OverlayBackground {
|
||||||
id: contentItem
|
id: contentItem
|
||||||
anchors.fill: parent
|
|
||||||
radius: root.contentRadius
|
radius: root.contentRadius
|
||||||
color: Appearance.m3colors.m3surfaceContainer
|
|
||||||
property real padding: 8
|
property real padding: 8
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: contentColumn
|
id: contentColumn
|
||||||
|
|||||||
@@ -37,10 +37,8 @@ StyledOverlayWidget {
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
contentItem: Rectangle {
|
contentItem: OverlayBackground {
|
||||||
id: contentItem
|
id: contentItem
|
||||||
anchors.fill: parent
|
|
||||||
color: Appearance.m3colors.m3surfaceContainer
|
|
||||||
radius: root.contentRadius
|
radius: root.contentRadius
|
||||||
property real padding: 4
|
property real padding: 4
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|||||||
@@ -13,9 +13,7 @@ StyledOverlayWidget {
|
|||||||
minimumWidth: 300
|
minimumWidth: 300
|
||||||
minimumHeight: 380
|
minimumHeight: 380
|
||||||
|
|
||||||
contentItem: Rectangle {
|
contentItem: OverlayBackground {
|
||||||
anchors.fill: parent
|
|
||||||
color: Appearance.m3colors.m3surfaceContainer
|
|
||||||
radius: root.contentRadius
|
radius: root.contentRadius
|
||||||
property real padding: 6
|
property real padding: 6
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user