Commit Graph

13 Commits

Author SHA1 Message Date
Benjamin Otte
d3c147a62d stylecontext: Split render functions out into gtkrender.[ch] 2014-10-03 06:18:05 +02:00
Matthias Clasen
96fd15454b Make GtkModelButton work with touch
Some recent refactoring changed things so that in_button is no
longer TRUE when released() is called for touch events. As a minimal
fix, let GtkButton do more of the work by chaining up to its
pressed and released handlers, which know how to handle touch
events. This could be further improved by leaving more of the
state handling to GtkButton, like it was done for GtkToggleButton.
2014-09-24 23:33:23 -04:00
Benjamin Otte
4e077d4638 gtk: Use new :checked state
on:
- GtkToggleButton
- GtkCheckButton
- GtkRadioButton
- GtkModelButton
- GtkCellRendererToggle
- GtkCheckMenuItem

also update themes:
- Adwaita
- Raleigh
but not the win32 theme.

The new :checked state replaces :active for the actual checkedness of
the widgets and :active is now used exclusively while the button is being
pressed.

https://bugzilla.gnome.org/show_bug.cgi?id=733967
2014-08-16 16:34:14 +02:00
Matthias Clasen
8060ac6ddd GtkModelButton: Update widget state
We were only setting the state transiently in ::draw, leading
to various drawing anomalies, such as labels not picking up
the appropriate color from BUTTON styles.
2014-07-02 15:12:46 -04:00
Matthias Clasen
691dd83580 Improve popover menu spacing
Make iconic buttons have a more reasonable height, and add some
space above an iconic row.
https://bugzilla.gnome.org/show_bug.cgi?id=732229
2014-06-28 00:00:16 -04:00
Cosimo Cecchi
caa73b2128 modelbutton: don't use focus-line-width 2014-05-09 11:02:46 -07:00
Cosimo Cecchi
80981f5c95 modelbutton: don't use focus padding 2014-05-09 11:02:43 -07:00
Matthias Clasen
6429b33f44 GtkModelButton: Add an iconic mode
In iconic mode, model buttons will be styled like regular icon
buttons, preferring to show only the icon if one is set, falling
back to showing the label.

https://bugzilla.gnome.org/show_bug.cgi?id=727477
2014-04-28 14:20:15 -04:00
Matthias Clasen
baaf201f2a Rename the modelbutton style class
This is not a great name to use in themes; instead, add the
menuitem class, so themes can use .button.menuitem for styles
that are specific to menuitem-like buttons.
2014-04-27 18:49:27 -04:00
Matthias Clasen
987b56973c GtkModelButton: improve size allocation
Only reserve size for an indicator if at least one sibling
actually has an indicator.
2014-04-26 17:48:57 -04:00
Matthias Clasen
2d9722e92b Fix the build 2014-04-22 11:08:17 -04:00
Matthias Clasen
2b85d6c225 Add a style class to model buttons
This will let us stop using the class name in Adwaita, and will
help with some future additions.
2014-04-22 11:04:40 -04:00
Matthias Clasen
bf9ce3ad25 Introduce GtkModelButton
Similar in spirit to GtkModelMenuItem, this private GtkButton subclass
can connect to a GtkMenuTrackerItem and present itself as either a
regular button, a check button, or a radio button. Activation and
state tracking is done through the GAction that is associated with
the menu tracker item.

https://bugzilla.gnome.org/show_bug.cgi?id=723014
2014-02-07 15:11:50 -05:00