| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Flip alignments for the box gadget children.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
The box gadget now has API for this; use it.
|
|
|
|
|
| |
Now that the box gadget has api for it, use it here to
change the order of the gadgets for right-to-left.
|
|
|
|
|
|
| |
Now that builtin icons have a baseline, we can just use
a box gadget with baseline alignment for the indicator
and the label.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
And do the same thing for GtkCheckButton
https://bugzilla.gnome.org/show_bug.cgi?id=760509
|
|
|
|
|
| |
Without this, the check node starts out without the :dir(ltr)
state, at least.
|
|
|
|
| |
GtkBuiltinIcon now does this on its own.
|
|
|
|
|
| |
The leaking of cairo transforms from builtin icon drawing
was causing the label to be drawn at the wrong position.
|
|
|
|
|
| |
Also, add support to uiltin icons to look up the default size from a
style property.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This can be done just as well with CSS margins, so
do that instead for Adwaita.
|
|
|
|
|
| |
Clarify the use of brackets in the CSS node diagrams:
[] means optional nodes or classes, <> means child widgets.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
We were not actually adding the style classes that the
documentation is talking about, for the !draw-indicator case.
Fix that.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
States are set properly by GtkButton, there is no need to set them
manually.
|
|
|
|
|
| |
We want to draw backgrounds always, not just on prelight. Themes can
decide to only set a background during prelight themselves.
|
| |
|
|
|
|
| |
Don't try to handle it elsewhere.
|
|
|
|
|
|
|
| |
In HTML5, both pseudoclasses apply. So we do the same thing in our
widgets.
https://bugzilla.gnome.org/show_bug.cgi?id=733967
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
gtk_button_set/get_alignment should be deprecated together
with the properties they are setters/getters for.
|
| |
|
|
|
|
| |
We need this since we just removed focus-padding.
|
| |
|
| |
|
| |
|
|
|
|
| |
Makes size request / allocation code easier to understand.
|
| |
|
|
|
|
|
|
| |
Because they should be normal buttons in that case.
https://bugzilla.gnome.org/show_bug.cgi?id=681617
|
| |
|
|
|
|
|
| |
Instead of building a set of state flags specifically for drawing the
indicator, base it on the underlying widget state flags.
|
| |
|
|
|
|
|
| |
Mostly making sure that return values and varargs don't loose
their docs.
|
|
|
|
| |
The call is done by GtkButton already, no need to override it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
| |
So that 16x16 icons can be used from themes such as Adwaita in their
natural size.
|