diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-10-19 02:07:12 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-10-19 19:12:56 +0000 |
commit | 58abed20599d85eb71f70edef77a7b7aaec043bc (patch) | |
tree | 6da880d6287ced11d0fc7511d90c7d48e9523e87 /apps/theming/lib | |
parent | be892d2e283a0a939434650a0c9933308a2cc6bb (diff) | |
download | nextcloud-server-58abed20599d85eb71f70edef77a7b7aaec043bc.tar.gz nextcloud-server-58abed20599d85eb71f70edef77a7b7aaec043bc.zip |
Invert header icons on bright preset backgrounds
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/theming/lib')
-rw-r--r-- | apps/theming/lib/Themes/CommonThemeTrait.php | 5 | ||||
-rw-r--r-- | apps/theming/lib/Themes/DefaultTheme.php | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/theming/lib/Themes/CommonThemeTrait.php b/apps/theming/lib/Themes/CommonThemeTrait.php index 8802933d24d..c203b35ed44 100644 --- a/apps/theming/lib/Themes/CommonThemeTrait.php +++ b/apps/theming/lib/Themes/CommonThemeTrait.php @@ -133,15 +133,16 @@ trait CommonThemeTrait { // TODO: implement primary color from custom background --color-background-plain ]; } - + // The user picked a shipped background if (isset(BackgroundService::SHIPPED_BACKGROUNDS[$themingBackground])) { return [ '--image-background' => "url('" . $this->urlGenerator->linkTo(Application::APP_ID, "/img/background/$themingBackground") . "')", '--color-background-plain' => $this->themingDefaults->getColorPrimary(), + '--background-image-invert-if-bright' => BackgroundService::SHIPPED_BACKGROUNDS[$themingBackground]['theming'] ?? null === BackgroundService::THEMING_MODE_DARK ? 'invert(100%)' : 'no', ]; } - + // The user picked a static colour if (substr($themingBackground, 0, 1) === '#') { return [ diff --git a/apps/theming/lib/Themes/DefaultTheme.php b/apps/theming/lib/Themes/DefaultTheme.php index 11d65de9a80..bb24bb4566b 100644 --- a/apps/theming/lib/Themes/DefaultTheme.php +++ b/apps/theming/lib/Themes/DefaultTheme.php @@ -189,6 +189,7 @@ class DefaultTheme implements ITheme { '--breakpoint-mobile' => '1024px', '--background-invert-if-dark' => 'no', '--background-invert-if-bright' => 'invert(100%)', + '--background-image-invert-if-bright' => 'no', // Default last fallback values '--image-background' => "url('" . $this->urlGenerator->imagePath('core', 'app-background.jpg') . "')", |