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

27 lines
889 B
QML

import QtQuick
import qs.Common
import qs.Services
import "../../../Common/Format.js" as Format
CcTile {
iconName: "motion_sensor_active"
title: SessionService.idleInhibited ? I18n.tr("Keeping Awake") : I18n.tr("Keep Awake")
subtitle: {
if (!SessionService.idleInhibited)
return I18n.tr("Off");
if (SessionData.idleInhibitedUntil <= 0)
return I18n.tr("On");
return I18n.tr("Until %1", "standalone tile status, %1 is a clock time").arg(Format.formatUntil(SessionData.idleInhibitedUntil, SettingsData.use24HourClock));
}
active: SessionService.idleInhibited || false
showExpand: true
onClicked: SessionService.toggleIdleInhibit(widgetData.durationMinutes)
expandedContent: Component {
CcDurationActions {
onSelected: minutes => SessionService.enableIdleInhibit(minutes)
}
}
}