Topic: Theming VLC and other Qt4 applications under Openbox

Due to an earlier forum thread on a related subject, I have spent a little bit of time experimenting with ways in which to theme VLC so that it sits nicely with the default CrunchBang GTK+ theme. The image below shows the result of my experimentation:

http://crunchbanglinux.org/wiki/_media/screenshots/vlc-crunchbang-theme.png?w=350&h=&cache=cache

If any of the following is obvious to you, I apologise. I have never really used KDE for any length of time and my knowledge of Qt is somewhat limited. Anyhow, the above was achieved by running qtconfig-qt4, a basic Qt4 style editor, and tinkering about with some of the colours. The output of qtconfig-qt4 is saved as ~/.config/Trolltech.conf and it appears to be the only file that defines Qt4 themes/styles under CrunchBang Linux 8.10.01.

Below are the contents of ~/.config/Trolltech.conf on my system. I am sure the styling I have applied can be improved upon, but if you would like to theme your Qt4 apps in a similar manner, you should be able to simply copy what is below into your existing Trolltech.conf file, or create a new one.

[Qt%20Plugin%20Cache%204.4.false]
usr\lib\qt4\plugins\inputmethods\libqimsw-multi.so=40403, 0, i686 Linux g++-4 full-config, 2008-10-03T21:02:22
usr\lib\qt4\plugins\imageformats\libqgif.so=40403, 0, i686 Linux g++-4 full-config, 2008-10-03T21:02:22
usr\lib\qt4\plugins\imageformats\libqico.so=40403, 0, i686 Linux g++-4 full-config, 2008-10-03T21:02:22
usr\lib\qt4\plugins\imageformats\libqjpeg.so=40403, 0, i686 Linux g++-4 full-config, 2008-10-03T21:02:22
usr\lib\qt4\plugins\imageformats\libqmng.so=40403, 0, i686 Linux g++-4 full-config, 2008-10-03T21:02:22
usr\lib\qt4\plugins\imageformats\libqtiff.so=40403, 0, i686 Linux g++-4 full-config, 2008-10-03T21:02:22

[Qt%20Factory%20Cache%204.4]
com.trolltech.Qt.QInputContextFactoryInterface%3A\usr\lib\qt4\plugins\inputmethods\libqimsw-multi.so=2008-10-03T21:02:22, imsw-multi
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqgif.so=2008-10-03T21:02:22, gif
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqico.so=2008-10-03T21:02:22, ico
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqjpeg.so=2008-10-03T21:02:22, jpeg, jpg
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqmng.so=2008-10-03T21:02:22, mng
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqtiff.so=2008-10-03T21:02:22, tiff, tif

[Qt]
customColors\0=4280690214
customColors\1=4284374622
customColors\2=4294967295
customColors\3=4280690214
customColors\4=4294967295
customColors\5=4294967295
customColors\6=4294967295
customColors\7=4294967295
customColors\8=4294967295
customColors\9=4294967295
customColors\10=4294967295
customColors\11=4294967295
customColors\12=4294967295
customColors\13=4294967295
customColors\14=4294967295
customColors\15=4294967295
font="Sans Serif,9,-1,5,50,0,0,0,0,0"
Palette\active=#d1d1d1, #5e5e5e, #8d8d8d, #757575, #2f2f2f, #3e3e3e, #ffffff, #ffffff, #ffffff, #5e5e5e, #5e5e5e, #000000, #262626, #ffffff, #0000ee, #52188b, #e8e8e8, #000000, #ffffdc, #000000
Palette\inactive=#d1d1d1, #5e5e5e, #8d8d8d, #6c6c6c, #2f2f2f, #3e3e3e, #ffffff, #ffffff, #ffffff, #5e5e5e, #5e5e5e, #000000, #262626, #ffffff, #0000ee, #52188b, #e8e8e8, #000000, #ffffdc, #000000
Palette\disabled=#808080, #5e5e5e, #8d8d8d, #6c6c6c, #2f2f2f, #3e3e3e, #808080, #ffffff, #808080, #5e5e5e, #5e5e5e, #000000, #262626, #808080, #0000ee, #52188b, #e8e8e8, #000000, #ffffdc, #000000
fontPath=@Invalid()
embedFonts=true
style=Plastique
doubleClickInterval=400
cursorFlashTime=1000
wheelScrollLines=3
resolveSymlinks=false
globalStrut\width=0
globalStrut\height=0
useRtlExtensions=false
XIMInputStyle=On The Spot
audiosink=Auto
videomode=Auto
GUIEffects=none
Font%20Substitutions\arial=helvetica
Font%20Substitutions\courier%20new=courier
Font%20Substitutions\sans%20serif=helvetica
Font%20Substitutions\times%20new%20roman=times
filedialog="@ByteArray(\0\0\0\xbe\0\0\0\x3\0\0\0\x1e\0\0\0\xff\0\0\0\0\0\0\0\x2\0\0\0^\0\0\x1x\x1\0\0\0\x6\x1\0\0\0\x1\0\0\0\x2\0\0\0\x5\x66ile:\0\0\0\x18\x66ile:///home/corenominal\0\0\0\x1\0\0\0\x32\0/\0h\0o\0m\0\x65\0/\0\x63\0o\0r\0\x65\0n\0o\0m\0i\0n\0\x61\0l\0/\0\x44\0r\0o\0p\0\x62\0o\0x\0\0\0\x32\0/\0h\0o\0m\0\x65\0/\0\x63\0o\0r\0\x65\0n\0o\0m\0i\0n\0\x61\0l\0/\0\x44\0r\0o\0p\0\x62\0o\0x\0\0\0~\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1\xc3\0\0\0\x4\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\0\xea\0\0\0\x1\0\0\0\0\0\0\0:\0\0\0\x1\0\0\0\0\0\0\0;\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x1)"

