juliushaertl / direct_menu

Nextcloud/OwnCloud app to provide easy access to all apps in the header
GNU Affero General Public License v3.0
17 stars 8 forks source link

Inverted Nextcloud fix breaks mobile popup menu icons #34

Closed eppfel closed 8 years ago

eppfel commented 8 years ago

As you can see here, the icons are white and therefore not visible, because the media query does not affect the coloring/filtering.

bildschirmfoto 2016-08-30 um 16 12 05

To simplify the fix introduced in 5db63ec2d9df711a6a5f2b9c046deb4c32b2c859 you could add a class and use filter: none instead of replacing the <svg> with <img>:

#navigation.inverted svg image {
      filter: none;
}

But then, there is still the ugly hack of using JS for simple styling. So maybe access the theming app from appinfo/app.php and loading different CSS files according to inverted or not. I don't know how to do it, but if you can point to me the right spot I could create a PR. Another option, which I think I could implement is to access the configs, grab the RGB color of the theme and calculate inverted.

I did not test ownCloud support.


CentOS with Apache Nextcloud 10.0 direct_menu 0.9.0

juliushaertl commented 8 years ago

@eppfel Thanks for your report.

I think i tried to play around with a css-filter none, but iirc there were some browser specific issues. I need to check that again. It would be great if you can test that and create a pull request, as my time is a bit limited at the moment.

I like the idea of getting rid of the hacky javascript code. I guess the best way to access the theming values would be to use something like this:

if(\OCP\App::isEnabled('theming')) {
   $color = \OC::$server->getThemingDefaults()->getMailHeaderColor();
}

You can also use \OCA\Theming\Util::invertTextColor to check if the color is dark or bright, but you need to make sure, that this will not break when the theming app is disabled or when direct_menu is used with owncloud.

If you need any further advice, feel free to ask. Anyway, it would be great if you can create a pull request to fix that.