diff options
Diffstat (limited to 'apps/theming/lib/ThemingDefaults.php')
-rw-r--r-- | apps/theming/lib/ThemingDefaults.php | 16 |
1 files changed, 10 insertions, 6 deletions
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'; + } } |