Also, if you have not done so already, you might want to install VLC. It really should have been included in CrunchBang 8.10.01 by default. VLC rocks!

sudo apt-get install vlc-nox vlc

Notes:

  • This should affect styling of all Qt4 applications, including Skype.

  • Did I mention that the above styling can almost certainly be improved upon? Please feel free to have go wink

Re: Theming VLC and other Qt4 applications under Openbox

Yes! Finally I can make my VLC fit in with the rest of #!. big_smile

Re: Theming VLC and other Qt4 applications under Openbox

Thanks for your work on this. Wonderful to have vlc themed closer to #!

My web activities: Twitter | Identi.ca | Facebook | Blog

Re: Theming VLC and other Qt4 applications under Openbox

I am new to this Qt stuff as well...just want to add a few things...

- After some tinkering around with the qgtkstyle stuff (adding qgtkstyle from a Lauchpad PPA)...I noticed that if you run qtconfig-qt4 from the command line, the gtk style will not stick.  I had to run qtconfig-qt4 using the 'run' in the menu and then select gtk.  It seems to make a difference in the colors, buttons, slider and lower right corner, etc.  It seems as though VLC picked up the default CrunchBang theme.

VLC/Skype example from my previous post to compare:

http://img20.imageshack.us/img20/6599/qgtkstyletg3.png

- I also wanted to mention something about Skype...after doing a little research (skype dev zone), it seems Skype is hard coded to use cleanlooks.  Alt+F2 (Run):

skype --disable-cleanlooks

- Maybe if someone is good at compiling and so on, qgtkstyle could be packaged for CrunchBang?

;)

Edit:
1. -style GTK not needed for Skype
2. skype --disable-cleanlooks only has to be run once
3. qgtkstyle - 858-0ubuntu0 (Intrepid) - https://launchpad.net/~martin-espinoza/+archive

Last edited by swj (2008-12-07 01:44:31)

Re: Theming VLC and other Qt4 applications under Openbox

I knew my attempt could be improved upon! smile Thank you swj, I will checkout some qgtkstyle packages as soon as I get chance.

Re: Theming VLC and other Qt4 applications under Openbox

I have a few KDE apps I need to style (the text is huge, and I only have a small screen!), but any changes I make in qtconfig-qt4 don't alter the slightest thing on the actual apps.

FYI, I'm using Kate and KolourPaint, both KDE4, if that makes any odds...

EDIT: I think that may be a factor. I just installed KeePassX, and it launched using my garish KDE colour scheme (and no window border controls!).

Still confused... hmm

Last edited by Foomandoonian (2008-12-21 03:23:59)

foomandoonian's tumblelog & twitter

Re: Theming VLC and other Qt4 applications under Openbox

Foomandoonian wrote:

