LO theme in ubuntu gnome 22.0.1 dark mode

Hi all,

In ubuntu 22.04.1 (vanilla/gnome) Libreoffice’s top menus are very difficult to read when using dark mode because they also become dark. If I change to a lighter LO theme (Tools>Options>Personalization) when using Gnome’s dark mode LO’s menu buttons become unreadable (white letters over a light background). I searched online and it appears to be an issue with gnome 42.

No matter what LO themes I try the issue persists. Menus can be perfectly read when using Gnome’s light mode.

This happens in a new installation of ubuntu 22.04.1.

However, on another laptop, I upgraded from ubuntu gnome 20.04.5 to 22.04.1 and LO kept the default theme that came with ubuntu 20.04, which is perfectly functional in Gnome’s dark mode. I assume that this is something leftover from 20.04 that didn’t upgrade correctly (from Ubuntu’s point of view) but it keeps me productive when using LO.

I played around with the settings in LO Tools>Options, and compared both installations, but could find no way to make LO’s menus readable/easy to read in the new installation Ubuntu 22.04.1 when using Gnome’s dark mode. Using the same settings in “View”, “Personalization”, and “Application Colors”, the two installations present me with different menu colors in the two machines (dark and difficult to read menus in the new installation, whereas they remain the default grey that came in ubuntu 20.04 in the upgraded computer).

So, my question is how can I find what is causing LO’s theme to be held back to its ubuntu 20.04 default so that I can try to replicate it in the machine that has a new installation of ubuntu 22.04.1? I don’t even know if this is possible, but any help would be appreciated.

If the answer is just “it’s a Gnome 42 thing”, ok, I can change to light mode when using LO, but it’s not ideal.

I can post screenshots or provide more info if it helps.

If mods think that I should be asking this in an ubuntu forum instead, I’ll understand.

Thanks for your time.

Same configuration here, but I don’t have any problems with it. I played with some of the themes (Tools - Options - LibreOffice - View) and noticed that Yaru and its variants are somewhat out of focus, while the others - Galaxy, Oxygen and the default Breeze - look perfectly fine to me, as long as you don’t set the background color to white.

Hi floris_v

Thanks for the comment.

Some screenshots might make my issue clearer. Since I’m a new user of this forum and can only attach 1 file per post, it will take a few posts to show all screenshots (I hope this is fine).

This is what LO Writer looks like in the laptop I upgraded from 20.04 to 22.04 in Gnome’s dark mode mode (default theme that came with ubuntu 20.04 and was automatically kept when I upgraded):

This is what LO Writer looks like in the laptop I upgraded from 20.04 to 22.04 in Gnome’s light mode mode:

Changing from light to dark mode in Gnome 42 (or vice-versa) only changes the top bar (the one with the document’s name).

Below is what LO Writer looks like in the laptop with a fresh install of ubuntu 22.04 in dark mode. It’s almost the default ubuntu 22.04 look (I only changed the icons to from yaru to colibre and the size of the toolbar and notebookbar to small).

This is what LO Writer looks like in the laptop with a fresh install of ubuntu 22.04 in light mode.

In the laptop with a new install of ubuntu 22.04.1, switching between light and dark mode in Gnome changes not only the top bar (with the document’s name) but also the notebookbar and toolbar. This is what I don’t like since I need those to be in light color to see them properly while working in documents.

I know I can change the notebookbar and toolbar colors in Tools>Options>LibreOffice>Personalization but all my attempts have had bad visual outcomes. For example, using a grey LO theme in Gnome’s dark mode:

I have tried a few different icons themes (yaru, colibre, breeze, and elementary) but it’s never much better than this.

Best regards.

Your third looks pretty much like mine, and I’m fine with it. So, sorry if I’m blunt: what’s the problem for you?

I find it much more difficult to see icons and words in the toolbar and notebookbar if they have a dark/black background. My eyesight isn’t terrible, but it’s also not the best, and I take a fraction of a second more each time I need to click something in those bars (even simple things like changing spacing between lines or saving a documents, for which I have some muscle memory).

This is likely associated with the fact that both my laptops have small 1366x768 12,5’’ displays with dull colors, but I can work fine with light-colored toolbars/menus.

Strangely, I find an overall dark theme (in the desktop) is easier on the eyes (both aesthetically and in reducing eye strain), but I need my word processor to be in a lighter theme (like it happened before in ubuntu 20.04) to be productive and reduce eye strain. So, dark theme in the desktop environment + light theme in Writer.

I spend a lot of time in Writer so this is professionally important for me. Alas, if I can’t change it, I’ll just have to switch to Gnome’s light theme when working in Writer.

