Re: (Style) Property review
- From: Thomas Wood <thos gnome org>
- To: Matthias Clasen <matthias clasen gmail com>
- Cc: gtk-devel-list gnome org
- Subject: Re: (Style) Property review
- Date: Tue, 31 Aug 2010 11:13:55 +0100
On Sat, 2010-08-28 at 23:16 -0400, Matthias Clasen wrote:
> I took some time last night to look over the impressive list of
> properties of all widgets. Here are some cleanups that we might
> consider for GTK3:
Thanks for looking into this.
>
> There are several cases where we seem to have a mixup between style
> and non-style properties:
>
> 4) We have a shadow-type property in GtkEntry, GtkFrame,
> GtkScrolledWindow, GtkArrow, GtkHandleBox and GtkViewport. But we
> have a shadow-type style property in GtkStatusbar, GtkSpinButton,
> GtkMenuBar, GtkToolbar and GtkComboBox. Not sure what the best way
> forward is here.
I would imagine the most common developer requirement here is to be able
to turn the border (i.e. shadow) on or off. For example, a GtkEntry may
be used in some composite widget where a border is drawn by something
else. It's probably best to allow the themes to choose the style of the
shadow and allow application developers to just determine if there
should be a shadow at all.
>
> 'opt-in' style properties: These were added over time to let themes
> opt-in to some new GTK feature, typically more detailed detail
> strings.
>
> 6) GtkEntry::state-hint
> GtkTreeView::row-ending-details
> GtkRange::activate-slider
> GtkRange::stepper-position-details
> GtkRange::trough-side-details
> GtkWidget::wide-separators
>
> I think all of these should be removed, and themes will be expected to
> handle the richer details.
Agreed.
>
> 7) There's a whole zoo of layout (padding, spacing) related properties
> and style properties. I haven't had the time to sort those out yet.
One thing I would like to see is the removal of "focus" as an additional
drawing operation. Many themes don't want to draw a simple rectangle to
indicate focus state and the focus style properties (for example,
"interior-focus") can make the widget geometry much more complex (see
http://live.gnome.org/GnomeArt/Tutorials/GtkThemes/GtkButton for an
illustration).
A simplification of padding and border properties would also help to
make it easier to write themes. The CSS definitions of "margin",
"border" and "padding" may be useful in making the naming of these
properties more consistent and may allow the removal of style properties
that duplicate the behaviour (for example "vertical-padding" and
"horizontal-padding" in GtkMenu, and "internal-padding" in GtkMenuBar).
Regards,
Thomas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]