| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Map the GtkMenuButton property to the underlying GtkButton widget.
|
|
|
|
|
|
| |
We want to allow setting a property to its
current value, while still having a precondition
for widget->parent being NULL otherwise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GtkMenuButton currently does not provide a way to tell
if it's open programmatically. The existing methods,
`popup()` and `popdown()`, do not expose any state
to callers. If someone wanted to know whether or not
a menubutton was open, they needed the popover. Given
that GtkMenuButton can manage the popovers itself,
that's not always an option for app developers.
This commit adds the `active` property and associated
methods, where `gtk_menu_button_set_active ()` replaces
both `gtk_menu_popup ()` and `gtk_menu_popdown ()`.
This addition also mirrors changes in other places,
Such as `GtkWidget:visible` vs `show()`/`hide()`.
|
| |
|
|
|
|
|
|
|
| |
gtk_widget_set_visible and gtk_window_present
are better alternatives, and calling gtk_widget_show
on newly created widgets is no longer necessary
anyway.
|
|
|
|
|
| |
Include gtkprivate.h for I_() and glib-i18n.h for
gettext macros.
|
|
|
|
|
|
|
|
| |
Those property features don't seem to be in use anywhere.
They are redundant since the docs cover the same information
and more. They also created unnecessary translation work.
Closes #4904
|
|
|
|
|
|
|
| |
We update the labelled-by relation, but we never update the described-by
one.
Fixes: #4576
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Up until now, as the focus was moved to the inner button, it was not possible for
assistive technologies to determine the correct labels and descriptions
because developers could set them only for the parent widget.
Now, the proper relations are added so the labels should be picked up properly.
Fixes #4254
|
|
|
|
| |
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4205
|
|
|
|
|
|
| |
Property added in commit a74420bc1a501f6ee951ed152e8f9a941b0c8438.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|\
| |
| |
| |
| |
| |
| | |
menubutton: Make menu buttons activatable again
Closes #4079
See merge request GNOME/gtk!3728
|
| |
| |
| |
| |
| |
| |
| | |
The activation is simply forwarded to the toggle button
within.
Fixes: #4079
|
|/
|
|
| |
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
|
| |
This should come from the theme instead, as it does for icon<->arrow.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure the button still has the .image-button style class with an icon,
also add it to the initial state with only an arrow. Add a new
.arrow-button style class for the icon+arrow state so it's possible to
style it.
Remove spacing from the label+arrow variant to match, re-add it from the
stylesheet for both.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3501
|
|
|
|
| |
There's already one above.
|
|
|
|
| |
Match GtkButton.
|
|
|
|
|
|
| |
Add a ::primary property to GtkMenuButton, which can
be set to make the menu activatable with F10, like
menubars.
|
|
|
|
| |
Replace leftover gtk-doc syntax (#Type) with backquotes.
|
|
|
|
|
|
|
|
| |
Remove a boatload of "or %NULL" from nullable parameters
and return values. gi-docgen generates suitable text from
the annotation that we don't need to duplicate.
This adds a few missing nullable annotations too.
|
|
|
|
|
| |
Mostly fixing up indentation of continuation lines,
and other small cleanups.
|
|
|
|
|
|
|
|
| |
Propagate the focus-on-click setting to the button
inside, so that setting menubuttons as !focus-on-click
works as expected. This helps for menubuttons in
header bars, where dragging on the button will otherwise
steal focus from the content.
|
| |
|
|
|
|
| |
Connect properties, getters, and setters with annotations
|
| |
|
|
|
|
| |
Change link syntax, add an example image, generally clean things up.
|
|
|
|
| |
Fixes #3523
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of hardcoding icon names in the widget, use
arrow.none, arrow.up, arrow.down, arrow.left, arrow.right
styles and set the icon to use with -gtk-icon-source. This
lets themes change the icons that are used here, without
forcing all uses of pan-up/down/start/end-symbolic to be
treated the same.
Document this in the menubutton CSS docs.
|
|
|
|
| |
We are using menubutton instead of button.popup now.
|
|
|
|
| |
This makes it more explicit that managers of popovers make it "present".
|
|
|
|
|
|
|
|
|
|
| |
Using GList is a bit lame, and makes the API more complicated to use
than necessary in the common case.
The only real use case for a GList is gtk_widget_add_mnemonic_label(),
and for that we can use the GValue-based API instead.
Fixes: #3343
|
|
|
|
|
| |
Set roles, properties and relations according to the
ARIA authoring practices document.
|
| |
|
|
|
|
|
| |
It was only added for the fallback app menu in headerbars, which
has been removed in the meantime.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This property was only used until now when
there was neither an icon nor a label set,
for arrow direction and popover placement.
Starting with Gtk4, a GtkMenuButton with a
label shows an arrow at the right (in LTR)
of the label. Allow disabling the arrow or
changing its direction using the direction
property, to have a way to restore a Gtk3-
like look or to improve popover placement.
Fixes #2811.
|
|
|
|
|
|
| |
Replace most remaining uses of GTK+ in the docs and
user-visible strings by GTK. Also remove some leftover
"Was added in 3.x" sentences from the docs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To build a better world sometimes means having to tear the old one down.
-- Alexander Pierce, "Captain America: The Winter Soldier"
ATK served us well for nearly 20 years, but the world has changed, and
GTK has changed with it. Now ATK is mostly a hindrance towards improving
the accessibility stack:
- it maps to a very specific implementation, AT-SPI, which is Linux and
Unix specific
- it requires implementing the same functionality in three different
layers of the stack: AT-SPI, ATK, and GTK
- only GTK uses it; every other Linux and Unix toolkit and application
talks to AT-SPI directly, including assistive technologies
Sadly, we cannot incrementally port GTK to a new accessibility stack;
since ATK insulates us entirely from the underlying implementation, we
cannot replace it piecemeal. Instead, we're going to remove everything
and then incrementally build on a clean slate:
- add an "accessible" interface, implemented by GTK objects directly,
which describe the accessible role and state changes for every UI
element
- add an "assistive technology context" to proxy a native accessibility
API, and assign it to every widget
- implement the AT context depending on the platform
For more information, see: https://gitlab.gnome.org/GNOME/gtk/-/issues/2833
|
|
|
|
|
| |
The property has been unused since commit 8701e34f749. That was four
years ago, so it's safe to say that nobody has been missing it terribly.
|
|
|
|
| |
These includes are unused.
|
|
|
|
| |
These are all on GtkBox or enumerating children.
|
|
|
|
|
| |
Replace all uses of gtk_container_add on buttons
by gtk_button_set_child.
|
| |
|
|
|
|
|
| |
We are only using this as a boolean, so change it
to a boolean property named has-frame.
|
|
|
|
|
| |
We are only using this as a boolean, so change it
to a boolean property named has-frame.
|
|
|
|
|
|
|
|
| |
After the :can-focus change in the previous commit, widgets
need to set suitable focus and grab_focus implementations
to implement the desired focus behavior.
This commit does that for all widgets.
|
| |
|