Skip to content

Commit 8cfce80

Browse files
committed
Revert "Fix color of app menu entries and background color"
1 parent 7b4914b commit 8cfce80

File tree

11 files changed

+26
-25
lines changed

11 files changed

+26
-25
lines changed

apps/theming/css/default.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@
8585
--color-primary-element-light-text: #00293f;
8686
--gradient-primary-background: linear-gradient(40deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
8787
--image-background-default: url('/apps/theming/img/background/kamil-porembinski-clouds.jpg');
88-
--color-background-plain: #00679e;
88+
--color-background-plain: #0082c9;
8989
}

apps/theming/lib/Service/BackgroundService.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ class BackgroundService {
6060
'description' => 'Abstract background picture in yellow and white color whith a flower on it',
6161
'attribution_url' => 'https://stocksnap.io/photo/soft-floral-XOYWCCW5PA',
6262
'theming' => self::THEMING_MODE_DARK,
63-
'primary_color' => '#D8A06C',
63+
'primary_color' => '#9f652f',
6464
],
6565
'ted-moravec-morning-fog.jpg' => [
6666
'attribution' => 'Morning fog (Ted Moravec, Public Domain)',
6767
'description' => 'Background picture of a forest shrouded in fog',
6868
'attribution_url' => 'https://flickr.com/photos/tmoravec/52392410261',
6969
'theming' => self::THEMING_MODE_DARK,
70-
'primary_color' => '#38A084',
70+
'primary_color' => '#114c3b',
7171
],
7272
'stefanus-martanto-setyo-husodo-underwater-ocean.jpg' => [
7373
'attribution' => 'Underwater ocean (Stefanus Martanto Setyo Husodo, CC0)',
@@ -92,7 +92,7 @@ class BackgroundService {
9292
'description' => 'Montage of a cetonia aurata bug that takes off with white background',
9393
'attribution_url' => 'https://commons.wikimedia.org/wiki/File:Cetonia_aurata_take_off_composition_05172009.jpg',
9494
'theming' => self::THEMING_MODE_DARK,
95-
'primary_color' => '#869171',
95+
'primary_color' => '#56633d',
9696
],
9797
'dejan-krsmanovic-ribbed-red-metal.jpg' => [
9898
'attribution' => 'Ribbed red metal (Dejan Krsmanovic, CC BY)',
@@ -147,7 +147,7 @@ class BackgroundService {
147147
'description' => 'Abstract background picture of pink tapioca bubbles',
148148
'attribution_url' => 'https://www.flickr.com/photos/byrawpixel/27665140298/in/photostream/',
149149
'theming' => self::THEMING_MODE_DARK,
150-
'primary_color' => '#b17ab4',
150+
'primary_color' => '#7b4e7e',
151151
],
152152
'nasa-waxing-crescent-moon.jpg' => [
153153
'attribution' => 'Waxing crescent moon (NASA, Public Domain)',
@@ -166,14 +166,14 @@ class BackgroundService {
166166
'description' => 'Background picture of mountains during sunset or sunrise',
167167
'attribution_url' => 'https://www.flickr.com/photos/90975693@N05/17136440246',
168168
'theming' => self::THEMING_MODE_DARK,
169-
'primary_color' => '#c074a9',
169+
'primary_color' => '#7f4f70',
170170
],
171171
'lali-masriera-yellow-bricks.jpg' => [
172172
'attribution' => 'Yellow bricks (Lali Masriera, CC BY)',
173173
'description' => 'Background picture of yellow bricks with some yellow tubes',
174174
'attribution_url' => 'https://www.flickr.com/photos/visualpanic/3982464447',
175175
'theming' => self::THEMING_MODE_DARK,
176-
'primary_color' => '#bc8210',
176+
'primary_color' => '#7f5700',
177177
],
178178
];
179179

apps/theming/lib/Themes/CommonThemeTrait.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ protected function generatePrimaryVariables(string $colorMainBackground, string
8888
protected function generateGlobalBackgroundVariables(): array {
8989
$backgroundDeleted = $this->config->getAppValue(Application::APP_ID, 'backgroundMime', '') === 'backgroundColor';
9090
$hasCustomLogoHeader = $this->util->isLogoThemed();
91-
$isPrimaryBright = $this->util->invertTextColor($this->primaryColor);
91+
$isDefaultPrimaryBright = $this->util->invertTextColor($this->defaultPrimaryColor);
9292

9393
$variables = [];
9494

9595
// Default last fallback values
9696
$variables['--image-background-default'] = "url('" . $this->themingDefaults->getBackground() . "')";
97-
$variables['--color-background-plain'] = $this->primaryColor;
97+
$variables['--color-background-plain'] = $this->defaultPrimaryColor;
9898

9999
// Register image variables only if custom-defined
100100
foreach (ImageManager::SUPPORTED_IMAGE_KEYS as $image) {
@@ -108,11 +108,11 @@ protected function generateGlobalBackgroundVariables(): array {
108108
// If primary as background has been request or if we have a custom primary colour
109109
// let's not define the background image
110110
if ($backgroundDeleted) {
111-
$variables['--color-background-plain'] = $this->primaryColor;
111+
$variables['--color-background-plain'] = $this->defaultPrimaryColor;
112112
$variables['--image-background-plain'] = 'yes';
113113
$variables['--image-background'] = 'no';
114114
// If no background image is set, we need to check against the shown primary colour
115-
$variables['--background-image-invert-if-bright'] = $isPrimaryBright ? 'invert(100%)' : 'no';
115+
$variables['--background-image-invert-if-bright'] = $isDefaultPrimaryBright ? 'invert(100%)' : 'no';
116116
}
117117

118118
if ($hasCustomLogoHeader) {
@@ -133,14 +133,14 @@ protected function generateUserBackgroundVariables(): array {
133133
$adminBackgroundDeleted = $this->config->getAppValue(Application::APP_ID, 'backgroundMime', '') === 'backgroundColor';
134134
$backgroundImage = $this->config->getUserValue($user->getUID(), Application::APP_ID, 'background_image', BackgroundService::BACKGROUND_DEFAULT);
135135
$currentVersion = (int)$this->config->getUserValue($user->getUID(), Application::APP_ID, 'userCacheBuster', '0');
136-
$isPrimaryBright = $this->util->invertTextColor($this->primaryColor);
136+
$isPrimaryBright = $this->util->invertTextColor($this->themingDefaults->getColorPrimary());
137137

138138
// The user removed the background
139139
if ($backgroundImage === BackgroundService::BACKGROUND_DISABLED) {
140140
return [
141141
// Might be defined already by admin theming, needs to be overridden
142142
'--image-background' => 'none',
143-
'--color-background-plain' => $this->primaryColor,
143+
'--color-background-plain' => $this->themingDefaults->getColorPrimary(),
144144
// If no background image is set, we need to check against the shown primary colour
145145
'--background-image-invert-if-bright' => $isPrimaryBright ? 'invert(100%)' : 'no',
146146
];
@@ -151,15 +151,15 @@ protected function generateUserBackgroundVariables(): array {
151151
$cacheBuster = substr(sha1($user->getUID() . '_' . $currentVersion), 0, 8);
152152
return [
153153
'--image-background' => "url('" . $this->urlGenerator->linkToRouteAbsolute('theming.userTheme.getBackground') . "?v=$cacheBuster')",
154-
'--color-background-plain' => $this->primaryColor,
154+
'--color-background-plain' => $this->themingDefaults->getColorPrimary(),
155155
];
156156
}
157157

158158
// The user is using the default background and admin removed the background image
159159
if ($backgroundImage === BackgroundService::BACKGROUND_DEFAULT && $adminBackgroundDeleted) {
160160
return [
161161
// --image-background is not defined in this case
162-
'--color-background-plain' => $this->primaryColor,
162+
'--color-background-plain' => $this->themingDefaults->getColorPrimary(),
163163
'--background-image-invert-if-bright' => $isPrimaryBright ? 'invert(100%)' : 'no',
164164
];
165165
}
@@ -168,7 +168,7 @@ protected function generateUserBackgroundVariables(): array {
168168
if (isset(BackgroundService::SHIPPED_BACKGROUNDS[$backgroundImage])) {
169169
return [
170170
'--image-background' => "url('" . $this->urlGenerator->linkTo(Application::APP_ID, "img/background/$backgroundImage") . "')",
171-
'--color-background-plain' => $this->primaryColor,
171+
'--color-background-plain' => $this->themingDefaults->getColorPrimary(),
172172
'--background-image-invert-if-bright' => BackgroundService::SHIPPED_BACKGROUNDS[$backgroundImage]['theming'] ?? null === BackgroundService::THEMING_MODE_DARK ? 'invert(100%)' : 'no',
173173
];
174174
}

core/css/header.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/css/header.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/css/header.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,12 @@
174174
> .header-menu:not(.user-menu):not(.unified-search-menu) {
175175
// For general
176176
> .header-menu__trigger {
177-
filter: var(--background-image-invert-if-bright);
177+
filter: var(--background-image-invert-if-bright) !important;
178178
}
179179

180180
// For assistant button
181181
> .trigger {
182-
filter: var(--background-image-invert-if-bright);
182+
filter: var(--background-image-invert-if-bright) !important;
183183
}
184184
}
185185
> div,

core/css/server.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)