View previous topic :: View next topic |
Author |
Message |
Cossins Veteran
Joined: 21 Mar 2003 Posts: 1136 Location: Copenhagen, Denmark
|
Posted: Sun Jan 04, 2004 7:11 pm Post subject: Unified Qt/GTK2-themer! |
|
|
http://www.kde-look.org/content/show.php?content=9714
This is a theme for GTK2 which paints the widgets using Qt!
This means that KDE/Qt and Gnome/GTK2 apps look exactly (almost) the same, regardless of the theme.
If you shouldn't have realized it, this is great news!
- Simon _________________ who cares |
|
Back to top |
|
|
Cossins Veteran
Joined: 21 Mar 2003 Posts: 1136 Location: Copenhagen, Denmark
|
Posted: Sun Jan 04, 2004 7:35 pm Post subject: |
|
|
Oh, and I forgot to mention: I had to tinker with the Makefile.am to make it compile.
Here's how I made it work: (Qt 3.2.x from KDE CVS, GTK+ 2.2.4)
- Changed QTDIR to /usr/qt/3
- Changed -lqt-mt to -lqt in libqtengine_la_LDFLAGS
Do the above before running configure and make, and your set!
Also, to make GTK+2 register the theme, I ran configure this way:
Code: | # ./configure --prefix=`gtk-config --prefix` |
If you don't do that, the engine will be installed at a wrong location.
Have fun!
- Simon _________________ who cares |
|
Back to top |
|
|
shm Advocate
Joined: 09 Dec 2002 Posts: 2380 Location: Atlanta, Universe
|
Posted: Sun Jan 04, 2004 10:46 pm Post subject: |
|
|
totally elite. _________________ what up |
|
Back to top |
|
|
shm Advocate
Joined: 09 Dec 2002 Posts: 2380 Location: Atlanta, Universe
|
Posted: Sun Jan 04, 2004 11:01 pm Post subject: |
|
|
I got it to work by editing the Makefile itself, just changing the QTDIR.. editing the Makefile.am didn't work :/
buggy, but *extremely impressive* _________________ what up |
|
Back to top |
|
|
RedBeard0531 Guru
Joined: 21 Sep 2002 Posts: 415 Location: maryland
|
Posted: Mon Jan 05, 2004 1:21 am Post subject: |
|
|
oooo, plasik, in gtk apps, yummy!!!
I want crystal too
since qt rendering is faster than gtk, after som optimisation will this be faster thn native gtk, or will it be as slow as both combined? _________________ OH MY GOD! Kenny just killed Kenny!
That Basterd! |
|
Back to top |
|
|
Cossins Veteran
Joined: 21 Mar 2003 Posts: 1136 Location: Copenhagen, Denmark
|
Posted: Mon Jan 05, 2004 12:10 pm Post subject: |
|
|
RedBeard0531 wrote: | oooo, plasik, in gtk apps, yummy!!!
I want crystal too
since qt rendering is faster than gtk, after som optimisation will this be faster thn native gtk, or will it be as slow as both combined? |
It will always be a little slower than native GTK theming. That's because it has to do both simple GTK theming and Qt rendering.
- Simon _________________ who cares |
|
Back to top |
|
|
tactless l33t
Joined: 14 Jul 2002 Posts: 642 Location: Mitzpe Adi, Israel
|
Posted: Mon Jan 05, 2004 12:16 pm Post subject: |
|
|
My idea of the future of toolkits: Multiple toolkits going through a single renderer (of your choice). For example, the developer will be able to write his application in toolkit 1 (because it's simpler to write for), toolkit 2 (because it works in plain C) or toolkit 3 (because it has really slick perl bindings) - all of which would go through some sort of standardized rendering protocol to the rendering engine of your choice: Engine 1 (because it was installed by default), engine 2 (because it's way faster, albeit ugly), or engine 3 (because it's 3D, man! )
In any case, this is a cool step in the right direction, although I imagine it might be faster the other way around... A QT theme that renders GTK+-2 themes. Ebuild? _________________ Tactless
"If it wasn't for fog, the world would run at a really crappy framerate."
Jabber: tactless@amessage.info |
|
Back to top |
|
|
shm Advocate
Joined: 09 Dec 2002 Posts: 2380 Location: Atlanta, Universe
|
Posted: Mon Jan 05, 2004 1:09 pm Post subject: |
|
|
Cossins wrote: | It will always be a little slower than native GTK theming. That's because it has to do both simple GTK theming and Qt rendering. |
Not really.. it'll be pretty much as fast as Qt's theming speed. How this engine works is it makes Qt draw the widget into a offscreen pixmap (the Qt side of it, which may or may not be expensive), and then simply blits it into the screen (the gtk side of the engine, which is extremely cheap)
Note that other OS's work similarly.. WindowsXP's uxtheme.dll and MacOS 8.1/8.5->9.x->OSX 10.x's Appearance Manager. _________________ what up |
|
Back to top |
|
|
lurid Guru
Joined: 12 Mar 2003 Posts: 595 Location: Florida
|
Posted: Mon Jan 05, 2004 3:05 pm Post subject: |
|
|
Damnit, someone beat me to it! I knew I should have finished this before bed. :P Anyway, this engine actually does work quite nicely. My GTK apps are happily using my KDE theme (baghira) with no problems at all.
Here is my ebuild. Aside from using Portage, this also patches up the Makefile to reflect where Gentoo installs Qt since the authors ./configure doesn't check for that. Just unpack in your overlay dir, emerge it, then open gnome-theme-manager and under Controls select Qt. Suddenly, all your GTK apps will look like your KDE ones! Its magic!
Note: The files in this build are comming off my personal server, which may or may not be able to deal with a lot of users downloading from it. The files are very small (164k total) so I think it'll work ok, if not, be patient. I have to use my server (for now) because Portage doesn't seem to care for KDE-Look's php based download urls much. _________________ Go find a cheerleader and saw her legs off. - Nny |
|
Back to top |
|
|
Cossins Veteran
Joined: 21 Mar 2003 Posts: 1136 Location: Copenhagen, Denmark
|
Posted: Mon Jan 05, 2004 3:15 pm Post subject: |
|
|
Great!
In order to apply the theme without installing Gnome (), put this in ~/.gtkrc-2.0:
Code: | gtk-theme-name = "Qt" |
To change the fonts in GTK2, put this in the same file:
Code: | style "yourstylename"
{
font_name = "YourFont Size"
}
widget_class "*" style "yourstylename" |
The font_name property is the font name and the size, with one space between them. Mine looks like this: "Luxi Sans 8"
- Simon _________________ who cares |
|
Back to top |
|
|
lurid Guru
Joined: 12 Mar 2003 Posts: 595 Location: Florida
|
Posted: Mon Jan 05, 2004 3:30 pm Post subject: |
|
|
Yeah, that too. This is nice because I prefer Gaim to Kopete and Evolution to KMail. Generally I just loaded gnome-settings-daemon before KDE so that everything would (mostly) work together. Using the gtk-2.0 file should eliminate the need for that.
I was just using Evolution and admiring how good it looked with my other KDE apps and when I clicked the link that lead to this thread, it opened in Firebird. Its themed like KDE too! God, I'm loving this. _________________ Go find a cheerleader and saw her legs off. - Nny |
|
Back to top |
|
|
shm Advocate
Joined: 09 Dec 2002 Posts: 2380 Location: Atlanta, Universe
|
Posted: Mon Jan 05, 2004 4:16 pm Post subject: |
|
|
Is it just me or all non-active firebird tabs half sized while using the Qt engine? I might have to upgrade firebird since I haven't updated it in a while. _________________ what up |
|
Back to top |
|
|
Angrybob Guru
Joined: 19 Apr 2003 Posts: 575
|
Posted: Mon Jan 05, 2004 5:05 pm Post subject: |
|
|
ooohh sounds cool, anybody got some screenshots? I'd like to see nautilus running with the kde plastic theme |
|
Back to top |
|
|
scoobydu Veteran
Joined: 16 Feb 2003 Posts: 1076 Location: 'Mind the Gap'
|
Posted: Mon Jan 05, 2004 6:02 pm Post subject: |
|
|
Interesting
Looks like this is worth a try _________________ Tyan Tiger K8W, 2xOpteron 240,Powerbook5,6 15" 1.5g, Macbook Black 2g, Mac Mini 1g, Ipod P60g.
| Linux - From a windows user perspective| |
|
Back to top |
|
|
lurid Guru
Joined: 12 Mar 2003 Posts: 595 Location: Florida
|
Posted: Mon Jan 05, 2004 6:25 pm Post subject: |
|
|
I don't have the plastic theme anymore, it was ok, but I prefer Baghira. So, here is a shot of Konqeror and Nautilus running side by side, both using Baghira (and my grey color scheme). It also works great on Evolution and Gaim. The only major difference is that the tool buttons aren't themed. I notice that Gimp segfaults with this engine at the moment, but like the author said, it IS an 0.x release.
Click me _________________ Go find a cheerleader and saw her legs off. - Nny |
|
Back to top |
|
|
Cossins Veteran
Joined: 21 Mar 2003 Posts: 1136 Location: Copenhagen, Denmark
|
Posted: Mon Jan 05, 2004 6:27 pm Post subject: |
|
|
The GIMP doesn't segfault on me, it looks gorgeous with Plastik buttons. ^_^
The fonts in Mozilla Firebird, though, are a bit large, don't know why.
- Simon _________________ who cares |
|
Back to top |
|
|
shm Advocate
Joined: 09 Dec 2002 Posts: 2380 Location: Atlanta, Universe
|
Posted: Mon Jan 05, 2004 6:40 pm Post subject: |
|
|
I'd like to see the engine automatically set the gtk stock icons (since apparently with gtk, it's set by the theme I guess), with the running kde icon theme. _________________ what up |
|
Back to top |
|
|
nempo Guru
Joined: 16 Apr 2002 Posts: 360 Location: Linkoping, Sweden
|
Posted: Mon Jan 05, 2004 7:11 pm Post subject: |
|
|
shm wrote: | Cossins wrote: | It will always be a little slower than native GTK theming. That's because it has to do both simple GTK theming and Qt rendering. |
Not really.. it'll be pretty much as fast as Qt's theming speed. How this engine works is it makes Qt draw the widget into a offscreen pixmap (the Qt side of it, which may or may not be expensive), and then simply blits it into the screen (the gtk side of the engine, which is extremely cheap)
Note that other OS's work similarly.. WindowsXP's uxtheme.dll and MacOS 8.1/8.5->9.x->OSX 10.x's Appearance Manager. |
It really depends on what in gtk that causes the slow rendering. If it is the renderer then you'll feel a speed-up, if it is the underlaying toolkit-system-thingy/guts then there won't be much difference in terms of speed compared to regular gtk theme engines.
ps. I use gtk/gnome if you're wondering ds. _________________
homeobocks wrote: | superjaded wrote: |
would Big Brother become a reality? |
Yeah . . . it would be just like the tv show. Except somebody would be watching. |
|
|
Back to top |
|
|
mksoft l33t
Joined: 28 May 2002 Posts: 844
|
|
Back to top |
|
|
lurid Guru
Joined: 12 Mar 2003 Posts: 595 Location: Florida
|
Posted: Mon Jan 05, 2004 11:57 pm Post subject: |
|
|
Wow. People are starting to make ebuild for stuff now? Usualy you just see rpm packages. Gentoo hits the big time, now! Actually, this is cool because now I don't have to be responcible for hosting the files anymore. ;) _________________ Go find a cheerleader and saw her legs off. - Nny |
|
Back to top |
|
|
mksoft l33t
Joined: 28 May 2002 Posts: 844
|
Posted: Tue Jan 06, 2004 12:10 am Post subject: |
|
|
OOps, lurid, I haven't noticed you made one as well _________________ There's someone in my head but it's not me - Pink Floyd |
|
Back to top |
|
|
gatiba Guru
Joined: 01 Sep 2002 Posts: 434
|
Posted: Sat Jan 10, 2004 12:27 pm Post subject: |
|
|
Mksoft i used your ebuild but when i set switch2 on QT, it crash with segmentation fault |
|
Back to top |
|
|
cyberpatrol Apprentice
Joined: 18 Sep 2003 Posts: 161 Location: Germany
|
Posted: Sat Jan 10, 2004 6:57 pm Post subject: |
|
|
Sorry, but I don't get it to work.
Cossins wrote: | Here's how I made it work: (Qt 3.2.x from KDE CVS, GTK+ 2.2.4)
- Changed QTDIR to /usr/qt/3
- Changed -lqt-mt to -lqt in libqtengine_la_LDFLAGS
|
My first problem: Where do I find -lqt-mt and/or libqtengine_la_FLAGS?
My second problem: After installing it with the ebuild on kde-look.org no GTK apps are shown with my QT themes. And when compiling it by hand with the source package the compiler stops with several syntax errors in qt_qt_wrapper.cpp.
Can anyone help me, please?
I have installed KDE 3.14, QT 2.3.2-r1, QT 3.2.3, GTK+ 1.2.10-r1 and GTK+ 2.2.4-r1, but I don't have installed Gnome. |
|
Back to top |
|
|
shm Advocate
Joined: 09 Dec 2002 Posts: 2380 Location: Atlanta, Universe
|
Posted: Sat Jan 10, 2004 7:21 pm Post subject: |
|
|
cyberpatrol wrote: |
My first problem: Where do I find -lqt-mt and/or libqtengine_la_FLAGS? |
in Makefile.am and/or Makefile
cyberpatrol wrote: | My second problem: After installing it with the ebuild on kde-look.org no GTK apps are shown with my QT themes. |
Do USE="gtk2" emerge gtk-theme-switch.. the run "switch2", and set the theme to "Qt". _________________ what up |
|
Back to top |
|
|
cyberpatrol Apprentice
Joined: 18 Sep 2003 Posts: 161 Location: Germany
|
Posted: Sat Jan 10, 2004 7:59 pm Post subject: |
|
|
I made these changes to Makefile and Makefile.am, tried it with ./configure, ./configure --prefix=/usr (/usr is the output of gtk-config --prefix) and ./configure --prefix=/usr/qt/3 but still without luck. I'm still getting many compiling errors.
The first error I get after running make is
qt_qt_wrapper.cpp:1:21: qpixmap.h: No such file or directory
and the same with many other files which are in /usr/qt/3/include.
And after these errors I get many other (syntax) errors.
Am I doing something wrong, is there some info missing or wrong in Cossin's explanation or is there a bug in the source package? |
|
Back to top |
|
|
|