Bug 94632 - Light sifr and breeze icon themes for dark OS themes
Summary: Light sifr and breeze icon themes for dark OS themes
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0 target:5.5.0 target:5.4.0.1
Keywords:
: 86875 91322 98448 104370 104373 (view as bug list)
Depends on:
Blocks: Icon-Theme-Breeze Icon-Theme-Sifr-old
  Show dependency treegraph
 
Reported: 2015-09-30 07:42 UTC by Yousuf Philips (jay) (retired)
Modified: 2017-06-06 14:28 UTC (History)
13 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot of breeze and sifr (70.76 KB, image/png)
2015-10-14 16:53 UTC, Yousuf Philips (jay) (retired)
Details
breeze dark on macOS 10.12.5 (25.73 KB, image/jpeg)
2017-06-01 06:09 UTC, steve
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2015-09-30 07:42:26 UTC
A number of users prefer dark themes, like Heiko and Joel, so providing them with a light version of sifr and breeze that will be easily visible on their dark theme is a good feature.

There are two means of achieving this:
1) bundling a light version of the icon theme
2) invert the colors within the software

Andreas has a script to automate the creating of a light version for breeze and likely this same script would work with sifr with a little tweaking. Kendy prefers that this be done within the software and will be providing code pointers so a dev can look into that.
Comment 1 andreas_k 2015-09-30 07:44:56 UTC
As LibreOffice use png files I'm not sure that the software transformation would work. But I'm open for everything.
Comment 2 Samuel Mehrbrodt (allotropia) 2015-09-30 09:42:24 UTC
> 1) bundling a light version of the icon theme

Any numbers how much of size increase this would be?
Comment 3 andreas_k 2015-09-30 09:49:30 UTC
959 kb is the images_breeze.zip file for the installation.
Comment 4 Samuel Mehrbrodt (allotropia) 2015-09-30 10:08:40 UTC
Hm, not _that_  big.
Personally I would prefer generating the different color schemes from svg and pack them as seperate icon themes. I fear inverting colors with the software would be a source of additional bugs.
Comment 5 Yousuf Philips (jay) (retired) 2015-09-30 13:31:44 UTC
Sifr's zip file is 603kb and light sifr is to replace hicontrast which is 857kb, i would also think bundling it would be the better option, as inverting breeze isnt likely the same as andreas's light breeze.
Comment 6 CassieLX 2015-09-30 15:53:03 UTC
I think this could (and should) be done by the software itself. :-) If a persona lies behind the icon the routine could decide, if the icon is light or dark -> leads into better visual legibility. :-)
Comment 7 Adolfo Jayme Barrientos 2015-10-12 13:15:47 UTC
*** Bug 91322 has been marked as a duplicate of this bug. ***
Comment 9 Adolfo Jayme Barrientos 2015-10-12 13:20:47 UTC
*** Bug 86875 has been marked as a duplicate of this bug. ***
Comment 10 Yousuf Philips (jay) (retired) 2015-10-12 14:55:37 UTC
So the patch Tomaz spoke about during last week's design meeting is in and can be tested by setting the environment variable VCL_ICONS_FOR_DARK_THEME to 1 (e.g. `env VCL_ICONS_FOR_DARK_THEME=1` ) before loading libreoffice.
Comment 11 Valerio 2015-10-12 21:45:03 UTC
Hi, 
I tried compiling the last git code, then setting the env variable and starting the instdir/program/soffice, then opening a writer empty file.
However I don't see any difference in the sifr icon?
Could be that I use breeze dark theme in KDE instead of GNOME?
Comment 12 andreas_k 2015-10-13 07:43:06 UTC
how does the script work? can I add an text file with the light and dark colors? So use ffffffff instead of 00000000 or where will the color for the dark theme be stored?
Comment 13 Yousuf Philips (jay) (retired) 2015-10-14 16:53:43 UTC
Created attachment 119614 [details]
screenshot of breeze and sifr

