![]() WxWidgets 2.9.4 has been officially released. This article might not work a very long time! As posted on the start-page of wxWidgets: To get rid of that, I installed the “Maximus” extension for GnomeShell. Now, I had a black editor and GUI theme, but a white window-titlebar. GTK2_RC_FILES=~/.themes/Elegant-GTK/gtk-2.0/gtkrc codeblocksĪnd now, Code::Blocks is dark. The script looks like this: # It's important to give the path to the "gtkrc"-file here! Or you can copy the file to your home directory and modify it there: cp /usr/share/applications/sktop ~/.local/share/applications/sktop I put the command with the temporary theme in a shell-script and changed the /usr/share/applications/sktop-file to read: Įxec=/home/luke/.codeblocks/start_dark.sh If you set the theme system-wide, you don’t need to do this. Last but not least, I want Code::Blocks to always start with the dark Gtk-2 theme. Code::Blocks should now have a dark look. This temporarily sets the environment-variable GTK2_RC_FILES to the theme-path, for the start of application (in our case codeblocks). After some research, I stumbled across a Blog-post, where I found the following method: GTK2_RC_FILES=/path/to/your/theme/gtkrc application Now, to get Code::Blocks to use the theme, you have two options: Make it the default Gtk-2 theme or tell Code::Blocks to explicitly use the theme-files you downloaded. I then manually copied the theme itself over to ~/.themes/ and it’s icon-theme to ~/.icons/. So, I went over to and searched for a good, dark Gtk-2 theme and found “ Elegant Gnome” to be a good match. (From the “Eye of Gnome”-source, main.c line 175) "gtk-application-prefer-dark-theme", TRUE, NULL This does however not affect Gtk-2 applications (like Code::Blocks).Īlso, Gtk-3 applications can decide to not use the dark theme or to always use it (like Eye of Gnome): GtkSettings *settings = gtk_settings_get_default () That is important, because the way themes work has slightly changed between those versions.įor applications which use Gtk-3, Gnome 3 offers a gtk-application-prefer-dark-theme-entry in it’s settings.ini-file, which tells all Gtk-3 apps to use the dark version of the currently set theme (if available, for example the Gnome 3 default-theme, “Adwaita”). Now, the wxGTK port is not completely up to date, so it doesn’t use Gtk-3, but the (older) Gtk-2. ![]() So, on Linux, Code::Blocks uses Gtk for it’s GUI. So, to get a dark theme in Code::Blocks, you need a dark-theme for the whole desktop environment? Yes and no.Ĭode::Blocks for Linux is explicitly created with the wxGTK port, meaning that the wxWidgets API is wrapped around the Gtk API. ![]() This is equivalent to whatever the desktop environment thinks is right. That is due to the fact that (for portability) Code::Blocks GUI is build using wxWidgets, which offers a “native look & feel on every platform”. All credits go to original finder of the workaround. I will now reproduce it here, in case the link disappears. I found an answer at the following link: įor me, a Linux Mint user, the system-wide version didn't work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |