summaryrefslogtreecommitdiff
path: root/gtk/gtkcheckbutton.c
Commit message (Collapse)AuthorAgeFilesLines
* cssimagebuiltin: Remove icons that don't draw anything anymoreBenjamin Otte2016-05-031-2/+2
|
* box gadget: Redo expand flag handlingMatthias Clasen2016-04-281-1/+2
| | | | | | | | | | | | | | | | | We only keep one align flag per child, so it seems odd to keep separate h/v expand flags. Just keep one expand flag and interpret it according to orientation. Allow setting the expand flag for child widgets too, though, so we can make widget expand without interfering with the recursive widget expand flag. Update all callers. Use the new possibility of expanding child widgets to make the label of check and radio buttons expand. This fixes unexpected behavior of these widgets in RTL in some places. https://bugzilla.gnome.org/show_bug.cgi?id=765742
* check button: Reverse alignments in RTLMatthias Clasen2016-04-281-0/+2
| | | | Flip alignments for the box gadget children.
* check button: Reinstate rtl allocation behaviorMatthias Clasen2016-03-031-0/+2
| | | | | | | | In rtl mode, we must not just reverse the children, but also allocate from the right. Use the newly introduced box gadget api to achieve this. https://bugzilla.gnome.org/show_bug.cgi?id=762945
* check button: Draw focus againMatthias Clasen2016-02-201-0/+1
| | | | The box gadget now has API for this; use it.
* checkbutton: Handle rtl changes againMatthias Clasen2016-01-181-16/+4
| | | | | Now that the box gadget has api for it, use it here to change the order of the gadgets for right-to-left.
* checkbutton: Use a box gadgetMatthias Clasen2016-01-171-253/+34
| | | | | | Now that builtin icons have a baseline, we can just use a box gadget with baseline alignment for the indicator and the label.
* Use convenience API that was introduced recentlyMatthias Clasen2016-01-131-2/+3
| | | | | Use gtk_css_gadget_set_state in all the places where we previously were getting a node from a gadget, just to call gtk_css_node_set_state.
* button: Don't include margins in input window sizeTimm Bäder2016-01-121-8/+11
| | | | | | And do the same thing for GtkCheckButton https://bugzilla.gnome.org/show_bug.cgi?id=760509
* checkbutton: Update state initiallyMatthias Clasen2015-12-281-4/+13
| | | | | Without this, the check node starts out without the :dir(ltr) state, at least.
* checkbutton: stop saving cairo stateMatthias Clasen2015-12-201-5/+1
| | | | GtkBuiltinIcon now does this on its own.
* checkbutton: Fix regression from builtin iconMatthias Clasen2015-12-191-18/+14
| | | | | The leaking of cairo transforms from builtin icon drawing was causing the label to be drawn at the wrong position.
* checkbutton: Use a builtin iconBenjamin Otte2015-12-161-86/+21
| | | | | Also, add support to uiltin icons to look up the default size from a style property.
* check button: Deprecate indicator-sizeMatthias Clasen2015-12-161-8/+25
| | | | | | CSS min-width/min-height can do just the same. We still fall back to the indicator-size style property if the CSS properties are not set.
* check button: Deprecate and ignore ::indicator-spacingMatthias Clasen2015-12-161-18/+16
| | | | | This can be done just as well with CSS margins, so do that instead for Adwaita.
* Revise CSS node documentationMatthias Clasen2015-12-161-2/+4
| | | | | Clarify the use of brackets in the CSS node diagrams: [] means optional nodes or classes, <> means child widgets.
* checkbutton: Remove dead codeMatthias Clasen2015-12-151-14/+0
|
* radiobutton: Port radio buttons to gadgetsMatthias Clasen2015-12-151-17/+12
| | | | | | | This was already mostly done by inheritance from GtkCheckButton. To complete it, stop using the draw_indicator vfunc for radio buttons, and instead make the indicator gadget draw either a check or radio.
* check button: Convert to gadgetsMatthias Clasen2015-12-151-254/+420
| | | | | | | | | | | | Use a gadget for the button, and for the indicator. A complication here is that GtkCheckButton (and GtkRadioButton) have a totally different appearance depending on the ::draw-indicator property. If an indicator is not required, we just reuse the GtkButton gadget. This mostly works; some minor sizing issues left, e.g. cranking up the indicator-size causes the checkbutton grid in testgtk to overlap.
* cssnode: Change style-changed signalBenjamin Otte2015-12-121-16/+4
| | | | | | | | Instead of having old and new style, now have a GtkCssStyleChange opaque object that will compute the changes you are interested in for you. This simplifies change signal handlers quite a bit and avoids lots of repeated computation in every signal handler.
* Don't pass widget state flags to GtkStyleContext APITimm Bäder2015-11-221-1/+1
|
* button: Add diagrams to CSS node docs for buttonsMatthias Clasen2015-11-031-0/+10
|
* check button: Match documented behaviorMatthias Clasen2015-11-021-5/+20
| | | | | | We were not actually adding the style classes that the documentation is talking about, for the !draw-indicator case. Fix that.
* toggle button: Convert to css nodesMatthias Clasen2015-10-301-19/+86
| | | | | | | | | | | Convert GtkToggleButton and its subclasses to CSS nodes. Keep the button element name for when we want to render these button-like (but with .toggle, .check and .radio style classes for differentiation). When we want to render them with an indicator, use distinct element names checkbutton and radiobutton, and add a subnode for the indicator with name check or radio.
* stylecontext: Split render functions out into gtkrender.[ch]Benjamin Otte2014-10-031-0/+1
|
* checkbutton: Fix redraw issuesBenjamin Otte2014-08-171-0/+20
| | | | | | | | | | | This is a hack to get around the optimizations done by the CSS engine. The CSS engine will notice that no CSS properties changed on the widget itself when going from one state to another and not queue a redraw. And the reason for no properties changing will be that only the checkmark itself changes, but that is hidden behind a gtk_style_context_save()/_restore() pair, so it won't be caught.
* checkbutton: Don't redundantly update statesBenjamin Otte2014-08-171-12/+0
| | | | | States are set properly by GtkButton, there is no need to set them manually.
* checkbutton: Draw background unconditionallyBenjamin Otte2014-08-171-5/+4
| | | | | We want to draw backgrounds always, not just on prelight. Themes can decide to only set a background during prelight themselves.
* button: Handle :inconsistent in GtkToggleButtonBenjamin Otte2014-08-161-7/+1
|
* button: Handle :checked in gtktogglebutton.cBenjamin Otte2014-08-161-4/+0
| | | | Don't try to handle it elsewhere.
* css: Do inconsistent checked states rightBenjamin Otte2014-08-161-1/+2
| | | | | | | In HTML5, both pseudoclasses apply. So we do the same thing in our widgets. https://bugzilla.gnome.org/show_bug.cgi?id=733967
* gtk: Use new :checked stateBenjamin Otte2014-08-161-5/+4
| | | | | | | | | | | | | | | | | | | | | 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
* GtkButton: Deprecated setters and getters as wellMatthias Clasen2014-05-131-0/+2
| | | | | gtk_button_set/get_alignment should be deprecated together with the properties they are setters/getters for.
* checkbutton: don't use focus-line-widthCosimo Cecchi2014-05-091-26/+9
|
* checkbutton: support CSS paddings and bordersCosimo Cecchi2014-05-091-4/+24
| | | | We need this since we just removed focus-padding.
* checkbutton: don't use focus paddingCosimo Cecchi2014-05-091-15/+10
|
* checkbutton: always use interior focusCosimo Cecchi2014-05-091-6/+2
|
* checkbutton: Implement height-for-widthBenjamin Otte2013-05-071-12/+53
|
* checkbutton: Split out a common functionBenjamin Otte2013-05-071-87/+69
| | | | Makes size request / allocation code easier to understand.
* GtkCheckButton and GtkRadioButton: Implement baseline alignmentAlexander Larsson2013-04-231-7/+69
|
* Don't left align label in check buttons when they have no indicatorWilliam Jon McCann2012-08-211-1/+14
| | | | | | Because they should be normal buttons in that case. https://bugzilla.gnome.org/show_bug.cgi?id=681617
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* checkbutton: Use the widget state flags as a base for drawing the indicatorRui Matos2011-12-191-3/+7
| | | | | Instead of building a set of state flags specifically for drawing the indicator, base it on the underlying widget state flags.
* checkbutton: Stop setting state flags on the style context for drawingRui Matos2011-12-191-4/+0
|
* Documentation fixesMatthias Clasen2011-09-251-2/+3
| | | | | Mostly making sure that return values and varargs don't loose their docs.
* checkbutton: Remove redundant callBenjamin Otte2011-09-051-1/+0
| | | | The call is done by GtkButton already, no need to override it.
* Make focus rectangles optionalMatthias Clasen2011-08-101-12/+13
| | | | | | | | | | | | | | | | | | 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
* checkbutton: Use gtk_widget_class_set_accessible_role()Benjamin Otte2011-07-181-0/+2
|
* Move documentation to inline comments: GtkCheckButtonJavier Jardón2011-04-131-1/+31
|
* Use 16 as default size for checkbutton indicatorCosimo Cecchi2011-03-031-1/+1
| | | | | So that 16x16 icons can be used from themes such as Adwaita in their natural size.