diff --git a/Modules/ControlCenter/Cards/TopCard.qml b/Modules/ControlCenter/Cards/TopCard.qml index 5bfd69a0..5d68b47a 100644 --- a/Modules/ControlCenter/Cards/TopCard.qml +++ b/Modules/ControlCenter/Cards/TopCard.qml @@ -20,9 +20,7 @@ NBox { readonly property bool hasPP: PowerProfileService.available ColumnLayout { - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top + anchors.fill: parent anchors.margins: Style.marginM * scaling // Profile, Uptime, Settings, SessionMenu, Close @@ -30,6 +28,7 @@ NBox { id: content spacing: root.spacing + Layout.alignment: Qt.AlignVCenter NImageCircled { width: Style.baseWidgetSize * 1.25 * scaling @@ -38,6 +37,8 @@ NBox { fallbackIcon: "person" borderColor: Color.mPrimary borderWidth: Math.max(1, Style.borderM * scaling) + Layout.alignment: Qt.AlignVCenter + Layout.topMargin: Style.marginXS * scaling } ColumnLayout { @@ -114,14 +115,11 @@ NBox { NIconButton { baseSize: Style.baseWidgetSize * 0.8 icon: "camera-video" - enabled: ProgramCheckerService.gpuScreenRecorderAvailable - opacity: ProgramCheckerService.gpuScreenRecorderAvailable ? Style.opacityFull : Style.opacityMedium - tooltipText: ProgramCheckerService.gpuScreenRecorderAvailable ? (ScreenRecorderService.isRecording ? I18n.tr("tooltips.stop-screen-recording") : I18n.tr("tooltips.start-screen-recording")) : I18n.tr("tooltips.screen-recorder-not-installed") + visible: ProgramCheckerService.gpuScreenRecorderAvailable + tooltipText: ScreenRecorderService.isRecording ? I18n.tr("tooltips.stop-screen-recording") : I18n.tr("tooltips.start-screen-recording") colorBg: ScreenRecorderService.isRecording ? Color.mPrimary : Color.mSurfaceVariant colorFg: ScreenRecorderService.isRecording ? Color.mOnPrimary : Color.mPrimary onClicked: { - if (!ProgramCheckerService.gpuScreenRecorderAvailable) - return ScreenRecorderService.toggleRecording() // If we were not recording and we just initiated a start, close the panel if (!ScreenRecorderService.isRecording) { @@ -200,19 +198,12 @@ NBox { // Night Light NIconButton { baseSize: Style.baseWidgetSize * 0.8 - enabled: ProgramCheckerService.wlsunsetAvailable - opacity: ProgramCheckerService.wlsunsetAvailable ? Style.opacityFull : Style.opacityMedium + visible: ProgramCheckerService.wlsunsetAvailable colorBg: Settings.data.nightLight.forced ? Color.mPrimary : Color.transparent colorFg: Settings.data.nightLight.forced ? Color.mOnPrimary : Color.mPrimary icon: Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? "nightlight-forced" : "nightlight-on") : "nightlight-off" - tooltipText: ProgramCheckerService.wlsunsetAvailable ? (Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? I18n.tr("tooltips.night-light-forced") : I18n.tr("tooltips.night-light-enabled")) : I18n.tr("tooltips.night-light-disabled")) : I18n.tr("tooltips.night-light-not-installed") + tooltipText: Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? I18n.tr("tooltips.night-light-forced") : I18n.tr("tooltips.night-light-enabled")) : I18n.tr("tooltips.night-light-disabled") onClicked: { - // Check if wlsunset is available before enabling night light - if (!ProgramCheckerService.wlsunsetAvailable) { - ToastService.showWarning(I18n.tr("settings.display.night-light.section.label"), I18n.tr("toast.night-light.not-installed")) - return - } - if (!Settings.data.nightLight.enabled) { Settings.data.nightLight.enabled = true Settings.data.nightLight.forced = false