mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
45 lines
1.1 KiB
QML
45 lines
1.1 KiB
QML
import qs.modules.common.widgets
|
|
import qs.modules.common
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QtQuick.Controls
|
|
|
|
RippleButton {
|
|
id: root
|
|
property string buttonIcon
|
|
property alias iconSize: iconWidget.iconSize
|
|
|
|
Layout.fillWidth: true
|
|
implicitHeight: contentItem.implicitHeight + 8 * 2
|
|
font.pixelSize: Appearance.font.pixelSize.small
|
|
|
|
onClicked: checked = !checked
|
|
|
|
contentItem: RowLayout {
|
|
spacing: 10
|
|
OptionalMaterialSymbol {
|
|
id: iconWidget
|
|
icon: root.buttonIcon
|
|
opacity: root.enabled ? 1 : 0.4
|
|
iconSize: Appearance.font.pixelSize.larger
|
|
}
|
|
StyledText {
|
|
id: labelWidget
|
|
Layout.fillWidth: true
|
|
text: root.text
|
|
font: root.font
|
|
color: Appearance.colors.colOnSecondaryContainer
|
|
opacity: root.enabled ? 1 : 0.4
|
|
}
|
|
StyledSwitch {
|
|
id: switchWidget
|
|
focusPolicy: Qt.NoFocus
|
|
down: root.down
|
|
Layout.fillWidth: false
|
|
checked: root.checked
|
|
onClicked: root.clicked()
|
|
}
|
|
}
|
|
}
|
|
|