Attached is a screenshot of writer's toolbars in sifr and breeze with tomaz's patch on a dark theme versus my default light theme and standard icons.
Comment 14 andreas_k 2015-10-14 18:32:18 UTC
awesome love it thanks for making this patch
Comment 15 CassieLX 2015-10-14 18:57:55 UTC
Better than expected. Amazing!
Comment 16 Yousuf Philips (jay) (retired) 2015-10-25 15:38:03 UTC
(In reply to Yousuf (Jay) Philips from comment #10)
> So the patch Tomaz spoke about during last week's design meeting is in and
> can be tested by setting the environment variable VCL_ICONS_FOR_DARK_THEME
> to 1 (e.g. `env VCL_ICONS_FOR_DARK_THEME=1` ) before loading libreoffice.

I made a mistake, you have to use `export VCL_ICONS_FOR_DARK_THEME=1` at the commandline. :D

Alternatively you can use `VCL_ICONS_FOR_DARK_THEME=1 soffice`.
Comment 17 Jeff Fortin Tam 2016-02-07 22:51:58 UTC
It may be worth considering automatically toggling the use of the "inverted" variant when detecting that the user is running with the "prefer dark variant" GTK3 setting active (this can be found in the appearance settings in gnome-tweak-tool, for example). Some like me may toggle between dark and light theme variants at various times during the day; ideally, LibreOffice should simply adapt to that instead of requiring the user to launch with a variable or go into the LibreOffice preferences dialog.
Comment 18 Heiko Tietze 2016-02-08 08:19:35 UTC
(In reply to Jean-François Fortin Tam from comment #17)
> It may be worth considering automatically toggling the use of the "inverted"
> variant when detecting that the user is running with the "prefer dark
> variant" GTK3 setting active (this can be found in the appearance settings
> in gnome-tweak-tool, for example). ...

And if someone has figured out how to change the theme under Windows? Or take KDE, which is a big tweaking machine on its own. What I mean is you cannot trust in a certain tool. But it should be rather an easy hack to calculate the brightness from the system's background color, and adjust the icon set when set to automatic.

I'm using this code 

  l:=ColorToRGB(Value);
  if (l and $00FF0000) shr 16+
     (l and $0000FF00) shr 8+
     (l and $000000FF) > 500 then
    Result:=clBlack else
    Result:=clWhite;
Comment 19 Aitor Pazos 2016-03-05 18:45:37 UTC
Breeze upstream designers are already providing a Makefile to generate the corresponding dark icons theme doing the conversion on the SVG files instead of doing it at the bitmap level.

https://github.com/NitruxSA/breeze-icon-theme/blob/master/LibreOffice_Breeze/Makefile

It's just waiting to be distributed along the regular breeze light theme.
Comment 20 Adolfo Jayme Barrientos 2016-03-05 19:06:35 UTC
*** Bug 98448 has been marked as a duplicate of this bug. ***
Comment 21 Yousuf Philips (jay) (retired) 2016-07-31 15:54:02 UTC
So the system altering OS hasnt materialized, so lets go with the static version for breeze.

https://gerrit.libreoffice.org/27756
Comment 22 Heiko Tietze 2016-09-16 13:34:36 UTC
(In reply to Marco Martin from comment #5 at bug 91322)
> just adding a comment on how a Plasma sessions colors the Breeze icons:
> 
> for its monochrome icons, that icon theme internally uses stylesheets to
> apply the colors.
> 
> very simplified the source svg of a typical breeze icon looks like:
>   <defs
>      id="defs3051">
>     <style
>        id="current-color-scheme"
>        type="text/css">
>       .ColorScheme-Text {
>         color:#31363b;
>       }
>       </style>
>   </defs>
> 
>    <path
>        id="path7"
>        class="ColorScheme-Text"
>        d="... "
>        style="fill:currentColor;fill-opacity:1;stroke:none" />
> 
> (other named colors are supported besides Text)
> then our icon loader changes the contents of the "current-color-scheme"
> element before rendering the icon, making it easy to paint them with
> different colors.
> 
> Maybe Libreoffice could do something like that? (either directly loaded at
> build time, prerendered at build time or whatever)
Comment 23 Buovjaga 2016-12-09 14:57:38 UTC
*** Bug 104370 has been marked as a duplicate of this bug. ***
Comment 24 Buovjaga 2016-12-09 15:20:03 UTC
*** Bug 104373 has been marked as a duplicate of this bug. ***
Comment 25 andreas_k 2017-05-31 22:56:03 UTC
so from my point of view (breeze-dark icon set) this bug is closed.
Comment 26 steve 2017-06-01 06:09:27 UTC
Created attachment 133772 [details]
breeze dark on macOS 10.12.5
Comment 27 steve 2017-06-01 06:13:35 UTC
Not sure. Attaching screenshot of what breeze dark icon set looks like. Maybe expected? Do users have to manually switch the background? If so, I would not consider this solved. But maybe can also be dealt with in additional bugs.
see attached screenshot

I see two things that I am unsure about:

1. dark OS theme: macOS has an option to use a dark menubar and dock (in system preferences > general) but that's it. I am not sure if that can be considered a dark OS mode. Guess it could. So should LO pick up on that? Or what is the idea? Reading this bugs title it sounds like it should.

2. Manual switch results in unreadable icons. Due to the background not being changed when users manually switch to dark breeze icon set, the icons are unreadable. I don't think this is good UX. So LO should be smart about this and automatically switch to a dark background when breeze dark is selected as icon theme.

Hope this is useful. Feel free to correct me or use new bugs to deal with remaining macOS issues etc.
Comment 28 Yousuf Philips (jay) (retired) 2017-06-01 16:43:32 UTC
(In reply to steve -_- from comment #27)
> Not sure. Attaching screenshot of what breeze dark icon set looks like.
> Maybe expected? Do users have to manually switch the background? If so, I
> would not consider this solved. But maybe can also be dealt with in
> additional bugs.

Yes its for breeze for dark themes, so that is what is expected, as regular breeze is for light themes.

> 1. dark OS theme: macOS has an option to use a dark menubar and dock (in
> system preferences > general) but that's it. I am not sure if that can be
> considered a dark OS mode. Guess it could. So should LO pick up on that? Or
> what is the idea? Reading this bugs title it sounds like it should.

Guess it wont be useful on mac if it doesnt allow users to use a dark theme.
Comment 29 steve 2017-06-01 18:37:41 UTC
maybe, but from what I understand those icons would be useful on a dark background, right? So why isn't LO smart about this? as soon as a user on macOS selects breeze dark, it should switch the background too. since obviously the user intends to use a dark theme, no?

This is a somewhat confusing discussion, since it's hard to properly solve such things cross platform.
Comment 30 Yousuf Philips (jay) (retired) 2017-06-01 23:44:55 UTC
(In reply to steve -_- from comment #29)
> maybe, but from what I understand those icons would be useful on a dark
> background, right? So why isn't LO smart about this? as soon as a user on
> macOS selects breeze dark, it should switch the background too. since
> obviously the user intends to use a dark theme, no?

LO doesnt go around changing the user's theme, as it doesnt even know which themes are installed on the user's system, but is smart enough to detect that a user is using a high contrast theme and automatically chooses our high contrast theme.
Comment 31 Commit Notification 2017-06-04 12:13:09 UTC
Matthias Freund committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7f0fe098d140354cabe024b84d9a21f831496d07

tdf#94632 Light sifr and breeze icon themes for dark OS themes

It will be available in 5.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 32 Commit Notification 2017-06-04 12:14:34 UTC
Matthias Freund committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3167f16f5b8535a71121c84834d0d4b09671fcf4&h=libreoffice-5-4

tdf#94632 Light sifr and breeze icon themes for dark OS themes

It will be available in 5.4.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 33 Yousuf Philips (jay) (retired) 2017-06-04 12:43:34 UTC
Now that sifr_dark is in, this is complete with sifr_dark being enabled.

https://gerrit.libreoffice.org/#/c/38387/
Comment 34 Commit Notification 2017-06-06 02:27:29 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=59c0682c46e52aa18bdbee4c14ef05af9329de33

tdf#94632 Enable sifr dark and set fallback

It will be available in 5.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 35 Commit Notification 2017-06-06 14:28:30 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c0b412f4ad331ea66ff937fd96432796bd1ef5eb&h=libreoffice-5-4

tdf#94632 Enable sifr dark and set fallback

It will be available in 5.4.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.