diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-12-08 12:16:05 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-12-11 14:33:54 +0100 |
commit | cce4c285dbfd6957f50112b234b3545ebcceac54 (patch) | |
tree | 2c4644b6b9ffb46b74547305323307f33c0e8eec /apps/theming/lib | |
parent | ef2b0969dd022ed900d01a7567c52635773d6509 (diff) | |
download | nextcloud-server-cce4c285dbfd6957f50112b234b3545ebcceac54.tar.gz nextcloud-server-cce4c285dbfd6957f50112b234b3545ebcceac54.zip |
Fix email buttons for white theme
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/theming/lib')
-rw-r--r-- | apps/theming/lib/Capabilities.php | 2 | ||||
-rw-r--r-- | apps/theming/lib/ThemingDefaults.php | 16 |
2 files changed, 11 insertions, 7 deletions
diff --git a/apps/theming/lib/Capabilities.php b/apps/theming/lib/Capabilities.php index b43779a27b5..1b6bb8927be 100644 --- a/apps/theming/lib/Capabilities.php +++ b/apps/theming/lib/Capabilities.php @@ -75,7 +75,7 @@ class Capabilities implements IPublicCapability { 'url' => $this->theming->getBaseUrl(), 'slogan' => $this->theming->getSlogan(), 'color' => $color, - 'color-text' => $this->util->invertTextColor($color) ? '#000000' : '#FFFFFF', + 'color-text' => $this->theming->getTextColorPrimary(), 'color-element' => $this->util->elementColor($color), 'logo' => $this->url->getAbsoluteURL($this->theming->getLogo()), 'background' => $backgroundLogo === 'backgroundColor' ? diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index eb1051b13c8..fa43dd50ccd 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -256,13 +256,8 @@ class ThemingDefaults extends \OC_Defaults { $variables['image-login-plain'] = 'false'; if ($this->config->getAppValue('theming', 'color', null) !== null) { - if ($this->util->invertTextColor($this->getColorPrimary())) { - $colorPrimaryText = '#000000'; - } else { - $colorPrimaryText = '#ffffff'; - } $variables['color-primary'] = $this->getColorPrimary(); - $variables['color-primary-text'] = $colorPrimaryText; + $variables['color-primary-text'] = $this->getTextColorPrimary(); $variables['color-primary-element'] = $this->util->elementColor($this->getColorPrimary()); } @@ -378,4 +373,13 @@ class ThemingDefaults extends \OC_Defaults { return $returnValue; } + + /** + * Color of text in the header and primary buttons + * + * @return string + */ + public function getTextColorPrimary() { + return $this->util->invertTextColor($this->getColorPrimary()) ? '#000000' : '#ffffff'; + } } |