I have a few KDE apps I need to style (the text is huge, and I only have a small screen!), but any changes I make in qtconfig-qt4 don't alter the slightest thing on the actual apps.

FYI, I'm using Kate and KolourPaint, both KDE4, if that makes any odds...

EDIT: I think that may be a factor. I just installed KeePassX, and it launched using my garish KDE colour scheme (and no window border controls!).

Still confused... hmm

1. Are you using qgtkstyle?
2. Are you running qtconfig-qt4 from command line or 'run'?

See my post above.

Re: Theming VLC and other Qt4 applications under Openbox

swj wrote:

1. Are you using qgtkstyle?
2. Are you running qtconfig-qt4 from command line or 'run'?

See my post above.

I did read your post, but I couldn't figure out what to do. I ran qtconfig-qt4 from the Alt-F3 menu. I couldn't see any options to choose a 'gtkstyle' anything. The changes I made *have* affected one KDE application, but not two others.

I'm sure I'm missing something obvious. hmm

foomandoonian's tumblelog & twitter

Re: Theming VLC and other Qt4 applications under Openbox

Foomandoonian wrote:
swj wrote:

1. Are you using qgtkstyle?
2. Are you running qtconfig-qt4 from command line or 'run'?

See my post above.

I did read your post, but I couldn't figure out what to do. I ran qtconfig-qt4 from the Alt-F3 menu. I couldn't see any options to choose a 'gtkstyle' anything. The changes I made *have* affected one KDE application, but not two others.

I'm sure I'm missing something obvious. hmm

I'm kind of confused now. wink  Did you install the following (qgtkstyle package) from this PPA or another source?

qgtkstyle - 858-0ubuntu0 (Intrepid) - https://launchpad.net/~martin-espinoza/+archive

Once you do that...

Run qtconfig-qt4 and choose GTK and apply.

This is an article (optional) if your interested:

http://arstechnica.com/journals/linux.a … with-gnome

Last edited by swj (2008-12-21 18:31:02)

Re: Theming VLC and other Qt4 applications under Openbox

Ah, I see the problem! 'adding qgtkstyle from a Lauchpad PPA' was three different things I didn't understand. roll The Ars article clarified that, so thanks.

The good news is that KeePassX now looks more like a native app. The bad news is that it is still behaving oddly. Also, Kate and KolourPaint haven't changed at all.

http://dl.getdropbox.com/u/334785/kde_lack_of_style.png

foomandoonian's tumblelog & twitter

11

Re: Theming VLC and other Qt4 applications under Openbox

Foomandoonian wrote:

Ah, I see the problem! 'adding qgtkstyle from a Lauchpad PPA' was three different things I didn't understand. roll The Ars article clarified that, so thanks.

The good news is that KeePassX now looks more like a native app. The bad news is that it is still behaving oddly. Also, Kate and KolourPaint haven't changed at all.

http://dl.getdropbox.com/u/334785/kde_lack_of_style.png


Are the above application(s) Qt3 or Qt4 applications?

Edit: Nice Wallpaper! Reminds me of the more you know with little rainbow. wink

http://www.themoreyouknow.com/Internet_Safety/

Last edited by swj (2008-12-23 05:44:58)

Re: Theming VLC and other Qt4 applications under Openbox

I just got round to setting this up. Thanks corenominal smile

Re: Theming VLC and other Qt4 applications under Openbox

swj wrote:

Are the above application(s) Qt3 or Qt4 applications?

I figured it may be something to do with that. Honestly, I don't know! How can I find out?

foomandoonian's tumblelog & twitter

Re: Theming VLC and other Qt4 applications under Openbox

Foomandoonian wrote:

I figured it may be something to do with that. Honestly, I don't know! How can I find out?

Check the about KDE option, if its KDE 3.5 then its QT3, if its KDE 4 then its QT4. I'm sure you could use some proggie to look at the linked libs for the application but I cant remember the commands for that smile

Re: Theming VLC and other Qt4 applications under Openbox

KolourPaint and Kate are both KDE 4. They're the ones I'm having problems with.

