forked from Shinonome/dots-hyprland
fix dark/light mode util button not in rowlayout
This commit is contained in:
@@ -82,26 +82,26 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
active: ConfigOptions.bar.utilButtons.showDarkModeToggle
|
active: ConfigOptions.bar.utilButtons.showDarkModeToggle
|
||||||
visible: ConfigOptions.bar.utilButtons.showDarkModeToggle
|
visible: ConfigOptions.bar.utilButtons.showDarkModeToggle
|
||||||
sourceComponent: CircleUtilButton {
|
sourceComponent: CircleUtilButton {
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
onClicked: event => {
|
onClicked: event => {
|
||||||
if (Appearance.m3colors.darkmode) {
|
if (Appearance.m3colors.darkmode) {
|
||||||
Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} --mode light --noswitch`);
|
Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} --mode light --noswitch`);
|
||||||
} else {
|
} else {
|
||||||
Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} --mode dark --noswitch`);
|
Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} --mode dark --noswitch`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MaterialSymbol {
|
||||||
|
horizontalAlignment: Qt.AlignHCenter
|
||||||
|
fill: 0
|
||||||
|
text: Appearance.m3colors.darkmode ? "light_mode" : "dark_mode"
|
||||||
|
iconSize: Appearance.font.pixelSize.large
|
||||||
|
color: Appearance.colors.colOnLayer2
|
||||||
}
|
}
|
||||||
}
|
|
||||||
MaterialSymbol {
|
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
|
||||||
fill: 0
|
|
||||||
text: Appearance.m3colors.darkmode ? "light_mode" : "dark_mode"
|
|
||||||
iconSize: Appearance.font.pixelSize.large
|
|
||||||
color: Appearance.colors.colOnLayer2
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user