Sliders and marks

2011-03-02 Thread Bastien Nocera
Heya,

Looking at bug https://bugzilla.gnome.org/show_bug.cgi?id=643487 and the
original https://bugzilla.gnome.org/show_bug.cgi?id=643486 we figured
that it would be best for sliders to point to their marks instead of
trying to add labels on the end of scales.

This is Jakub's mockup:
http://gitorious.org/gnome-design/gnome-design/blobs/master/mockups/theming/widget-dissect-slider.png
And my current implementation:
http://img64.imageshack.us/f/keyboardreversedscale.png/

The problem is that GtkScale allows for the marks to be placed above or
below scales, and that you can add one mark above, and one below.

I've already added a GTK_STYLE_CLASS_SCALE_HAS_MARKS class to gtk+,
should I add a GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW and
GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE instead, and make the theming
engine do something special in the cases where all the marks are on one
particular side of the scale?

Do we want to handle vertical scales with marks as well? Are those used
at all?

Ideas welcome.

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Sliders and marks

2011-03-02 Thread Stefan Kost
Am 02.03.2011 15:11, schrieb Bastien Nocera:
 Heya,
 
 Looking at bug https://bugzilla.gnome.org/show_bug.cgi?id=643487 and the
 original https://bugzilla.gnome.org/show_bug.cgi?id=643486 we figured
 that it would be best for sliders to point to their marks instead of
 trying to add labels on the end of scales.
 
 This is Jakub's mockup:
 http://gitorious.org/gnome-design/gnome-design/blobs/master/mockups/theming/widget-dissect-slider.png
 And my current implementation:
 http://img64.imageshack.us/f/keyboardreversedscale.png/
 
 The problem is that GtkScale allows for the marks to be placed above or
 below scales, and that you can add one mark above, and one below.
 
 I've already added a GTK_STYLE_CLASS_SCALE_HAS_MARKS class to gtk+,
 should I add a GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW and
 GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE instead, and make the theming
 engine do something special in the cases where all the marks are on one
 particular side of the scale?
 
 Do we want to handle vertical scales with marks as well? Are those used
 at all?

One use-case I would like to use them for are volume sliders with a db-scale.

Having left and right or top and bottom marks at the same time sounds like a
corner case (e.g. a temperature slider with C and F marks).

Stefan

 
 Ideas welcome.
 
 ___
 gtk-devel-list mailing list
 gtk-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-devel-list

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Sliders and marks

2011-03-02 Thread Bastien Nocera
On Wed, 2011-03-02 at 15:22 +0200, Stefan Kost wrote:
 Am 02.03.2011 15:11, schrieb Bastien Nocera:
  Heya,
  
  Looking at bug https://bugzilla.gnome.org/show_bug.cgi?id=643487 and the
  original https://bugzilla.gnome.org/show_bug.cgi?id=643486 we figured
  that it would be best for sliders to point to their marks instead of
  trying to add labels on the end of scales.
  
  This is Jakub's mockup:
  http://gitorious.org/gnome-design/gnome-design/blobs/master/mockups/theming/widget-dissect-slider.png
  And my current implementation:
  http://img64.imageshack.us/f/keyboardreversedscale.png/
  
  The problem is that GtkScale allows for the marks to be placed above or
  below scales, and that you can add one mark above, and one below.
  
  I've already added a GTK_STYLE_CLASS_SCALE_HAS_MARKS class to gtk+,
  should I add a GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW and
  GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE instead, and make the theming
  engine do something special in the cases where all the marks are on one
  particular side of the scale?
  
  Do we want to handle vertical scales with marks as well? Are those used
  at all?
 
 One use-case I would like to use them for are volume sliders with a db-scale.
 
 Having left and right or top and bottom marks at the same time sounds like a
 corner case (e.g. a temperature slider with C and F marks).

There would be two separate slider knobs available. One with a
direction, and one with a simple dimple (the round one in jimmac's
mockup).

We could either say: if all the marks are below, we'll draw a pointy
slider, otherwise the round one.

But that would sort of break the clean divide between themess and GTK+
itself (some themes might want to have pointy sliders when things are
above too, etc.).

So we'd need a way to export the marks positions to the engine, and
adding style classes doesn't scale (we'd need to add 4 separate ones for
this to work).

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Sliders and marks

2011-03-02 Thread Matthias Clasen
On Wed, Mar 2, 2011 at 9:02 AM, Bastien Nocera had...@hadess.net wrote:
 On Wed, 2011-03-02 at 15:22 +0200, Stefan Kost wrote:

 So we'd need a way to export the marks positions to the engine, and
 adding style classes doesn't scale (we'd need to add 4 separate ones for
 this to work).

I think you can get away with just two, by combining top/left and
bottom/right. The engine can combine that with the orientation to work
things out.
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list