View Single Post
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#12
Originally Posted by freemangordon View Post
Well, there is a little "hack" in CSSU Qt, which allows applications to use GTK syles, without taking care what is the current theme, you may want to look at it:

http://gitorious.org/community-ssu/q...f9c83f6668f4f9

this is an example of how it is used:
http://gitorious.org/community-ssu/o...ton.cpp#line46

That way Qt uses whatever sapwood has decided to be current, theme changes are applied on-the-fly, you don't need to care where the current theme images are stored and what their names are, etc. And of course memory usage is reduced, as Qt does not load its owns set of images, but uses shared pixmaps (the same ones GTK uses)

NFC if the above helps you, I am not much into QML, but for native QPushButton that works with no problems (check how osso-calculator in CSSU behaves when theme is changed). So you may want to create your own set of native GTK widgets (in the same way Qt does) and trick somehow GTK to give you the pixmaps so you can GL draw them (I suspect QML uses QGLWidget/QGraphicsWidget/QGraphicsScene).

Though I may had written nonsense as well


EDIT:
Why do you need to know the current transitions.ini?
I already have my QDeclarativeImageProvider set up, but I'll at least consider the method you propose. For now, the fact that /etc/hildon/theme points to the directory of the current theme is enough.

As I understand it, some themes supply their own transitions.ini. I want to load this (if applicable) to provide correct values for pop-in/out durations etc. The idea is that these components will behave just as any GTK/QtGui application would.

I have all the above working now, but for some reason I have an undefined symbol error when trying to import the plugin. AFAICT, my approach to exporting the plugin library is exactly the as that used by the MeeGo/Symbian components plugin.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following User Says Thank You to marxian For This Useful Post: