Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arc Darker: Display issues with LibreOffice GTK3 #659

Closed
jbicha opened this issue Sep 28, 2016 · 24 comments
Closed

Arc Darker: Display issues with LibreOffice GTK3 #659

jbicha opened this issue Sep 28, 2016 · 24 comments

Comments

@jbicha
Copy link

jbicha commented Sep 28, 2016

  • arc-themes 20160923-1 as packaged in Ubuntu 16.10 Beta
  • LibreOffice 1:5.2.1~rc2-0ubuntu1 which now defaults to GTK3 in Ubuntu 16.10+
  • gnome-themes-standard 3.20.2-3ubuntu1
  • This screenshot was taken with GTK+ 3.22.0-0ubuntu1~yakkety0 from the GNOME3 Staging PPA although I believe it affects GTK 3.20 also.
  • Arc Darker

There is an unnecessary light colored border around the toolbars and the close icon to the far right of the Help menu is the wrong color.

libreoffice-52-gtk3-arc-darker

@stelariusinfinitek
Copy link

Edit the file at : /etc/profile.d/libreoffice.sh (root needed) and uncomment SAL_USE_VCLPLUGIN=gtk .After this, reboot.

@jbicha
Copy link
Author

jbicha commented Sep 28, 2016

I don't have that file in Ubuntu.

Anyway, LibreOffice is already GTK3 in Ubuntu 16.10 and I don't want to use the GTK2 version.

@stelariusinfinitek
Copy link

Take a look at this : #614

@jbicha
Copy link
Author

jbicha commented Sep 28, 2016

No, I don't want to use GTK2 and no, this bug doesn't affect all themes. Please leave this bug open until the issue is actually fixed. Thanks.

@jbicha jbicha changed the title Display issues with LibreOffice GTK3 Arc Darker: Display issues with LibreOffice GTK3 Sep 28, 2016
@horst3180
Copy link
Owner

horst3180 commented Sep 28, 2016

Which themes are working then? I suppose they all have light toolbars so it doesn't look that horribly out of place. If that's not the case, I'll look into a possible fix.

The real problem here is the LO GTK 3 integration, which is really buggy and incomplete at the moment. Last time I checked this was impossible to fix.

Edit: The toolbars aren't the only problem here, btw. The text- and checkboxes in toolbars should be dark too, but they don't inherit the style (which they do in native GTK applications).

@stelariusinfinitek
Copy link

@jbicha Arc-Darker and Arc-Dark have dark colors, I think you should be fine with Arc (it's brighter). I hate that LibreOffice has this problem but there's still that fix (editing /etc/profile.d/libreoffice-fresh.sh). Can you take a look in /etc/profile/ ? I don't use Ubuntu but I'm sure you will find libreoffice-fresh.sh .

This is how LibreOffice looks for me with SAL_USE_VCLPLUGIN=gtk uncommented (and some more small configs) :

screenshot_2016-09-28_20-22-11

@jbicha
Copy link
Author

jbicha commented Sep 28, 2016

@stelariusinfinitek Reverting to GTK2 isn't really a solution. LibreOffice upstream would really like to kill GTK2 support but there are still some old distros they're supporting.

Here's a screenshot with Numix which also has the close button issue but the toolbars are ok

libreoffice-52-gtk3-numix

And here's a screenshot with Adwaita (GTK 3.22) with the Global Dark Theme option enabled in gnome-tweak-tool:

libreoffice-52-gtk3-adwaita-dark

@horst3180
Copy link
Owner

horst3180 commented Sep 29, 2016

@jbicha Did you read my comment? These themes look ok because the toolbars have the same background-color as the rest of the theme.

I will now explain why this is impossible to fix.

The color of the borders can be changed by changing the background color of the .background CSS style class. Note, that most GTK 3 windows use this style class on their toplevel window.

So, let's see what happens if we change the color to red (because it's easy to see):
1

This also messes up other GTK 3 applications:
2

So the real question is, why are those borders there in the first place? My theme didn't add them, LO did.

It's also impossible to override the toolbar styling only for Libreoffice (lacks unique style classes).

Another solution would be to change the toolbar background color to a light one. However, I don't want that, because it works with every application except LO, so it's clearly a LO bug.

