Files
2026-10-10 18:17:44 -04:00

35 lines
845 B
QML

import QtQuick
import qs.Common
import qs.Modules.ControlCenter
CcTile {
id: root
readonly property string action: widgetData?.id ?? ""
readonly property bool finishing: action === "edit" && (host?.editMode ?? false)
toggle: false
active: finishing
tooltips: !finishing
iconName: finishing ? "check" : widgetDef?.icon ?? ""
title: widgetDef?.text ?? ""
restIconColor: action === "power" ? Theme.error : CcMetrics.tileInactiveIcon
onClicked: {
switch (action) {
case "lock":
host?.lockRequested();
return;
case "power":
host?.powerRequested();
return;
case "settings":
host?.settingsRequested();
return;
case "edit":
host?.editRequested();
return;
}
}
}