Bug Hunting Session
Bug 120175 - Breeze Dark icon theme is not detected as the preferred theme
Summary: Breeze Dark icon theme is not detected as the preferred theme
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.1.1.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0 target:6.1.3
Keywords:
Depends on:
Blocks: Icon-Themes
  Show dependency treegraph
 
Reported: 2018-09-28 01:50 UTC by Alex
Modified: 2018-10-05 14:47 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2018-09-28 01:50:10 UTC
Description:
This is because the official "Breeze Dark" theme is named "breeze-dark", while LibreOffice's version is incorrectly named "breeze_dark".

One can easily confirm this by changing step 1 to include this modification instead:
gtk-icon-theme-name=breeze_dark

Then, LibreOffice will detect and enable Breeze Dark as the default icon theme, but other GTK programs will (correctly) not.

Steps to Reproduce:
1. Set Breeze Dark as your preferred GTK icon theme with this line in your ~/.config/gtk-3.0/settings.ini:
gtk-icon-theme-name=breeze-dark

2. Enable automatic detection of icon theme in Tools->Options->View->Icon Style

3. Open LibreOffice Writer

Actual Results:
A different icon theme is detected and enabled, depending on your platform/distro. In my case, this is the Breeze icon theme.

Expected Results:
Breeze Dark icon theme should be enabled, and the current icon theme should be listed as "Automatic (Breeze Dark)".


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 6.1.1.2
Build ID: 1:6.1.1-1
CPU threads: 4; OS: Linux 4.18; UI render: GL; VCL: gtk3_kde5; 
Locale: en-CA (en_CA.UTF-8); Calc: group threaded
Comment 1 V Stuart Foote 2018-09-28 15:38:14 UTC
OK, so "BREEZE_DARK_ID" is set [1] to "breeze_dark" with the underscore. If it benefits the KDE 5 Plasma DE users, should be a 1 character change, why not? 

But then SIFR_DARK_ID also gets the underscore with our naming, as does the new KARASA_JAGA_ID theme. Any benefit to also change those for consistency of matching external DE when calling IconThemeSelector() going forward?

=-ref-=

[1] https://opengrok.libreoffice.org/xref/core/vcl/source/app/IconThemeInfo.cxx?a=true&h=23#23
Comment 2 Alex 2018-09-29 17:31:36 UTC
(In reply to V Stuart Foote from comment #1)
> OK, so "BREEZE_DARK_ID" is set [1] to "breeze_dark" with the underscore. If
> it benefits the KDE 5 Plasma DE users, should be a 1 character change, why
> not? 

Is the usage of underscores in the theme ID because of [1]?

> But then SIFR_DARK_ID also gets the underscore with our naming, as does the
> new KARASA_JAGA_ID theme. Any benefit to also change those for consistency
> of matching external DE when calling IconThemeSelector() going forward?

I don't know about SIFR, but it looks like Karasa Jaga suffers from the same issue as Breeze Dark, because the upstream Karasa Jaga theme is named "Karasa-Jaga" [2].

=-ref=

[1]
https://opengrok.libreoffice.org/xref/core/icon-themes/README#23-26

[2]
https://github.com/rizmut/karasa-jaga-icon-theme/blob/72054b010a21d46a261d3a1599d0ee4689f41e46/install-karasa-jaga.sh#L25
Comment 3 Caolán McNamara 2018-10-03 16:42:14 UTC
I propose simply https://gerrit.libreoffice.org/#/c/61321/ i.e. replace "-" in incoming theme names with "_", which I imagine (breeze dark is unavailable to me to test) would solve the problem
Comment 4 Commit Notification 2018-10-04 07:59:01 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#120175 normalize theme names to our naming scheme

It will be available in 6.2.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 5 Caolán McNamara 2018-10-04 07:59:52 UTC
Feedback if that makes a difference welcome
Comment 6 V Stuart Foote 2018-10-04 11:50:35 UTC
@Alex, as OP the NEEDINFO is to you. Please test with a nightly of master/6.2.0 to verify the hyphenated theme is correctly picked up and gets the right icons.
Comment 7 Alex 2018-10-04 21:11:18 UTC
(In reply to V Stuart Foote from comment #6)
> @Alex, as OP the NEEDINFO is to you. Please test with a nightly of
> master/6.2.0 to verify the hyphenated theme is correctly picked up and gets
> the right icons.

I tested both Breeze Dark and Karasa Jaga, and they both now get picked up as the default. Thank you both for the fix.
Comment 8 Commit Notification 2018-10-05 14:47:25 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2e4e28004439c9d0cdd6414fbda6d41c0c000a42&h=libreoffice-6-1

Resolves: tdf#120175 normalize theme names to our naming scheme

It will be available in 6.1.3.

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.