WxWidgets with gtk2 and gtk3 in C++

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
th0gz19
In need of some credit
In need of some credit
Posts: 2
Joined: Mon Oct 21, 2019 8:25 pm

WxWidgets with gtk2 and gtk3 in C++

Post by th0gz19 » Mon Oct 21, 2019 8:32 pm

Hello,

So I just start compiling the sample program included in wxwidgets package in my Debian OS.
I've dealt with this ISSUE before and was able to fix it, however I've left my project a long time ago.
Now I'm coming back, I've tried running the application and it was showing with GTK3 themes.
Made small changes then recompile, there my application starting showing in GTK2 themes that looks old as grandmother.

I'm really pissed off right now cause I couldn't remember what the heck I did back then to make my app show in GTK3.

I think the wx package was compiled with both gtk2 and gtk3, any idea on how to make it select just gtk3 so my application won't look old?

I'm using CMAKE for build system and Debian bullseye as my OS.

th0gz19
In need of some credit
In need of some credit
Posts: 2
Joined: Mon Oct 21, 2019 8:25 pm

Re: WxWidgets with gtk2 and gtk3 in C++

Post by th0gz19 » Mon Oct 21, 2019 8:53 pm

Nevermind. Thanks for accepting mods.

Fixed it with:

Code: Select all

$ sudo update-alternatives --config wx-config
  Selection    Path                                                  Priority   Status
------------------------------------------------------------
 *0            /usr/lib/x86_64-linux-gnu/wx/config/gtk2-unicode-3.0   308       auto mode
  1            /usr/lib/x86_64-linux-gnu/wx/config/base-unicode-3.0   306       manual mode
  2            /usr/lib/x86_64-linux-gnu/wx/config/gtk2-unicode-3.0   308       manual mode
  3            /usr/lib/x86_64-linux-gnu/wx/config/gtk3-unicode-3.0   307       manual mode

Press <enter> to keep the current choice[*], or type selection number: 
Choose number 3 to select

Code: Select all

/usr/lib/x86_64-linux-gnu/wx/config/gtk3-unicode-3
Rerun CMake then build with make.

Post Reply