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 qs.modules.common
|
||||
import qs.modules.common.widgets
|
||||
import qs.modules.ii.overlay
|
||||
|
||||
Rectangle {
|
||||
OverlayBackground {
|
||||
id: root
|
||||
|
||||
enum State { Normal, Success, Error }
|
||||
|
||||
anchors.fill: parent
|
||||
property real padding: 16
|
||||
property var currentState: FpsLimiterContent.State.Normal
|
||||
color: Appearance.m3colors.m3surfaceContainer
|
||||
implicitWidth: content.implicitWidth + (padding * 2)
|
||||
implicitHeight: content.implicitHeight + (padding * 2)
|
||||
|
||||
|
||||
@@ -12,11 +12,9 @@ StyledOverlayWidget {
|
||||
minimumWidth: 310
|
||||
minimumHeight: 130
|
||||
|
||||
contentItem: Rectangle {
|
||||
contentItem: OverlayBackground {
|
||||
id: contentItem
|
||||
anchors.fill: parent
|
||||
radius: root.contentRadius
|
||||
color: Appearance.m3colors.m3surfaceContainer
|
||||
property real padding: 8
|
||||
ColumnLayout {
|
||||
id: contentColumn
|
||||
|
||||
@@ -37,10 +37,8 @@ StyledOverlayWidget {
|
||||
},
|
||||
]
|
||||
|
||||
contentItem: Rectangle {
|
||||
contentItem: OverlayBackground {
|
||||
id: contentItem
|
||||
anchors.fill: parent
|
||||
color: Appearance.m3colors.m3surfaceContainer
|
||||
radius: root.contentRadius
|
||||
property real padding: 4
|
||||
ColumnLayout {
|
||||
|
||||
@@ -13,9 +13,7 @@ StyledOverlayWidget {
|
||||
minimumWidth: 300
|
||||
minimumHeight: 380
|
||||
|
||||
contentItem: Rectangle {
|
||||
anchors.fill: parent
|
||||
color: Appearance.m3colors.m3surfaceContainer
|
||||
contentItem: OverlayBackground {
|
||||
radius: root.contentRadius
|
||||
property real padding: 6
|
||||
|
||||
|
||||
Reference in New Issue
Block a user