Files
bbedward 014c69b09a settings: tile color restyle and re-org, use materials own shift for
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
2026-09-18 14:32:55 -04:00

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);
}
}))
}
}
}