From 0a5d459c998a22b2d4f7b63fa369d785d9da5158 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Tue, 11 Oct 2022 23:15:33 +0200 Subject: Disable translucency on high contrast themes Fix #34514 Signed-off-by: Carl Schwan --- apps/theming/lib/Themes/DarkHighContrastTheme.php | 2 +- apps/theming/lib/Themes/HighContrastTheme.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/theming/lib/Themes/DarkHighContrastTheme.php b/apps/theming/lib/Themes/DarkHighContrastTheme.php index f219c3b3e87..4937e5f6899 100644 --- a/apps/theming/lib/Themes/DarkHighContrastTheme.php +++ b/apps/theming/lib/Themes/DarkHighContrastTheme.php @@ -62,7 +62,7 @@ class DarkHighContrastTheme extends DarkTheme implements ITheme { $this->generatePrimaryVariables($colorMainBackground, $colorMainText), [ '--color-main-background' => $colorMainBackground, - '--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), .1)', + '--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), 1)', '--color-main-text' => $colorMainText, '--color-background-dark' => $this->util->lighten($colorMainBackground, 30), diff --git a/apps/theming/lib/Themes/HighContrastTheme.php b/apps/theming/lib/Themes/HighContrastTheme.php index fda02058446..f88020e82a2 100644 --- a/apps/theming/lib/Themes/HighContrastTheme.php +++ b/apps/theming/lib/Themes/HighContrastTheme.php @@ -62,7 +62,7 @@ class HighContrastTheme extends DefaultTheme implements ITheme { $this->generatePrimaryVariables($colorMainBackground, $colorMainText), [ '--color-main-background' => $colorMainBackground, - '--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), .1)', + '--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), 1)', '--color-main-text' => $colorMainText, '--color-background-dark' => $this->util->darken($colorMainBackground, 30), -- cgit v1.2.3 From f1b38426e22507e8ee6f20f446f980fc1fc576ec Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 12 Oct 2022 11:59:16 +0200 Subject: fix color-main-background-rgb Signed-off-by: szaimen --- apps/theming/lib/Themes/DarkHighContrastTheme.php | 2 ++ apps/theming/lib/Themes/HighContrastTheme.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/apps/theming/lib/Themes/DarkHighContrastTheme.php b/apps/theming/lib/Themes/DarkHighContrastTheme.php index 4937e5f6899..37d9be44742 100644 --- a/apps/theming/lib/Themes/DarkHighContrastTheme.php +++ b/apps/theming/lib/Themes/DarkHighContrastTheme.php @@ -56,12 +56,14 @@ class DarkHighContrastTheme extends DarkTheme implements ITheme { $colorMainText = '#ffffff'; $colorMainBackground = '#000000'; + $colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground)); return array_merge( $defaultVariables, $this->generatePrimaryVariables($colorMainBackground, $colorMainText), [ '--color-main-background' => $colorMainBackground, + '--color-main-background-rgb' => $colorMainBackgroundRGB, '--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), 1)', '--color-main-text' => $colorMainText, diff --git a/apps/theming/lib/Themes/HighContrastTheme.php b/apps/theming/lib/Themes/HighContrastTheme.php index f88020e82a2..14226b5f99b 100644 --- a/apps/theming/lib/Themes/HighContrastTheme.php +++ b/apps/theming/lib/Themes/HighContrastTheme.php @@ -56,12 +56,14 @@ class HighContrastTheme extends DefaultTheme implements ITheme { $colorMainText = '#000000'; $colorMainBackground = '#ffffff'; + $colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground)); return array_merge( $defaultVariables, $this->generatePrimaryVariables($colorMainBackground, $colorMainText), [ '--color-main-background' => $colorMainBackground, + '--color-main-background-rgb' => $colorMainBackgroundRGB, '--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), 1)', '--color-main-text' => $colorMainText, -- cgit v1.2.3