mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-16 00:04:01 -04:00
them towards theme controlCenter: make a real grid, add numerous more tile varieties, add icon size option surfaces: fix elevation levels in general, and shift them down settings: restyles and re-org sliders: scale down universally
37 lines
1.3 KiB
QML
37 lines
1.3 KiB
QML
import QtQuick
|
|
import qs.Common
|
|
|
|
CcTile {
|
|
id: root
|
|
|
|
iconName: "contrast"
|
|
iconRotation: SessionData.isLightMode ? 180 : 0
|
|
title: {
|
|
if (SettingsData.matugenSmartMode && Theme.currentTheme === Theme.dynamic)
|
|
return SessionData.isLightMode ? I18n.tr("Auto (Light Mode)", "dark mode toggle label when matugen smart mode resolved light") : I18n.tr("Auto (Dark Mode)", "dark mode toggle label when matugen smart mode resolved dark");
|
|
return I18n.tr("Dark mode");
|
|
}
|
|
active: !SessionData.isLightMode
|
|
|
|
onClicked: {
|
|
const newMode = !SessionData.isLightMode;
|
|
Theme.screenTransition();
|
|
Theme.setLightMode(newMode);
|
|
}
|
|
expandedContent: Component {
|
|
CcTileActions {
|
|
actions: [false, true].map(light => ({
|
|
text: light ? I18n.tr("Light") : I18n.tr("Dark"),
|
|
icon: light ? "light_mode" : "dark_mode",
|
|
active: light === SessionData.isLightMode,
|
|
trigger: () => {
|
|
if (light === SessionData.isLightMode)
|
|
return;
|
|
Theme.screenTransition();
|
|
Theme.setLightMode(light);
|
|
}
|
|
}))
|
|
}
|
|
}
|
|
}
|