working polkit update
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Button {
|
||||
id: control
|
||||
|
||||
required property color textColor
|
||||
required property color bgColor
|
||||
property int radius: 4
|
||||
|
||||
contentItem: CustomText {
|
||||
text: control.text
|
||||
|
||||
opacity: control.enabled ? 1.0 : 0.5
|
||||
color: control.textColor
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
background: CustomRect {
|
||||
opacity: control.enabled ? 1.0 : 0.5
|
||||
|
||||
radius: control.radius
|
||||
color: control.bgColor
|
||||
}
|
||||
|
||||
StateLayer {
|
||||
radius: control.radius
|
||||
function onClicked(): void {
|
||||
control.clicked();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import qs.Config
|
||||
|
||||
CheckBox {
|
||||
id: control
|
||||
|
||||
property int checkWidth: 20
|
||||
property int checkHeight: 20
|
||||
|
||||
indicator: CustomRect {
|
||||
implicitWidth: control.checkWidth
|
||||
implicitHeight: control.checkHeight
|
||||
// x: control.leftPadding
|
||||
// y: parent.implicitHeight / 2 - implicitHeight / 2
|
||||
border.color: control.checked ? DynamicColors.palette.m3primary : "transparent"
|
||||
color: DynamicColors.palette.m3surfaceVariant
|
||||
|
||||
radius: 4
|
||||
|
||||
CustomRect {
|
||||
implicitWidth: control.checkWidth - (x * 2)
|
||||
implicitHeight: control.checkHeight - (y * 2)
|
||||
x: 4
|
||||
y: 4
|
||||
radius: 3
|
||||
color: DynamicColors.palette.m3primary
|
||||
visible: control.checked
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: CustomText {
|
||||
text: control.text
|
||||
font.pointSize: control.font.pointSize
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: control.checkWidth + control.leftPadding + 8
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user