You are not logged in.

#1 2017-09-08 07:54:57

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,424
Website

[DONE][helium-dev] Add gtk2 theme support for qt5 apps?

(Since this is the development section, I guess there's no need to add a [helium-dev] tag? Added anyway.)

See this discussion: https://forums.bunsenlabs.org/viewtopic.php?id=4033

It looks as if QT5 apps can be made to follow the current GTK2 theme by installing one package and setting an environment variable. Support for svg icons calls for one more package. Both of these packages come from the Debian Stretch repositories - no third-party apps are needed. NB this only works if a GTK2 theme is available.
(I think GTK3 support will come with QT5.8+ ie Debian Buster.)

Install:
qt5-style-plugins
libqt5svg5

Edit the "for qt5 apps" section of ~/.xsessionrc thus:

# for qt5 apps
#export QT_STYLE_OVERRIDE=GTK+
export QT_QPA_PLATFORMTHEME=gtk2

Logout/in, start up a QT5 app such as qupzilla, juffed or kwrite.
Also open lxappearance (menu>preferences>appearance) and try switching the gtk theme or icon theme. The QT5 apps should follow without needing to be restarted, just like GTK apps.

(For some reason the faenza-bunsen icon themes aren't detected (inheritance problem?) but Paper, Papirus and others all seemed OK.)

Head_on_a_Stick has confirmed this works on a debootstrap+bunsen-netinstall Helium-dev system, and I have in a VM (amd64) and a real laptop (i386). Would anyone else like to check that making those additions to a Helium-dev system lets QT5 apps follow the current GTK theme?

Installed size: qt5-style-plugins 1,217.0 kB,  libqt5svg5 464.0 kB
Should we add this to the default Helium install?

Last edited by johnraff (2017-09-13 01:59:16)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#2 2017-09-08 14:56:31

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,401
Website

Re: [DONE][helium-dev] Add gtk2 theme support for qt5 apps?

Besides tiny fonts that I had to enlarge in program settings, it appears it does work with mandelbulber2 (Adapta Nokto)
mandelGTK2-like.th.png

# no xorg.conf
inxi -G
Graphics:  Card: Intel Core Processor Integrated Graphics Controller
           Display Server: X.Org 1.19.2 drivers: modesetting (unloaded: fbdev,vesa)
           Resolution: 1920x1200@59.95hz
           GLX Renderer: Mesa DRI Intel Ironlake Desktop GLX Version: 2.1 Mesa 13.0.6

'Pure' Debian 9.

Last edited by brontosaurusrex (2017-09-08 15:18:05)

Offline

#3 2017-09-08 20:02:09

stevep
MX Linux Developer
Registered: 2016-08-08
Posts: 381

Re: [DONE][helium-dev] Add gtk2 theme support for qt5 apps?

Set it systemwide for all users in /etc/environment per the Manjaro wiki:  https://wiki.manjaro.org/index.php?titl … e_settings

I don't think you need qt5ct if you use lxappearance.  Debian won't package it for reasons, but it's in the antiX 17 beta repo and works in the MX 17 pre-alpha.

Offline

#4 2017-09-09 07:14:57

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,424
Website

Re: [DONE][helium-dev] Add gtk2 theme support for qt5 apps?

brontosaurusrex wrote:

Besides tiny fonts that I had to enlarge in program settings, it appears it does work with mandelbulber2

I noticed no difference in font size between the QT5 apps I tested and the GTK apps, and it was changeable on the fly with lxappearance. In my VM, though, mandelbulber2 is unusable... Maybe not enough RAM? Old graphics hardware? ...sigh...

stevep wrote:

I don't think you need qt5ct if you use lxappearance.

It seems not. I tested a 3rd-party deb of qt5ct and while it allows a lot of tweaks, it would be one more place users have to go when they change themes. lxappearance+qt5-style-plugins allows you to adjust both QT5 and GTK apps together. The environment variable has to be QT_QPA_PLATFORMTHEME=gtk2 though. Since we're already shipping a lot of default user configs I guess it might as well go in ~/.xsessionrc and allow users individual freedom in a multi-user system.

Last edited by johnraff (2017-09-09 07:15:49)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#5 2017-09-10 22:04:38

Naik
Member
From: Lipsia
Registered: 2015-10-03
Posts: 304

Re: [DONE][helium-dev] Add gtk2 theme support for qt5 apps?

^ second that!


"Kaum macht [Mensch]* es richtig, funktioniert es sofort!"
BL-Kitchen on GitHub

Offline

#6 2017-09-13 01:57:51

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,424
Website

Re: [DONE][helium-dev] Add gtk2 theme support for qt5 apps?

This has been provisionally implemented in bunsen-configs and the netinstall package list.

Existing helium-dev users should follow the instructions in the first post to apply this, and please continue to report back if it seems to cause any problems. Thanks!

Last edited by johnraff (2017-09-13 01:58:30)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

Board footer

Powered by FluxBB