summaryrefslogtreecommitdiffstats
path: root/apps/theming/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-08-15 13:33:14 +0200
committerJoas Schilling <coding@schilljs.com>2017-08-15 13:50:08 +0200
commitb7b4cfd6a14775ba9f4c71d7f3bc787971acf70f (patch)
tree6ebb3f1135fe3e6602f1b6adec5eb65d5e6d9d53 /apps/theming/lib
parent95b7fa306ef786b43286abdcab26916c503e4ec6 (diff)
downloadnextcloud-server-b7b4cfd6a14775ba9f4c71d7f3bc787971acf70f.tar.gz
nextcloud-server-b7b4cfd6a14775ba9f4c71d7f3bc787971acf70f.zip
Add the primary font color to the capabilities as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/theming/lib')
-rw-r--r--apps/theming/lib/Capabilities.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/theming/lib/Capabilities.php b/apps/theming/lib/Capabilities.php
index 2552d15ea81..d94a65f21c1 100644
--- a/apps/theming/lib/Capabilities.php
+++ b/apps/theming/lib/Capabilities.php
@@ -37,6 +37,9 @@ class Capabilities implements IPublicCapability {
/** @var ThemingDefaults */
protected $theming;
+ /** @var Util */
+ protected $util;
+
/** @var IURLGenerator */
protected $url;
@@ -45,11 +48,13 @@ class Capabilities implements IPublicCapability {
/**
* @param ThemingDefaults $theming
+ * @param Util $util
* @param IURLGenerator $url
* @param IConfig $config
*/
- public function __construct(ThemingDefaults $theming, IURLGenerator $url, IConfig $config) {
+ public function __construct(ThemingDefaults $theming, Util $util, IURLGenerator $url, IConfig $config) {
$this->theming = $theming;
+ $this->util = $util;
$this->url = $url;
$this->config = $config;
}
@@ -68,6 +73,7 @@ class Capabilities implements IPublicCapability {
'url' => $this->theming->getBaseUrl(),
'slogan' => $this->theming->getSlogan(),
'color' => $this->theming->getColorPrimary(),
+ 'color-text' => $this->util->invertTextColor($this->theming->getColorPrimary()) ? '#000000' : '#FFFFFF',
'logo' => $this->url->getAbsoluteURL($this->theming->getLogo()),
'background' => $backgroundLogo === 'backgroundColor' ?
$this->theming->getColorPrimary() :