(I'm starting to wonder if KeePassX is even KDE?)

EDIT: I just tried out the screencaster app, and used it to demo the problem I am having with KeePassX. If you're interested, the video is here: http://dl.getdropbox.com/u/334785/scree … roblem.ogv smile

Last edited by Foomandoonian (2008-12-23 15:09:07)

foomandoonian's tumblelog & twitter

16

Re: Theming VLC and other Qt4 applications under Openbox

Foomandoonian wrote:

KolourPaint and Kate are both KDE 4. They're the ones I'm having problems with.

(I'm starting to wonder if KeePassX is even KDE?)

EDIT: I just tried out the screencaster app, and used it to demo the problem I am having with KeePassX. If you're interested, the video is here: http://dl.getdropbox.com/u/334785/scree … roblem.ogv smile

Looks as though KeePassX does require Qt library >= 4.3
http://www.keepassx.org/requirements

Also, have you ever checked out Revelation Password Manager, http://oss.codepoet.no/revelation/?  This application is GTK, though I am not sure how it compares to KeePassX.

Not real sure about the other two apps...I'll install Kate and KolourPaint later and take a look...

Last edited by swj (2008-12-23 18:42:41)

Re: Theming VLC and other Qt4 applications under Openbox

swj wrote:

Also, have you ever checked out Revelation Password Manager, http://oss.codepoet.no/revelation/?  This application is GTK, though I am not sure how it compares to KeePassX.

KeePass has one great positive; cross platform support. It's a shame really, KeePass for Windows is rock solid but KeePassX is a little less stable. I had an issue for about 3 months where the OSX version couldn't open my DB without segfaulting roll

18

Re: Theming VLC and other Qt4 applications under Openbox

Foomandoonian, I know this is not a solution to your initial question, but have you checked out mtpaint (GTK appl) as an alternative to Kolourpaint?

http://mtpaint.sourceforge.net/

Last edited by swj (2008-12-24 14:40:23)

Re: Theming VLC and other Qt4 applications under Openbox

swj wrote:

Foomandoonian, I know this is not a solution to your initial question, but have you checked out mtpaint (GTK appl) as an alternative to Kolourpaint?

http://mtpaint.sourceforge.net/

Hmm, well, mtpaint seems to be more powerful but less elegant than KolourPaint. I'll give it a proper test drive. Thanks! If nothing else, I love finding new useful graphics apps. big_smile

I'll give Revelation a look, but it's nice to have a cross platform password manager.

foomandoonian's tumblelog & twitter

20

Re: Theming VLC and other Qt4 applications under Openbox

Foomandoonian wrote:
swj wrote:

Foomandoonian, I know this is not a solution to your initial question, but have you checked out mtpaint (GTK appl) as an alternative to Kolourpaint?

http://mtpaint.sourceforge.net/

Hmm, well, mtpaint seems to be more powerful but less elegant than KolourPaint. I'll give it a proper test drive. Thanks! If nothing else, I love finding new useful graphics apps. big_smile

I'll give Revelation a look, but it's nice to have a cross platform password manager.

I agree mtpaint could use an interface upgrade.  In any case, I see that your actively colouring with something as your Foomandoonian is back in colour again! tongue

Re: Theming VLC and other Qt4 applications under Openbox

corenominal wrote:

http://crunchbanglinux.org/wiki/_media/screenshots/vlc-crunchbang-theme.png?w=350&h=&cache=cache

How did you get VLC to play with video and controls in the same window?

Thanks for any help you might be able to give me on this one

B

Re: Theming VLC and other Qt4 applications under Openbox

If you're using CrunchBang 9.04, you'll need to update your VLC:

https://launchpad.net/~c-korn/+archive/vlc

Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Re: Theming VLC and other Qt4 applications under Openbox

Thanks for your reply.

When I added these repos and updated, it replaced a load of packages and REMOVED the vlc package.

When I try to reinstall I get these errors:

The following packages have unmet dependencies.
  vlc: Depends: libqtcore4 (>= 4.5.1) but 4.5.0-0ubuntu4.3 is to be installed
       Depends: libqtgui4 (>= 4.5.1) but 4.5.0-0ubuntu4.3 is to be installed
E: Broken packages


Do I need to revert to a previous version of those two packages? How do I do that? Will it effect other progs?

Thank you

Brian

Re: Theming VLC and other Qt4 applications under Openbox

Open Synaptic and go to Settings > Preferences > Distribution >  Mark the option "Prefer versions from jaunty". Click Apply, click reload on the main toolbar, THEN try upgrading VLC again.

Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Re: Theming VLC and other Qt4 applications under Openbox

That worked, thanks alot! big_smile

much better now