Bug 152928 - LibreOffice Draw View defaults to black and white, radio buttons show no enum active. Selecting color resolves issue. Reoccurs on next session.
Summary: LibreOffice Draw View defaults to black and white, radio buttons show no enum...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.3.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: GTK3 High-Contrast
  Show dependency treegraph
 
Reported: 2023-01-08 15:55 UTC by Uozaki Koen
Modified: 2024-05-09 14:57 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
LibreOffice Draw GTK3 VCL with High Contrast Theme - No View Menu Color Mode Active (42.69 KB, image/png)
2023-04-17 08:25 UTC, Uozaki Koen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Uozaki Koen 2023-01-08 15:55:54 UTC
Description:
When opening LibreOffice Draw new document or existing document, View operates in black and white and the view menu the Color/Grayscale submenu shows no selected radio button. Selecting color resolves the issue for that session, however the issue reoccurs on next session.

Environment:
- 6.0.0-6-amd64 Debian 12 Bookworm 6.0.12-1 (2022-12-09) x86_64 GNU/Linux
- Gnome 43.1, X11 compositor.



Steps to Reproduce:
1. Launch Libreoffice Draw or launch it by opening an odg file.
2. Draw a filled shape and observe no fill color is visible due to view operating in black and white mode.
3. Examine the view menu: Color/Grayscale submenu
4. Observe no selected radio button (despite black and white mode actually being active).
5. Select Color
6. Issue resolved for that session.
7. Close LibreOffice draw
8. Launch LibreOffice draw - confirm regression of the setting to no radio button selected and operation in black and white mode.

Actual Results:
View operates in black and white and the view menu the Color/Grayscale submenu shows no selected radio button.