@horst3180
Copy link
Owner

@stelariusinfinitek /etc/profile.d/libreoffice-fresh.sh is distro (Arch Linux?) specific. Adding export SAL_USE_VCLPLUGIN=gtk to /etc/profile should be enough.

@jbicha
Copy link
Author

jbicha commented Oct 4, 2016

@bjoernmichaelsen Pinging you since you were working on LO GTK3 theming recently

@horst3180
Copy link
Owner

I searched a bit and found this patch: https://git.launchpad.net/~libreoffice/ubuntu/+source/libreoffice/tree/patches/gtk3-toolbar-styleclass.diff?h=ubuntu-yakkety-5.2
I think I could fix this at least on Ubuntu with this patch.

@jbicha
Copy link
Author

jbicha commented Oct 4, 2016

@horst3180 Thanks. That patch is applied to LO in Ubuntu 16.10 Beta

Ubuntu GNOME:
http://cdimage.ubuntu.com/ubuntu-gnome/daily-live/current/

Ubuntu (Unity):
http://cdimage.ubuntu.com/daily-live/current/

@bjoernmichaelsen Is it possible to get that commit into LO 5.2.3?

@horst3180
Copy link
Owner

@jbicha Would you be willing to test the theme the with the changes I made in the libreoffice_toolbar_fix branch? I didn't test it at all, so it might still be broken. Also, it's still impossible to fix the close button.

I can't download the Ubuntu iso right now, because I'm on a slow connection.

@jbicha
Copy link
Author

jbicha commented Oct 5, 2016

Looks good to me. Thanks!

libreoffice-52-gtk3-numix-20161004

@horst3180
Copy link
Owner

Okay, I pushed to commit to master.

@bjoernmichaelsen
Copy link

@bjoernmichaelsen Is it possible to get that commit into LO 5.2.3?

To get this into the libreoffice-5-2 branch at TDF, this would first need to go to the master branch at TDF -- which looks quite different by now already IIRC.

IMHO: dont bother with upstreaming the patch for 5.2, keep it a vendor patch there. But get a fix for on the rather different LibreOffice master instead for LibreOffice 5.3 onwards.

@jbicha
Copy link
Author

jbicha commented Oct 6, 2016

@bjoernmichaelsen Really? Because the Ubuntu patch is literally a one-line addition…

The next version of Debian will ship LO 5.2 but will not ship LO 5.3. René could cherry-pick the patch but I don't understand why Ubuntu should be the only distro to have mixed-light-dark themes like Arc Darker or Ambiance look adequate with LO GTK3 5.2 when the fix looks so simple with no regression potential.

Debian unstable already has this fixed version of Arc Darker in its repositories; the only thing missing is that one line in LO…

@bjoernmichaelsen
Copy link

@jbicha Well, my point is: No upstream fixes on a release branch that arent on the master branch yet. And master is very different in the affected area, so it might not be a one-line patch anymore.

@jonas-sk
Copy link

Even with the latest version of the Arc theme directly pulled from master, I am still unfortunately experiencing the bug. LibreOffice version 5.1.5.2 on Fedora 24

@jbicha
Copy link
Author

jbicha commented Oct 15, 2016

@Quanttek yes, this currently only works with Ubuntu. You can ask your distro if they'd be willing to include

https://git.launchpad.net/~libreoffice/ubuntu/+source/libreoffice/tree/patches/gtk3-toolbar-styleclass.diff?h=ubuntu-yakkety-5.2

@jonas-sk
Copy link

@jbicha What do you mean? Unfortunately I would have to register to see the content of your link. I assummed this commit fixes it – reardless of distro. Or do I need a special patch for LibreOffice (looking at the URL itself)?

@jbicha
Copy link
Author

jbicha commented Oct 20, 2016

@Quanttek Your distro needs to patch LibreOffice for the Arc Darker commit to work. Here's a copy so you don't have to deal with git.launchpad.net . That patch was for the 5.2 series; I don't know if it will work with 5.1.

@jonas-sk
Copy link

jonas-sk commented Nov 7, 2016

@jbicha Thank you! I will message the devs of Fedora 24 then

@fitojb
Copy link

fitojb commented Jan 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants