Bug 143098 - The 'Styles Preview' section in the Tabbed NB doesn't follow the system theme like the sidebar
Summary: The 'Styles Preview' section in the Tabbed NB doesn't follow the system theme...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyMedium, easyHack, skillCpp, topicDesign
: 140428 146289 (view as bug list)
Depends on:
Blocks: UI-Theming Notebookbar-Tabbed
  Show dependency treegraph
 
Reported: 2021-06-27 21:45 UTC by yizl44p8
Modified: 2022-01-03 22:44 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
The heading styles section (17.64 KB, image/png)
2021-06-27 21:45 UTC, yizl44p8
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yizl44p8 2021-06-27 21:45:03 UTC
Description:
N/A

Steps to Reproduce:
1. Use a dark theme in GNOME or a dark color scheme in KDE Plasma.
2. Open LibreOffice Writer.

Actual Results:
In the ribbon UI, the heading styles section is white and the font is grey, creating a bad contrast.

Expected Results:
The background of the heading styles section should follow the system theme and the font color should adapt to the background.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.4.2
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 5.12; UI render: default; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 yizl44p8 2021-06-27 21:45:36 UTC
Created attachment 173235 [details]
The heading styles section
Comment 2 V Stuart Foote 2021-06-28 01:30:43 UTC
LibreOffice does not implement a 'Ribbon UI'

However, in the Tabbed Notebook Bar (NB) the 'Styles Preview' icon view based widget [1] does not seem to correctly pickup fg/bg colors of the os/DE theme.

For OP please retest with a 7.2.0 beta or a build of master against 7.3.0 which has the patch.

@Szymon, could the previews be made theme aware?

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 1db375e06516d0532f01f9585986617aa3079866
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

=-ref-=
[1] https://gerrit.libreoffice.org/c/core/+/110408
Comment 3 Szymon Kłos 2021-06-28 06:15:09 UTC
I think it is possible. 

We have two things to do:
1. be sure IconView widget follows the theme
2. use different colors set for rendering previews if dark theme is applied

Code pointers:
[1] https://opengrok.libreoffice.org/xref/core/vcl/source/treelist/iconview.cxx?r=217b9423#31
[2] https://opengrok.libreoffice.org/xref/core/svx/source/tbxctrls/StylesPreviewWindow.cxx?r=04cd6749#235
Comment 4 Heiko Tietze 2021-06-28 07:44:35 UTC Comment hidden (off-topic)
Comment 5 yizl44p8 2021-07-03 07:40:03 UTC Comment hidden (off-topic)
Comment 6 yizl44p8 2021-07-03 07:40:35 UTC Comment hidden (off-topic)
Comment 7 yizl44p8 2021-07-03 07:40:59 UTC Comment hidden (off-topic)
Comment 8 Heiko Tietze 2021-07-05 07:13:46 UTC Comment hidden (off-topic)
Comment 9 Buovjaga 2021-07-21 19:55:29 UTC
*** Bug 140428 has been marked as a duplicate of this bug. ***
Comment 10 stragu 2021-12-18 14:33:30 UTC
*** Bug 146289 has been marked as a duplicate of this bug. ***
Comment 11 stragu 2021-12-18 14:42:32 UTC
I agree the tabbed UI's style preview should follow the same colour scheme as the Style sidebar.

Still the case with:

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 06ac18e6302d666c363740644a7976e8c22d1113
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 12 Heiko Tietze 2021-12-20 09:42:47 UTC
Please retest, it works well for me with black font on white background using

Version: 7.2.4.1 / LibreOffice Community
Build ID: 20(Build:1)
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (en_US.UTF-8); UI: en-US
7.2.4-3
Calc: threaded

(KDE with Breeze Dark)
Comment 13 stragu 2021-12-22 02:48:16 UTC
Heiko, I haven't been able to reproduce the grey font issue either, but can we make this bug the one about this style preview section following the dark theme exactly as the sidebar does?

As Yizi said for expected results:

"The background of the heading styles section should follow the system theme and the font color should adapt to the background."

Which is why I marked bug 146289 as a duplicate.

Changing bug summary to add "like the sidebar".
Comment 14 Heiko Tietze 2022-01-03 10:36:32 UTC
(In reply to stragu from comment #13)
> "The background of the heading styles section should follow the system theme
> and the font color should adapt to the background."

The Stylist is not always the best solution, see bug 137705. The paragraph style dropdown in the classic toolbar has also a full-design preview - but in this case without colors. We discussed the topic a couple of times and resolved tickets as WF.
Comment 15 stragu 2022-01-03 22:44:58 UTC
(In reply to Heiko Tietze from comment #14)

> The Stylist is not always the best solution, see bug 137705. The paragraph
> style dropdown in the classic toolbar has also a full-design preview - but
> in this case without colors. We discussed the topic a couple of times and
> resolved tickets as WF.

Right, there's obviously been a lot more discussion around this elsewhere, thanks for linking.
In general, I'd say it's a shame there is inconsistency between toolbar(s) and sidebar, but I will trust the Design and UX/UI teams' opinion on what should be done with this bug.