forked from Shinonome/dots-hyprland
refractor icon toolbar buttons
This commit is contained in:
@@ -234,26 +234,26 @@ MouseArea {
|
||||
color: (Battery.isLow && !Battery.isCharging) ? Appearance.colors.colError : Appearance.colors.colOnSurfaceVariant
|
||||
}
|
||||
|
||||
ActionToolbarIconButton {
|
||||
IconToolbarButton {
|
||||
id: sleepButton
|
||||
onClicked: Session.suspend()
|
||||
text: "dark_mode"
|
||||
}
|
||||
|
||||
PasswordGuardedActionToolbarIconButton {
|
||||
PasswordGuardedIconToolbarButton {
|
||||
id: powerButton
|
||||
text: "power_settings_new"
|
||||
targetAction: LockContext.ActionEnum.Poweroff
|
||||
}
|
||||
|
||||
PasswordGuardedActionToolbarIconButton {
|
||||
PasswordGuardedIconToolbarButton {
|
||||
id: rebootButton
|
||||
text: "restart_alt"
|
||||
targetAction: LockContext.ActionEnum.Reboot
|
||||
}
|
||||
}
|
||||
|
||||
component PasswordGuardedActionToolbarIconButton: ActionToolbarIconButton {
|
||||
component PasswordGuardedIconToolbarButton: IconToolbarButton {
|
||||
id: guardedBtn
|
||||
required property var targetAction
|
||||
|
||||
@@ -273,24 +273,6 @@ MouseArea {
|
||||
}
|
||||
}
|
||||
|
||||
component ActionToolbarIconButton: ToolbarButton {
|
||||
id: iconBtn
|
||||
implicitWidth: height
|
||||
|
||||
colBackgroundToggled: Appearance.colors.colSecondaryContainer
|
||||
colBackgroundToggledHover: Appearance.colors.colSecondaryContainerHover
|
||||
colRippleToggled: Appearance.colors.colSecondaryContainerActive
|
||||
|
||||
contentItem: MaterialSymbol {
|
||||
anchors.centerIn: parent
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
iconSize: 24
|
||||
text: iconBtn.text
|
||||
color: iconBtn.toggled ? Appearance.colors.colOnSecondaryContainer : Appearance.colors.colOnSurfaceVariant
|
||||
}
|
||||
}
|
||||
|
||||
component IconAndTextPair: Row {
|
||||
id: pair
|
||||
required property string icon
|
||||
|
||||
Reference in New Issue
Block a user