@@ -86,23 +86,26 @@ public function __construct(ThemingDefaults $theming, Util $util, IURLGenerator
8686 * }
8787 */
8888 public function getCapabilities () {
89+ $ color = $ this ->theming ->getDefaultColorPrimary ();
90+ $ colorText = $ this ->theming ->getDefaultTextColorPrimary ();
91+
8992 $ backgroundLogo = $ this ->config ->getAppValue ('theming ' , 'backgroundMime ' , '' );
90- $ color = $ this ->theming ->getColorPrimary ();
93+ $ backgroundPlain = $ backgroundLogo === 'backgroundColor ' || ($ backgroundLogo === '' && $ color !== '#0082c9 ' );
94+ $ background = $ backgroundPlain ? $ color : $ this ->url ->getAbsoluteURL ($ this ->theming ->getBackground ());
95+
9196 return [
9297 'theming ' => [
9398 'name ' => $ this ->theming ->getName (),
9499 'url ' => $ this ->theming ->getBaseUrl (),
95100 'slogan ' => $ this ->theming ->getSlogan (),
96101 'color ' => $ color ,
97- 'color-text ' => $ this -> theming -> getTextColorPrimary () ,
102+ 'color-text ' => $ colorText ,
98103 'color-element ' => $ this ->util ->elementColor ($ color ),
99104 'color-element-bright ' => $ this ->util ->elementColor ($ color ),
100105 'color-element-dark ' => $ this ->util ->elementColor ($ color , false ),
101106 'logo ' => $ this ->url ->getAbsoluteURL ($ this ->theming ->getLogo ()),
102- 'background ' => $ backgroundLogo === 'backgroundColor ' || ($ backgroundLogo === '' && $ this ->theming ->getColorPrimary () !== '#0082c9 ' ) ?
103- $ this ->theming ->getColorPrimary () :
104- $ this ->url ->getAbsoluteURL ($ this ->theming ->getBackground ()),
105- 'background-plain ' => $ backgroundLogo === 'backgroundColor ' || ($ backgroundLogo === '' && $ this ->theming ->getColorPrimary () !== '#0082c9 ' ),
107+ 'background ' => $ background ,
108+ 'background-plain ' => $ backgroundPlain ,
106109 'background-default ' => !$ this ->util ->isBackgroundThemed (),
107110 'logoheader ' => $ this ->url ->getAbsoluteURL ($ this ->theming ->getLogo ()),
108111 'favicon ' => $ this ->url ->getAbsoluteURL ($ this ->theming ->getLogo ()),
0 commit comments