[fdo] Idea for more consistency across toolkits
Sat Dec 11 05:14:10 PST 2004
I had an idea which I think could dramatically improve the cross toolkit
display of widgets.
At the moment toolkits load their settings and a style from files stored
locally where the client is running. The problem with this approach is that
every toolkit has its own place and means of storing these settings. When
programs are run from more than one toolkit they often appear very different.
The problem can also be seen when running a remote X application onto a
Windows or Mac OSX desktop. The problem is that the X app will display using
its toolkit's settings and will not try to blend in with the Windows or OSX
What would be great is that if I am at a MAC OSX desktop and remote display an
X application that the widget toolkit will render the display using MAC OSX
style guidelines and not some configuration stored on the remote computer.
When I then move to a Windows XP machine and run the same program it should
look like a Windows XP program.
When I mix different toolkits on the same display (eg gtk and Qt) they should
appear the same.
The solution I was thinking to this problem will be to introduce some standard
properties which could be associated with the root window on the X display.
One property would be the widget rendering style to use. This would be a
string property naming the general style used on the display (e.g "Window
XP", "Mac OSX", etc). The toolkit would look at this property and load the
appropriate style to ensure widgets are correctly displayed. There would have
to be a unification of style names for Gtk and QT toolkits or else a means
for the user to specify a mapping from the display toolkit style to the style
that should be used by the toolkit.
Other properties that would be good to store would be the colors to use (e.g.
selected text color, background color, text foreground color etc).
I noticed there is a project XSettings on freedesktop.org but I could not find
out much about it to know how this idea fits in with that. It appears to me
that XSettings is only the colors, double click delay etc but does not
provide a means to specify the look and feel of the display.
If these properties could be standardised and Gtk and Qt modified to use these
properties then an X display would always look consistent even when
displaying on a Windows or Mac OSX desktop. It would alleviate the need for
every toolkit having a different place to store these settings as the
settings would be stored on the display itself and not necessarily on the
computer where the X application is running.
Does anyone think this would be a good idea?
More information about the freedesktop