We would like to improve the theme architecture for GTK+.
These Wiki pages are currently in a state of flux.
| /Bar /Brainstorm /Foo /Problems /Proposals /Roadmap |
Problems
- GTK+ does sometimes assume nothing will be drawn, and then does not call into the engine.
- Themes cannot take widget properties into account.
- Most paddings are hardcoded inside applications.
- Engines currently need to use the widget pointer to achieve some things.
- When drawing the strings the color needs to depend on the color from the background. However, this color is often not known.
The widget_class, etc. lines are sorted in the order they appear in the gtkrc. Sorting them for relevance is better.
- The margins in widgets have a fixed size and cannot change depending on the screens resolution.
- Custom drawing for application specific widgets cannot be themed.
- GTK+ engines draw directly on the X window. Passing in a cairo context could make scaling and other advanced features possible (eg. canvases).
Roadmap
Task |
Status |
People |
Create a page of GTK+ widgets (fix this tasks name) |
(put link here) |
Alberto Ruiz |
Think about the artist's workflow when creating a theme. #workflow |
|
|
Create a specification of how GTK+ widgets should be drawn #specification |
|
Andreas, Alberto Ruiz, Benjamin Berg |
Have the (above) specification for drawing reviewed by artists and other people #consistency |
|
Andreas |
Create mockups of a new theme syntax #syntax |
|
|
Create a mockup engine #mockup |
not yet started |
Benjamin and ? |
Deprecate GtkStyle when in some 3.x version |
|
|
Here some improvements for GTK+ 2.x
Task |
Status |
People |
Create an API for theme engines to dynamically create GtkRCStyles and set style properties on them |
not yet started |
Benjamin Berg |
Proposals
Context Object
Proposal: Use a context object to specify context information. A context object should be populated by widgets. API to push/pull context values to any widget.
This API would be responsible for collecting the context information (eg. this is a button in a combobox/treeview header). The collected data needs to be exposed to the theme somehow.
CSS Style theme format
Proposal: A CSS like theme format will make the format easier to understand.
New API
Proposal: Create a new API to replace GtkStyle after the 3.x release cycle.
