summaryrefslogtreecommitdiff
path: root/gtk/gtkbutton.c
Commit message (Collapse)AuthorAgeFilesLines
* button: Rework size request/allocation codeBenjamin Otte2013-05-011-77/+56
| | | | | - Split out a common function - Implement hfw properly.
* button: Use _gtk_widget_get_preferred_size_for_size()Benjamin Otte2013-05-011-4/+6
| | | | This was accidently lost when merging baseline support.
* GtkButton: Add baseline align supportAlexander Larsson2013-04-231-9/+57
|
* button: Implement height-for-widthBenjamin Otte2013-04-221-9/+38
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=698433
* Add gtk_widget_(un)register_windowAlexander Larsson2013-02-071-2/+2
| | | | | | | | | | | | This replaces the previously hardcoded calls to gdk_window_set_user_data, and also lets us track which windows are a part of a widget. Old code should continue working as is, but new features that require the windows may not work perfectly. We need this for the transparent widget support to work, as we need to specially mark the windows of child widgets. https://bugzilla.gnome.org/show_bug.cgi?id=687842
* button: Clear highlight when a button is removed from a containerSébastien Granjoux2012-09-161-1/+4
| | | | | | | | | | | | | A button is highlighted if the private variable in_button is TRUE. This variable is set when the pointer is over the button and cleared when it left the button. When a button is hidden while there is the pointer over it, GTK generates a leave notification event, in_button is set to FALSE. But when a button is removed from a container but not destroyed, it is unrealized and loose its window. It cannot receive the leave notification event and in_button stay TRUE. So when the button get a new parent it is still highlighted. https://bugzilla.gnome.org/show_bug.cgi?id=676890
* port GtkButton to GtkActionHelperRyan Lortie2012-08-201-95/+18
|
* Provide a way to force showing icons in buttonsWilliam Jon McCann2012-05-211-1/+89
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=676429
* button: Remove _gtk_button_paint()Benjamin Otte2012-04-171-25/+9
| | | | | All buttons use the same paint function these days. States are managed correctly so this was just leftovers from GTK 1 or GTK 2.
* widget: Set .default class when widget is defaultBenjamin Otte2012-04-171-2/+0
| | | | Don't just conditionally set it on buttons.
* button: Handle touch eventsCarlos Garnacho2012-03-011-4/+65
| | | | | | Touch events don't generate crossing events themselves, so do not rely on these to determine whether the button release happened within the event window.
* button: don't be active when holding the mouse button outside the boundsCosimo Cecchi2012-03-011-1/+1
| | | | | | | | | | | GtkButton currently draws itself as active (pressed down) in case we're pressing and holding the mouse pointer outside its bounds; this is misleading though, since we won't activate the button unless the mouse is released inside the button itself. Fix this by only setting the ACTIVE state flag when the button is actually pressed down. https://bugzilla.gnome.org/show_bug.cgi?id=668141
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* GtkButton: Small documentation improvementsMurray Cumming2012-02-131-4/+4
|
* gtkbutton: Use symbolic names for button numbersCarlos Garcia Campos2012-01-271-2/+2
|
* GtkButton: don't do string compare on property setRyan Lortie2012-01-111-7/+4
| | | | | | Just set the property unconditionally. https://bugzilla.gnome.org/show_bug.cgi?id=667394
* Rename gtk_application_window_get_observerRyan Lortie2012-01-111-3/+3
| | | | | | | | This should have been called _create_observer https://bugzilla.gnome.org/show_bug.cgi?id=667394 Fixup switch
* Revert "button: Stop setting state flags on the style context for drawing"Rui Matos2012-01-091-0/+1
| | | | | | | Setting state flags is actually needed here since this function is called by GtkButton subclasses which add their specific state flags as a parameter. This reverts commit e868b8d6ea04af6e31d7075d09508689873c0df5.
* GtkButton: do not allow both types of actionsRyan Lortie2012-01-091-0/+3
| | | | | | Only allow one of 'action-name' or 'related-action' to be set. https://bugzilla.gnome.org/show_bug.cgi?id=667394
* Add new GtkActionable interfaceRyan Lortie2012-01-091-2/+159
| | | | | | | | | | | | This is the interface for GtkWidgets that can be associated with an action on a GtkAppicationWindow or associated GtkApplication. It essentially features 'action-name' and 'action-target' properties with some associated convenience API. This interface is implemented by GtkButton and GtkToolButton. https://bugzilla.gnome.org/show_bug.cgi?id=667394
* button: deprecate the inner-border style propertyCosimo Cecchi2011-12-201-32/+12
| | | | | | | | Since we allocate the standard CSS border to the button now, and center the child accordingly, there's no need for an additional inner-border style property. Deprecate it and ignore its values. https://bugzilla.gnome.org/show_bug.cgi?id=666600
* button: add CSS borders to the size requestCosimo Cecchi2011-12-201-10/+18
| | | | | | And allocate the button children according to it as well. https://bugzilla.gnome.org/show_bug.cgi?id=666600
* button: add a border param to gtk_button_get_props()Cosimo Cecchi2011-12-201-3/+7
| | | | | | We'll use it later to compute the child offsets. https://bugzilla.gnome.org/show_bug.cgi?id=666600
* button: Stop setting state flags on the style context for drawingRui Matos2011-12-191-1/+0
|
* button: Don't call deprecated functionsBenjamin Otte2011-11-081-5/+5
|
* Documentation fixesMatthias Clasen2011-09-251-3/+4
| | | | | Mostly making sure that return values and varargs don't loose their docs.
* Clean up unneeded includesMatthias Clasen2011-08-281-2/+1
|
* Make focus rectangles optionalMatthias Clasen2011-08-101-5/+8
| | | | | | | | | | | | | | | | | | This commit introduces a new setting, gtk-visible-focus, backed by the Gtk/VisibleFocus X setting. Its three values control how focus rectangles are displayed. 'always' is equivalent to the traditional GTK+ behaviour of always rendering focus rectangles. 'never' does what it says, and is intended for keyboardless situations, e.g. tablets. 'automatic' hides focus rectangles initially, until the user interacts with the keyboard, at which point focus rectangles become visible. https://bugzilla.gnome.org/show_bug.cgi?id=649567
* Convert GailButton to GtkButtonAccessibleMatthias Clasen2011-07-051-0/+3
| | | | | | This drops the AtkText implementation, and also strips handling of children out. Instead of listening for enter/leave/press/released, just listen for state changes on the widget.
* gtk: Use const instead G_CONST_RETURNJavier Jardón2011-06-101-1/+1
|
* button: Remove unused variablesBenjamin Otte2011-05-271-4/+0
|
* all: avoid boxed structs copying where possibleCosimo Cecchi2011-05-181-11/+6
| | | | | | | Use the GtkStyleContext accessors for boxed properties where possible, to reduce allocations. https://bugzilla.gnome.org/show_bug.cgi?id=650420
* button: Fix typo in keyboard grab's evmaskCarlos Garnacho2011-05-171-1/+1
| | | | | https://bugzilla.gnome.org/show_bug.cgi?id=650382, spotted by Alexander Larsson.
* button: don't use the border values for paddingCosimo Cecchi2011-04-121-25/+11
| | | | | | It's wrong, and makes it impossible to theme the button properly. https://bugzilla.gnome.org/show_bug.cgi?id=646882
* button: make gtk_button_get_props() return the padding tooCosimo Cecchi2011-04-121-0/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=646882
* Minor documentation improvementsMurray Cumming2011-02-231-2/+2
| | | | Mostly correcting it's to its and changing some , to .
* Always chain up in ::style-updatedMatthias Clasen2011-02-071-0/+2
| | | | | This was not handled consistently, but the default handler does useful things, so we should always chain up.
* Silence new gcc warningsMatthias Clasen2011-01-231-2/+0
| | | | | gcc 4.6.0 has started to warn about set-but-unused variables. So don't do that, then.
* Gtk(Toggle)Button: preserve untouched state flags when updating state.Carlos Garnacho2011-01-231-1/+4
| | | | | Partly fixes bug #640282, noticed by Christian Persch. buttons were clobbering the insensitive flag when updating their state.
* bgo#626336 - Don't assume that GtkButton is activated only when a keyboard ↵Federico Mena Quintero2011-01-211-10/+14
| | | | | | | | | | | event is available Buttons may also be activated at any time from gtk_widget_activate() or related functions. In that case, just do the 'show the button as pushed for a short amount of time' trick, but don't actually try to grab the keyboard device. Signed-off-by: Federico Mena Quintero <federico@gnome.org>
* [GI] Add missing (out) and (array) annotationsPavel Holejsovsky2011-01-201-2/+2
|
* [GI] Cosmetic cleanups of annotations and doc commentsPavel Holejsovsky2011-01-181-1/+1
| | | | | | This change does not introduce any functionality change, mostly cosmtic cleanups, like re-linebreak when introduced annotations messed up indentation or whitespace errors fixes.
* Update _gtk_button_paint() arguments to GtkStyleContextCarlos Garnacho2011-01-101-14/+7
| | | | | | The detail strings weren't in use anymore, and the state argument is now a GtkStateFlags. GtkToggleButton has been updated as well.
* Remove gtktypeutils altogetherMatthias Clasen2011-01-041-0/+1
| | | | | | Based on patches by Javier Jardón. https://bugzilla.gnome.org/show_bug.cgi?id=629955
* Use the new style context API in GtkButtonPaolo Borelli2010-12-051-49/+69
| | | | Mostly replaces gtk_widget_style_get with gtk_style_context_get_style
* GtkStyleProperties: Turn border-width into a GtkBorder property.Carlos Garnacho2010-12-041-21/+24
| | | | | | | | | All current users of this CSS property have been updated to deal with a GtkBorder. Also a 0 border width has been set in the default CSS to ensure GtkStyleContext and GtkThemingEngine always provide a non-NULL pointer for this property.
* GtkButton: Remove unneeded gtk_style_context_notify_state_change() callsCarlos Garnacho2010-12-041-36/+0
| | | | | There is now code to handle this for one-item widgets (such as GtkButton) in gtk_widget_set_state_flags()
* GtkButton: Use GtkStyleContext for rendering.Carlos Garnacho2010-12-041-36/+58
|
* GtkButton: Set widget state as state flags.Carlos Garnacho2010-12-041-7/+8
|
* GtkButton: Notify on prelight state change.Carlos Garnacho2010-12-041-0/+24
|