From: Claudio Cambra Date: Wed, 31 May 2023 07:36:07 +0000 (+0800) Subject: Fix switching from dark/light mode for checkboxes in file details window X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~10^2~23^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=81fc212f708f3ea7519ca54bcc080d4f679bf32d;p=nextcloud-desktop.git Fix switching from dark/light mode for checkboxes in file details window Signed-off-by: Claudio Cambra --- diff --git a/src/gui/filedetails/ShareDetailsPage.qml b/src/gui/filedetails/ShareDetailsPage.qml index bcea3148d..e8281f03a 100644 --- a/src/gui/filedetails/ShareDetailsPage.qml +++ b/src/gui/filedetails/ShareDetailsPage.qml @@ -301,8 +301,28 @@ Page { visible: active sourceComponent: CheckBox { // TODO: Rather than setting all these palette colours manually, - // create a custom style and do it for all components globally - palette.window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox + // create a custom style and do it for all components globally. + // + // Additionally, we need to override the entire palette when we + // set one palette property, as otherwise we default back to the + // theme palette -- not the parent palette + palette { + text: Style.ncTextColor + windowText: Style.ncTextColor + buttonText: Style.ncTextColor + brightText: Style.ncTextBrightColor + highlight: Style.lightHover + highlightedText: Style.ncTextColor + light: Style.lightHover + midlight: Style.ncSecondaryTextColor + mid: Style.darkerHover + dark: Style.menuBorder + button: Style.buttonBackgroundColor + window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox + base: Style.backgroundColor + toolTipBase: Style.backgroundColor + toolTipText: Style.ncTextColor + } spacing: moreMenu.indicatorSpacing padding: moreMenu.itemPadding indicator.width: moreMenu.indicatorItemWidth @@ -401,8 +421,28 @@ Page { anchors.right: parent.right // TODO: Rather than setting all these palette colours manually, - // create a custom style and do it for all components globally - palette.window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox + // create a custom style and do it for all components globally. + // + // Additionally, we need to override the entire palette when we + // set one palette property, as otherwise we default back to the + // theme palette -- not the parent palette + palette { + text: Style.ncTextColor + windowText: Style.ncTextColor + buttonText: Style.ncTextColor + brightText: Style.ncTextBrightColor + highlight: Style.lightHover + highlightedText: Style.ncTextColor + light: Style.lightHover + midlight: Style.ncSecondaryTextColor + mid: Style.darkerHover + dark: Style.menuBorder + button: Style.buttonBackgroundColor + window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox + base: Style.backgroundColor + toolTipBase: Style.backgroundColor + toolTipText: Style.ncTextColor + } spacing: moreMenu.indicatorSpacing padding: moreMenu.itemPadding @@ -429,8 +469,28 @@ Page { Layout.fillWidth: true // TODO: Rather than setting all these palette colours manually, - // create a custom style and do it for all components globally - palette.window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox + // create a custom style and do it for all components globally. + // + // Additionally, we need to override the entire palette when we + // set one palette property, as otherwise we default back to the + // theme palette -- not the parent palette + palette { + text: Style.ncTextColor + windowText: Style.ncTextColor + buttonText: Style.ncTextColor + brightText: Style.ncTextBrightColor + highlight: Style.lightHover + highlightedText: Style.ncTextColor + light: Style.lightHover + midlight: Style.ncSecondaryTextColor + mid: Style.darkerHover + dark: Style.menuBorder + button: Style.buttonBackgroundColor + window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox + base: Style.backgroundColor + toolTipBase: Style.backgroundColor + toolTipText: Style.ncTextColor + } spacing: moreMenu.indicatorSpacing padding: moreMenu.itemPadding @@ -538,8 +598,28 @@ Page { Layout.fillWidth: true // TODO: Rather than setting all these palette colours manually, - // create a custom style and do it for all components globally - palette.window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox + // create a custom style and do it for all components globally. + // + // Additionally, we need to override the entire palette when we + // set one palette property, as otherwise we default back to the + // theme palette -- not the parent palette + palette { + text: Style.ncTextColor + windowText: Style.ncTextColor + buttonText: Style.ncTextColor + brightText: Style.ncTextBrightColor + highlight: Style.lightHover + highlightedText: Style.ncTextColor + light: Style.lightHover + midlight: Style.ncSecondaryTextColor + mid: Style.darkerHover + dark: Style.menuBorder + button: Style.buttonBackgroundColor + window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox + base: Style.backgroundColor + toolTipBase: Style.backgroundColor + toolTipText: Style.ncTextColor + } spacing: moreMenu.indicatorSpacing padding: moreMenu.itemPadding @@ -733,8 +813,28 @@ Page { Layout.fillWidth: true // TODO: Rather than setting all these palette colours manually, - // create a custom style and do it for all components globally - palette.window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox + // create a custom style and do it for all components globally. + // + // Additionally, we need to override the entire palette when we + // set one palette property, as otherwise we default back to the + // theme palette -- not the parent palette + palette { + text: Style.ncTextColor + windowText: Style.ncTextColor + buttonText: Style.ncTextColor + brightText: Style.ncTextBrightColor + highlight: Style.lightHover + highlightedText: Style.ncTextColor + light: Style.lightHover + midlight: Style.ncSecondaryTextColor + mid: Style.darkerHover + dark: Style.menuBorder + button: Style.buttonBackgroundColor + window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox + base: Style.backgroundColor + toolTipBase: Style.backgroundColor + toolTipText: Style.ncTextColor + } spacing: moreMenu.indicatorSpacing padding: moreMenu.itemPadding