diff options
author | Michael Weimann <mail@michael-weimann.eu> | 2018-08-28 19:21:17 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-02 09:37:55 +0300 |
commit | c7e81e17c86a6e6beff433238a6923f5d931c22f (patch) | |
tree | e36ff2cb0a2875dabb0e5ed1dc4e4fc331cdf905 /apps/theming/lib/ThemingDefaults.php | |
parent | d855c38e078f2cd0bec86d5a20fc2f448799433b (diff) |
Updates inverted logo handling to work like the app icons
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
Diffstat (limited to 'apps/theming/lib/ThemingDefaults.php')
-rw-r--r-- | apps/theming/lib/ThemingDefaults.php | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 7a26b46516f..0573f7b84d7 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -33,7 +33,6 @@ namespace OCA\Theming; - use OCP\App\AppPathNotFoundException; use OCP\App\IAppManager; use OCP\Files\NotFoundException; @@ -275,7 +274,7 @@ class ThemingDefaults extends \OC_Defaults { 'theming-favicon-mime' => "'" . $this->config->getAppValue('theming', 'faviconMime') . "'" ]; - $variables['image-logo'] = "url('". $this->getLogoUrl() ."')"; + $variables['image-logo'] = "url('".$this->imageManager->getImageUrl('logo')."')"; $variables['image-logoheader'] = "'".$this->imageManager->getImageUrl('logoheader')."'"; $variables['image-favicon'] = "'".$this->imageManager->getImageUrl('favicon')."'"; $variables['image-login-background'] = "url('".$this->imageManager->getImageUrl('background')."')"; @@ -301,24 +300,6 @@ class ThemingDefaults extends \OC_Defaults { } /** - * Returns the logo url. - * If there is a custom logo, it just returns it. - * For the default logo it returns the white or blue one depending on the color luminance. - * - * @return string - */ - private function getLogoUrl() { - $logoMime = $this->config->getAppValue('theming', 'logoMime'); - $primaryColor = $this->getColorPrimary(); - $luminance = $this->util->calculateLuminance($primaryColor); - if ($logoMime === '' & $luminance > 0.8) { - return $this->imageManager->getImageUrl('logo-blue', true); - } else { - return $this->imageManager->getImageUrl('logo', true); - } - } - - /** * Check if the image should be replaced by the theming app * and return the new image location then * |