Sunday, July 8, 2012

HOWTO: Make your QT Applications Blend In

Since Bodhi Linux includes GTK applications by default, you will find they have a fairly neutral tone that blends fairly well with the rest of the system. Beyond this Enlightenment has a built in tool for changing the look of GTK applications.

What is a person to do though when they install VLC or some other QT application for the first time and it looks like this:


First off - don't panic! It is a fairly simple/quick fix to get your QT applications to blend in with the rest of your desktop. You first simply need to install the QT theme manager - on Debian based systems such as Bodhi this can be done from the command line via:

sudo apt-get install qt4-qtconfig

Once this package is installed a new option should appear in your menu under "Preferences" labeled "Qt 4 Settings". Launching this will present you with a window the looks something like this:


Only your "GUI Style" will be something other "GTK+" by default. To change this simply select "GTK+" from the drop down menu and then close the settings manager.

You should now be all set with nicer looking QT applications:


Cheers,
~Jeff Hoogland

13 comments:

  1. Couldn't this be made default?

    ReplyDelete
    Replies
    1. We don't ship QT applications by default so there is no reason to clutter up the base install with QT things such as this configuration tool. A good deal of users don't need or want them.

      Delete
  2. Install the configuration by default, not the tool.

    ReplyDelete
    Replies
    1. If you know a method of setting this configuration by default without installing any QT applications I would be open to it. I do not know of one.

      Delete
    2. Well Jeff, do a differential analysis of the files installed...

      Delete
    3. If it is that simple Ruurd please go ahead and do this and let us know what you figure out. I'm managing several releases right now plus my normal job/school. Don't really have time to be tracking down something of this low priority.

      Delete
    4. First create a file called Trolltech.conf and put in it the following:

      [Qt]
      style=GTK+

      then put the file by default in the Ubuntu CD in "/etc/skel/.config/"

      This way, the configuration is installed by default in only a few bytes, and all Qt apps will look like the rest of Ubuntu for every user.

      -Bamm

      Delete
  3. Thanks a lot Jeff, this was one of the reasons I didn't use VLC on Bodhi (I was too lazy to search for a way)

    ReplyDelete
  4. VLC allready have this option even without that style manager in Tools>preferences>Interface Settings>Force window style. Then just pick GTK. DONE
    no need for the extra packages or engines.

    ReplyDelete
  5. Hi

    In order to get decent font rendering you will need to write your own ~/.fonts.conf XML file:

    Source: http://forums.debian.net/viewtopic.php?f=6&t=48379

    Version: Bodhi Linux 2.0 Alpha

    ReplyDelete
  6. Thank you, Jeff. I already searched for a solution like this. I found out that the settings for that qt style preset was written into a configfile in the users home folder. You can add gtk+ style as default for qt to bodhi just by creating a file "/etc/skel/.config/Trolltech.conf" in the bodhi-iso just containing this two lines:

    [Qt]
    style=GTK+

    I don't think that this (uncompressed) 15 additional bytes would blow up the iso image of bodhi too much.

    ReplyDelete
    Replies
    1. Perfect! I am all for adding a simple configuration file to the default CD! This will be in the Bodhi 2.0.0 release for sure.

      Delete
    2. Nice to read that.
      Keep up the good work!

      Delete