C++ / fmt (pull_request) Successful in 4s
JS/TS / fmt (pull_request) Successful in 20s
JS/TS / lint (pull_request) Successful in 22s
Python / static (pull_request) Successful in 57s
Rust / fmt (pull_request) Successful in 1m2s
C++ / build (pull_request) Successful in 2m10s
Rust / build (pull_request) Successful in 1m50s
Rust / clippy (pull_request) Successful in 1m25s
Python / verify (pull_request) Successful in 2m58s
C++ / clang-tidy (pull_request) Successful in 7m8s
70 lines
1.4 KiB
QML
70 lines
1.4 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import ZShell.Config
|
|
import qs.Components
|
|
import qs.Modules.Settings
|
|
import qs.Services
|
|
|
|
ConnectedRect {
|
|
id: root
|
|
|
|
property alias checked: switchButton.checked
|
|
property int horizontalPadding: Tokens.padding.largeIncreased
|
|
required property Component popup
|
|
property alias subtext: subtext.text
|
|
property alias text: text.text
|
|
property int verticalPadding: Tokens.padding.small
|
|
|
|
signal clicked(checked: bool)
|
|
|
|
Layout.fillWidth: true
|
|
implicitHeight: layout.implicitHeight + verticalPadding * 2
|
|
|
|
Column {
|
|
id: layout
|
|
|
|
anchors.left: parent.left
|
|
anchors.leftMargin: root.horizontalPadding
|
|
anchors.right: icon.left
|
|
anchors.rightMargin: Tokens.padding.small
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
CustomText {
|
|
id: text
|
|
|
|
font.pointSize: Tokens.font.size.smaller
|
|
}
|
|
|
|
CustomText {
|
|
id: subtext
|
|
|
|
color: Colors.palette.m3outline
|
|
font.pointSize: Tokens.font.size.small
|
|
wrapMode: Text.WordWrap
|
|
}
|
|
}
|
|
|
|
MaterialIcon {
|
|
id: icon
|
|
|
|
anchors.right: switchButton.left
|
|
anchors.rightMargin: Tokens.spacing.medium
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
text: "open_in_new"
|
|
}
|
|
|
|
StateLayer {
|
|
onClicked: PopupManager.requestOpen(root.popup)
|
|
}
|
|
|
|
CustomSwitch {
|
|
id: switchButton
|
|
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: root.horizontalPadding
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
onClicked: root.clicked(checked)
|
|
}
|
|
}
|