Best regards.

In this case, change your routine procedure and work with styles instead of direct formatting your document. Your documents have all a common look because you have personal tastes and they are translated into the look of your docs. This look is quite stable.

Consequently, transfer this look into a set of styles (paragraph, character and page). Afterwards, you’ll only need to assign styles to your text. If you want to work exclusively with the keyboard (no hand movement between keyboard and mouse), you can set keyboard shortcuts to your styles, even replacing built-in ones like Ctl+I to mean Emphasis style. Start by customising built-in styles.

From experience, ~10 paragraph styles (~15 if you include the Heading n family), ~5 character styles and a few page styles are largely sufficient for already sophisticated documents.

With consistent styling, you no longer need the toolbars.

1 Like

Thanks @Villeroy

I’m running LO 7.3.5.2, not 7.4. Experimental features are disabled (and enabling/disabling them doesn’t change my issue).

I think my issue is mostly due to how Gnome 42 overall theme is interacting with LO’s theme. This is, however, very much above my knowledge, so, for now, I’ll keep switching between Gnome’s light and dark mode when working with LO.

What I find stranger is how LO’s theme is different between the two installations of Ubuntu 22.04 when having the same options chosen. But I’m assuming that this is just the difference between having a fresh install in one computer and having upgraded in another.

Best regards.

As to hitting buttons on the toolbar, I got used to pressing Ctrl+S to save files, and more keystrokes to execute basic commands. That got into my DNA, so to speak, and I don’t even have to think about it. Remember that messing around with the mouse and toolbars was once invented by people who had to sell advanced software to people without offering them a training to actually use it professionally (and then I also mean at full speed) as apposed to WordPerfect, which was driven by commands hidden under lots of function key strokes. F7 was Close/Quit and, if you insisted on overwriting an existing file, saving.
Meaning to say, if your eyesight isn’t too well (and I don’t blame you), maybe you should learn to use more keystrokes instead of straining your eyes poring over toolbar icons. That’s much faster, too.

Hi @ajlittoz. I hadn’t considered using styles. Thanks for the suggestion.

However, I’m used to having those options in a toolbar. And I do frequently (although not daily) need to change formatting in my documents (e.g. to submit papers to different journals with different author guidelines).

But I’ll look into it.

Best regards.

Thanks @anon87010807. I’ll look into it. Habit is hard to break and I’m used to toolbars.

Best regards.

Using styles is a matter of course when using LibreOffice. LibreOffice without styles makes no sense. Hard formatting (as opposed to styles) makes everything incredibly difficult.

You can do that very easily with styles. It will mean a complete makeover of how you work, but it will also mean a big time saver.

Templates make it very easy. A template is a skeleton document where you store your styles and optionally initial contents. You can then have one template for formatting for the Times, one template for the Chicago Herald, one for the Corriere della Sera, etc. And if you take care, when you need to submit the same article to several recipients, just pasting the formatted text into a fresh document based on the adequate template will reformat everything according to the recipient rules. This trick works with “semantic styling”, i.e. your style names designate the role, significance or semantic value of the paragraph or word, not its appearance. You have the same stylenames in the various templates but their appearance is different. The journal rules are recorded once for all in the templates and you only type your text, just assigning the styles here and there without having to think about formatting (as it is done automatically).

Hi again all. Thank you very much for your kind suggestions and explanations. I don’t know if I’ll adapt to using styles, but you all make a strong case for it and I’ll look into it.

On a side note, this was the first time I asked a question in this forum and I’m very impressed with the community’s willingness to help out others. Thanks.

Hi again,

After searching online a bit more, I found that this is most definitively a Gnome 42 issue and not a LO issue per se (i.e. it’s how Gnome 42 deals with themes for applications).

I managed to achieve what I wanted following these instructions:

In case any Gnome 42 user is in the same situation (i.e. wants to to keep LO in a light theme but use an overall dark theme in Gnome 42) here’s what I did:

  1. go to usr/share/applications;
  2. find libreoffice-writer.desktop;
  3. copy libreoffice-writer.desktop to ~/.local/share/applications;
  4. open (the new) libreoffice-writer.desktop with a text editor;
  5. search for the line Exec=libreoffice --writer %U;
  6. change this line to Exec=env GTK_THEME=Yaru:light libreoffice --writer %U;
  7. save the document.

Done. LO Writer is now in a light theme while Gnome stays in dark mode:

In step 6, “Yaru:light” must be replaced with whatever theme Gnome is using. See the guide in the above URL for more info.

Thank for all the comments and suggestions in this thread.
Best regards.

1 Like