Expected Results:
Operate in color mode by default for new documents. Retain the last used view setting per-document.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Resetting the LibreOffice profile (by launching in a temporary environment using '$soffice -env:UserInstallation=file:///tmp/test' did not resolve the issue.

Draw Version is 7.4.4.2, which was not available in the drop down list below.

Version: 7.4.4.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 12; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Debian package version: 1:7.4.4~rc2-2
Calc: threaded
Comment 1 Buovjaga 2023-03-21 13:27:38 UTC
I don't see this on Debian Bookworm with LibreOffice 7.4.5.1 gtk3

Can you please test with latest Bookworm updates?

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 2 Uozaki Koen 2023-03-21 16:49:09 UTC
Buovjaga:

I have retested the issue as remaining under:

LibreOffice 7.4.5.1 40(Build:1)
Linux 6.1.0-6-amd64 Debian 12 Bookworm Testing 6.1.15-1 (2023-03-05)

Adjusting the environment to confirm it is agnostic to video driver issues or compositor....

The issue was originally tested in X11 under Gnome 43.1.

The issue remains in Wayland under Gnome 43.3.

For good measure, I went ahead and built and ran the daily (LibreOfficeDev-7.6.0.0.alpha0_2023-03-18-x86_64.AppImage) and the issue persists as well.

Additionally, if this helps you determine root cause, in Calc, in both 7.4.5.1 40(Build:1) as well as 7.6.0.0.alpha0, setting a cell background color to non-white always appears as white unless the cell is opened for editing.

- Uozaki Koen
Comment 3 Uozaki Koen 2023-03-21 16:50:08 UTC
Additionally, the issue exists regardless of using an Nvidia P2000 compatible (pascal) driver, or Nouveau. I have tried both under both the testing and alpha LibreOffice releases.
Comment 4 Stéphane Guillou (stragu) 2023-03-22 09:21:07 UTC
I can't reproduce on Ubuntu 20.04 with gtk either.

Just to test a bit more, can you please see if it is specific to GTK?
For example, starting LO with:

SAL_USE_VCLPLUGIN=kf5 soffice

and:

SAL_USE_VCLPLUGIN=gen soffice
Comment 5 Uozaki Koen 2023-03-22 16:43:54 UTC
Stéphane:

You are good!

The issue does NOT occur in the following environments:
SAL_USE_VCLPLUGIN=gen (Raw X11)
SAL_USE_VCLPLUGIN=kf5

The issue is consistently reproducible in the gtk3 environment:
SAL_USE_VCLPLUGIN=gtk3

Note that testing kf5 required my own build as Debian bookworm testing 7.4.5.1 (Deb pkg 4:7.4.5-2) does not support kf5 in the build and it falls back to gtk3. I built my own 7.4.5.1 as well as a 7.6.0.0.alpha0_2023-03-18. In both builds, the kf5 (Cairo + Wayland) VCL does NOT have the issue. gtk3 in both of those builds is where the problems occur regarding color in Calc as well as Draw.

The issue occurs:
- Regardless of Java being used or not.
- In a temporary new profile (-env:UserInstallation=file:///tmp/test)
- Regardless of using Nouveau or the proprietary Nvidia Pascal blob.
Comment 6 Stéphane Guillou (stragu) 2023-03-23 13:48:38 UTC
Caolán, any idea what might be going on here?
Comment 7 Uozaki Koen 2023-03-25 00:29:44 UTC
Caolán and Stéphane:

I was able to bisect the issue back to the 7.3.5.1 tag in 2022-07-01. The issue does not occur in 7.3.4.2 tagged 1 month prior to that.

After parsing the commits for 7-3 for gtk related items (see gerrit below) it became apparent the issue lies with the way gtk handles the "Legacy Applications" theme being configured as HighContrast. The change made to detect HighContrast mode results in combination with issues in the implementation of the corresponding LO theme results in this behavior in the gtk3 VCL.

https://gerrit.libreoffice.org/q/branch:%2522libreoffice-7-3%2522+gtk

In summary:

Steps to Reproduce:
** Configure the following in Gnome Tweaks: Appearance: Legacy Applications: HighContrast
1. Launch Libreoffice Draw or launch it by opening an odg file.
2. Draw a filled shape and observe no fill color is visible due to view operating in black and white mode.
3. Examine the view menu: Color/Grayscale submenu
4. Observe no selected radio button (despite black and white mode actually being active).
5. Select Color
6. Issue resolved for that session.
7. Close LibreOffice draw
8. Launch LibreOffice draw - confirm regression of the setting to no radio button selected and operation in black and white mode.

Similarly, in Calc:
1. Launch Calc
2. Change the background color of a cell to yellow.
3. Observe the cell background color is white.
4. Double-click the cell for modification.
5. Observe the cell background color changes to yellow.
6. Click in another cell.
7. Observe the cell background color that should be yellow again returns to white.

Temporary workarounds:
- Configure the following in Gnome Tweaks: Appearance: Legacy Applications: Adwaita
OR
- Use LO 7.3.4.2 or earlier.
Comment 8 Caolán McNamara 2023-03-29 08:21:29 UTC
Yeah https://cgit.freedesktop.org/libreoffice/core/commit/?id=f90239263fcabec30f04098e17dc1be9f9a928d1 for https://bugs.documentfoundation.org/show_bug.cgi?id=117006 takes the use of the "HighContrast" theme to set the LibreOffice HighContrastMode to on (mozilla did something similar) which I think is a defensible position to take.

Additionally though HighContrastMode follows the Microsoft recommendations for HighContrast, https://learn.microsoft.com/en-us/windows/win32/winauto/high-contrast-parameter which have:

    "Map all colors to a single pair of foreground and background colors. Use the GetSysColor function to determine the appropriate foreground and background colors, using either a combination of COLOR_WINDOWTEXT and COLOR_WINDOW or a combination of COLOR_BTNTEXT and COLOR_BTNFACE. The GetSysColor function returns the colors selected by the user through the Control Panel.
    Omit any bitmapped images that would typically be displayed behind text. Such images are visually distracting to a user who needs high contrast.
    Images that would typically be drawn in multiple colors should be drawn using the foreground and background colors selected for text."

etc, which is also a defensible position to take. Whether the overall combination is what is expected or desired is uncertain.
Comment 9 Uozaki Koen 2023-04-17 08:25:09 UTC
Created attachment 186713 [details]
LibreOffice Draw GTK3 VCL with High Contrast Theme - No View Menu Color Mode Active

Caolán:

I agree, hiding the background color in a cell in order to achieve high contrast is a defensible position in the event that high contrast mode was expected, as you  However, high contrast mode was not expected.

In GTK3, the following option setting does not affect change:
- Accessibility: 'Automatically detect high contrast mode of operating system'

Regardless of the above option being unchecked, LibreOffice in GTK3 VCL listens to the operating system "Legacy Application" theme setting.

Additionally, the following issue contrasts Microsoft guidelines for Radio Buttons: https://learn.microsoft.com/en-us/windows/win32/uxguide/ctrl-radio-buttons

- Draw: Examine the view menu: Color/Grayscale submenu: Observe no selected mode/radio button despite black and white mode or some variant of it (high contrast) actually being active.
  - See attached screenshot of this issue.
Comment 10 MilesMorales 2024-01-26 10:31:30 UTC Comment hidden (spam)