Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gtk2 themes don't work on qt5
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
mathway
n00b
n00b


Joined: 03 Jan 2022
Posts: 5

PostPosted: Mon May 09, 2022 11:48 pm    Post subject: gtk2 themes don't work on qt5 Reply with quote

I am running
Code:
dwm
window manager, but I have a need to run QT5 based applications, for example wireshark. Default white Adwaita theme doesn't satisfy me at all, so I tried to set Adwaita-dark theme, for example. Here's what I get: wireshark.jpg.

I've read this article on the arch wiki. For the task of theme interoperability between qt-based applications and gtk based ones, I've tried to set
Code:
QT_QPA_PLATFORMTHEME
environment variable to gtk2. However, it didn't change anything. In order to change theme I've used
Code:
gtk-theme-switch
, which effectively generated this ~/.gtkrc-2.0 file:

Code:

# -- THEME AUTO-WRITTEN BY gtk-theme-switch2 DO NOT EDIT
include "/usr/share/themes/Adwaita-dark/gtk-2.0/gtkrc"

include "/home/mathway/.gtkrc-2.0.mine"

# -- THEME AUTO-WRITTEN BY gtk-theme-switch2 DO NOT EDIT


Moreover, any other gtk2 breaks and doesn't work as in the picture above. I've also tried to use
Code:
qt5ct
, but still the same result.

Also, when choosing default Adwaita theme,
Code:
gtk-theme-switch
looks pretty ok. However, when choosing any other theme, it looks really awkward(button's text is invisible).
Back to top
View user's profile Send private message
r7l
Tux's lil' helper
Tux's lil' helper


Joined: 16 Feb 2019
Posts: 89

PostPosted: Sat Jun 04, 2022 9:07 am    Post subject: Reply with quote

I might not be able to help you with your specific theme but i've finally managed to make Arc Theme look almost the same on GTK and QT and since i've found your post here recently, i wanted to share it.

I've followed the same steps you did. It didn't do much. The key was, finding a KDE theme that looked the same as my GTK theme. So in case of Arc Theme, i've installed arc-kde from beatussum-overlay with kvantum flag set and installed kvantum as well. From that on, i've set the expected theme in kvantummanager and chose kvantum in QT5 Settings.

That finally applied Arc to any of my QT applications.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum