Bug 150622 - High Contrast theme is broken with GTK3.
Summary: High Contrast theme is broken with GTK3.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.3.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.5.0 target:7.4.3 target:7.3.7
Keywords:
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2022-08-26 11:56 UTC by folsk0pratima
Modified: 2022-10-13 13:07 UTC (History)
1 user (show)

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


Attachments
For p.5,6 of the comments. Contains one png screenshot and one webm video. (489.81 KB, application/zip)
2022-09-30 14:28 UTC, folsk0pratima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description folsk0pratima 2022-08-26 11:56:00 UTC
Description:

With GTK3, High Contrast theme is not displayed correctly without any way to work around the problem. To make situation worse, some things are much slower compared to when using other themes.

I want to specifically point out that themes like Adwaita are totally OK and with them everything is just the way it was before. Only with High Contrast theme LibreOffice behaves strangely.

Steps to Reproduce:
I could reproduce the bug in Debian 11 and in Arch Linux. I describe steps for Debian 11, since it is my OS of choice.
* Install Debian 11 with XFCE or i3.
* If you chose XFCE, in left upper corner click 'Applications', in the drop-down menu select Settings > Appearance and make sure HighContrast style is selected. If you chose i3, edit your `~/.config/gtk-3.0/settings.ini` to contain line `gtk-theme-name = HighContrast` and restart your i3.
* Download and install latest still version of LibreOffice from [official site](https://www.libreoffice.org/download/download-libreoffice/?type=deb-x86_64&version=7.4.0&lang=en-US). Currently it is 7.3.5.
* Go to /opt/libreoffice7.3/program and use your shell to do `./soffice --impress`.

Actual Results:
Now you see these things:

* Right side panel icons are missing, only (clickable) empty squares.
* Typing into 'Click to add Text' textbox is very sluggish.
* The borders of the textbox are black mesh instead of blue rectangle.
* Dragging the textbox around is way more sluggish than with any other theme (e.x. Adwaita).
* Even scrolling a slide is more slow than with e.x. Adwaita.
* Text selection is black in the textbox, but blue everywhere else. 

Every part of the suite is affected with similar bugs, not only Impress. For example, TexMath extension generates svg picture which contents are invisible, but when you drag the svg, you can see outline of its text. If you're not satisfied, launch writer and do:

* Insert > Chart. You see something crazy instead of actual chart. If you anchor it as character everything magically becomes OK though.

Expected Results:
Instead I expect:
* Right side panel icons to be displayed.
* Smooth typing.
* Nice blue borders for the textbox.
* Smooth dragging and scrolling.
* Nice blue text selection.
* Nice charts and TexMath equations.
or at least possibility to turn off High Contrast mode completely without touching system settings. 'Tools > Options > Accessibility > Automatically detect high contrast mode of operating systems' does not affect anything.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 7.3.5.2 / LibreOffice Community
Build ID: 184fe81b8c8c30d8b5082578aee2fed2ea847c01
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en_GB.UTF-8; UI: en-US
Calc: threaded
Comment 1 Roman Kuznetsov 2022-09-28 15:44:36 UTC
Please attach here some screenshots with your problems
Comment 2 folsk0pratima 2022-09-30 14:28:23 UTC
Created attachment 182754 [details]
For p.5,6 of the comments. Contains one png screenshot and one webm video.

Before describing screenshots, just want to mention another thing I noticed. If I download AppImage, unpack it (I don't want to use AppImage) and use *that* libreoffice, then everything is just OK. Should I download deb file and the bug shows up.

The AppImage version I am using now and which works is 'LibreOffice 7.3.1.3 a69ca51ded25f3eefd52d7bf9a5fad8c90b87951'

Since you need more info, I'll describe all the steps. I'm reproducing it in real time as I type the comment.

1. Download the still version: Linux (64-bit) (deb).
2.
#!/bin/bash
tar xf LibreOffice_7.3.6_Linux_x86-64_deb.tar.gz 
cd LibreOffice_7.3.6.2_Linux_x86-64_deb
find DEBS/ -type f | while read -r file; do
	ar x "$file"
	rm debian-binary control.tar.gz
	tar xf data.tar.xz
	rm data.tar.xz
done
cd opt/libreoffice7.3/program
3. Launch it: ./soffice; open empty Writer document.
4. First of all, I am unable to select any icon style. Sifr is being enforced on me. If I delete it manually, I become able to choose.
5. Then, as you can see in 'writer_bug_demonstration.png', no icons, broken charts and black selection.
6. Watch 'impress_bug_demonstration.webm' (14 seconds). No icons and very slow response when typing.

That's all I noticed.

Extensions: I only have TexMath and it doesn't affect. Clean profile yields the exact same results.

Version: version of the libreoffice I just reproduced the bug in is 'LibreOffice 7.3.6.2 c28ca90fd6e1a19e189fc16c05f8f8924961e12e'
Comment 3 QA Administrators 2022-10-01 03:44:08 UTC Comment hidden (noise)
Comment 4 Commit Notification 2022-10-06 15:44:47 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/28bd6ad2318208644c13d355e91977389053170f

tdf#150622 sidebar icons empty in High Contrast mode

It will be available in 7.5.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2022-10-07 08:51:55 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/3d8fd5c90b12d17cf6c3c51aada9321afdaa2e98

tdf#150622 sidebar icons empty in High Contrast mode

It will be available in 7.4.3.

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

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2022-10-07 10:24:48 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/617b902fed3cb65f66bafd6868befd08067e1feb

tdf#150622 sidebar icons empty in High Contrast mode

It will be available in 7.3.7.

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

Affected users are encouraged to test the fix and report feedback.
Comment 7 folsk0pratima 2022-10-10 06:53:58 UTC
Confirm fixed icons in
https://dev-builds.libreoffice.org/daily/libreoffice-7-3/Linux-rpm_deb-x86_64@tb87-TDF/2022-10-10_06.32.55/

Other bugs are still there.
Comment 8 Commit Notification 2022-10-12 10:31:43 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/950b2712e78e4c5015aff3762d78558be8a642bd

tdf#150622 use a solid border instead of a hatch for high contrast

It will be available in 7.5.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2022-10-13 08:05:40 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/046bc5029681444cb5d707b33a8aa3cc67732c22

tdf#150622 allow use of selection color for frame in HighContrast mode

It will be available in 7.5.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2022-10-13 12:53:24 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2734d2e058182a34c576e558138d84358c69ca5a

tdf#150622 use high contrast selection fg/bg colors for text selection

It will be available in 7.5.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 11 Caolán McNamara 2022-10-13 13:07:16 UTC
A large scatter-gun bug is hard to deem fixed, but with High Contrast and GTK:

* sidebar icons are visible now
* hatching replaced with solid border, which hopefully also addresses performance vs other themes
* system highlight color used for textbox selection frames
* system highlight fg/bg colors used for text selection

So I'll call this fixed as the specific GTK aspects are resolved. Separate bugs for remaining issues is always possible.

In general "High Contrast" isn't an aesthetic thing, as an accessibility setting we're apparently following (or trying to anyway) guidelines something like https://learn.microsoft.com/en-us/windows/win32/winauto/high-contrast-parameter and "Map all colors to a single pair of foreground and background colors" and "Images that would typically be drawn in multiple colors should be drawn using the foreground and background colors selected for text" which is why we have unfilled drawing shapes and so on which is presumably why the charts and other things are quirky.

https://lists.freedesktop.org/archives/libreoffice/2022-October/089453.html