Commit Graph

39657 Commits

Author SHA1 Message Date
Benjamin Otte
6d15549f51 inscription: Add ::wrap-mode
We use a different wrap-mode than GtkLabel, because we cannot just
resize the widget to make long words fit, we have to fit the size we are
given.
2022-06-12 03:10:50 +02:00
Benjamin Otte
393ef4d0a2 inscription: Fixate layout at top when it doesn't fit
Ellipsized and clipped layouts shouldn't reposition themselves according
to yalign when they don't fully fit.
2022-06-11 16:28:27 +02:00
Benjamin Otte
303bc3bb1b inspector: Use inscriptions for the rendernodes list 2022-06-11 02:15:08 +02:00
Benjamin Otte
bf5edc6b7c reftests: Add test for the overflow methods
Reference is using labels again
2022-06-11 02:15:08 +02:00
Benjamin Otte
7c034cc283 inscription: Set css name
We use "label" just like GtkLabel as the two widgets differ in the way
they are measured, but they should be styled the same.

If it turns out we change our opinion on this for specific cases, we
can add style classes later.
2022-06-11 02:15:08 +02:00
Benjamin Otte
e437a9c348 inscription: Add a11y support for text interface
This is entirely untested.
2022-06-11 02:15:08 +02:00
Benjamin Otte
1517c1813c inscription: Add ::text-overflow
Can't name it ::overflow, because that's taken by GtkWidget already
2022-06-11 02:15:08 +02:00
Benjamin Otte
01fcfc5c2a inscription: Add ::markup
Utility property that sets both the ::text and ::attributes properties,
mainly intended for use in ui files to ease translation support and bindings.
2022-06-11 02:15:08 +02:00
Benjamin Otte
3f4c88aad1 inscription: Add ::attributes property 2022-06-11 02:15:08 +02:00
Benjamin Otte
b8199bcc1f gtkpango: Add G_GNUC_WARN_UNUSED_RESULT
Guess who just spent 10 minutes in gdb and doesn't want to do that
again.
2022-06-10 04:34:23 +02:00
Benjamin Otte
abdbef1b5e inspector: Add inscription support
Allow searching for inscription text and show it in the label column.
2022-06-10 04:34:23 +02:00
Benjamin Otte
6ac7f0562b inspector: Use inscriptions in the object tree 2022-06-10 04:34:23 +02:00
Benjamin Otte
b6a8080b2f Add GtkInscription
A label alternative that renders itself into a given rectangle.

The main use case is cells in column view.

Related: #3334
2022-06-09 05:58:27 +02:00
Benjamin Otte
e4869938b7 listview: Fix clipping for horizontal listviews
Fixes a bug introduced with
commit 39645d3258
2022-06-07 19:21:46 +02:00
Benjamin Otte
fa1dca29b6 inspector: Allow searching for editable text
... and display it in the label column.
2022-06-07 17:33:04 +02:00
Benjamin Otte
9de027df65 video: Fix typo in docs 2022-06-07 05:56:15 +02:00
Benjamin Otte
39645d3258 listview: cull listitems that are out of view
Use set_child_visible(FALSE) on those widgets and don't allocate them.

This should usually be the majority of items, so it's quite a worthwhile
addition.

Idea by Ivan Molodetskikh.

Related: #3334
2022-06-07 03:20:11 +02:00
Matthias Clasen
19fb336c39 Fix ui files to work for translations
We need to keep using translatable="yes", since
that is what the installed its file is looking
for.

Fixes: #4957
2022-06-06 18:29:14 -04:00
Matthias Clasen
31da5f7e2a Merge branch 'expand-builtin-icontheme' into 'main'
Add more directories to the builtin hicolor index

Closes #4960

See merge request GNOME/gtk!4786
2022-06-04 10:44:48 +00:00
Matthias Clasen
0e6a3ab397 Merge branch 'ebassi/a11y-text-extents' into 'main'
a11y: Implement atspi.Text.GetCharacterExtents for GtkTextView

See merge request GNOME/gtk!4754
2022-06-02 17:13:53 +00:00
Carlos Garnacho
e895f7dd70 a11y: Transform GetCharacterExtents coords to native surface ones
These coordinates are "window"-relative, so transform textview coordinates
to the coordinate system of the GtkNative containing it.
2022-06-02 14:35:53 +02:00
Matthias Clasen
dae892d8f6 Add more directories to the builtin hicolor index
We haven't had any scalable directories in this list.
Add some. Since we seem to have settled on including
just actions and status as subdirectories for each
size, add scalable/actions and scalable/status.

Fixes: #4960
2022-06-02 06:38:12 -04:00
Christian Hergert
8f1db27b6b gtkmain: add support for GTK_DEBUG=invert-text-dir
This allows inverting the default text-direction in an application for
debugging, testing, and QA purposes. IDEs such as Builder may automate this
to encourage more application developers to test with a text-direction
different than their own.
2022-06-01 11:26:44 -07:00
Christian Hergert
63e9e7e899 builderparser: fix <lookup/> with interface types
If we have a <lookup name="foo" type="SomeInterface"> a runtime warning
would be emitted and the expression would fail to be created. This is
because the interfaces will likely be a GObject as well, meaning we check
the object type branch instead of the interface.

Instead, we need to use the fundamental type like other parts of the
expression system use.
2022-05-31 15:58:21 -07:00
Matthias Clasen
2623c396cb shortcutcontroller: Fix a typo 2022-05-30 16:27:03 -04:00
Sebastian Dröge
e61aecd67e Mark sequence parameter in GtkGestureClick::unpaired-release signal as nullable 2022-05-30 11:33:59 +03:00
Matthias Clasen
f9a3f13702 Merge branch 'main' into 'main'
GtkIMContextSimple: array bounds was not correctly checked

Closes #4771

See merge request GNOME/gtk!4748
2022-05-27 14:24:54 +00:00
Sebastian Keller
6e3dbc42a8 a11y: Realize GtkStackPage parent context before trying to get a ref
If a context is not realized, calling gtk_at_spi_context_to_ref() will
return a null ref, because its path has not been initialized yet. This
was already done for all other cases in get_parent_context_ref(), but
was missing for the GtkStackPage case.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4944
2022-05-25 14:56:05 +02:00
Emmanuele Bassi
7750a2c423 a11y: Implement atspi.Text.GetCharacterExtents for GtkTextView
Retrieve the location of a given offset in window-relative coordinate
space.
2022-05-23 15:54:13 +01:00
Matthias Clasen
393893b8db Merge branch 'blink-assertion' into 'main'
Remove an assertion that we hit

See merge request GNOME/gtk!4753
2022-05-23 14:08:43 +00:00
Matthias Clasen
b3e65bfdc1 Remove an assertion that we hit
It appears that we mess up accounting for blinking
cursors sometimes, and can hit blink_cb when there
is a nonempty selection.

Instead of asserting, warn and stop blinking.

Related: #4767
2022-05-23 08:28:00 -04:00
Benjamin Otte
72fe406c4d gesturedrag: Fix docs
Leftover from GTK3. Coordinates are widget relative everywhere now.
2022-05-22 12:45:28 +00:00
Víctor Marzo
3955633aa8 GtkIMContextSimple: array bounds was not correctly checked
Fixes #4771
2022-05-19 11:35:14 +02:00
Matthias Clasen
1fbca7a76a Merge branch 'let_selectable_label_mnemonic_self_focus' into 'main'
Allow selectable labels contents to be selected by mnemonic

See merge request GNOME/gtk!4741
2022-05-18 13:55:33 +00:00
Caolán McNamara
3f49d335d1 Allow selectable labels contents to be selected by mnemonic
expecially by the mnemonic of another label that targets it.

https://gitlab.gnome.org/GNOME/gtk/-/issues/4927

see also https://bugs.documentfoundation.org/show_bug.cgi?id=137748
2022-05-18 12:40:40 +01:00
Christian Hergert
b9574e119b checkbutton: fix critical when setting use-underline
This needs to make sure that we've created the label before applying the
setting on a child widget.

Fixes #4934
2022-05-17 12:28:25 -07:00
Matthias Clasen
c0747f2c2e Add an explicit harfbuzz dependency
We are using Harfbuzz api in the file chooser,
so lets make this official.
2022-05-15 10:37:24 -04:00
Benjamin Otte
61bb9bb935 listitemmanager: Clarify warning
Lars doesn't have an opinion on this problem anymore.

And when people see this warning, they should know what to do.
2022-05-14 16:53:44 +02:00
Matthias Clasen
8bd77441a9 Cosmetic fixes to objcopy hack
Preserve the elf section name that we would get
without the objcopy hack. Minimizing the differences
2022-05-14 07:53:47 -04:00
Luca Bacci
e1159dab93 GtkFileChooserWidget: Propagate keys from external entry to fcwidget at the BUBBLE phase
Now that we use event controllers we can forward keybindings from the
external entry to the filechooserwidget at the bubble phase.

Fixes #4905

References:
 * commit 1fb075dbca
 * commit 686116ba61
2022-05-13 14:19:14 +02:00
Matthias Clasen
122fa679a8 Merge branch 'wip/sophie-h/remove-param-nicks-blurbs' into 'main'
gtk: Remove all nicks and blurbs from param specs

Closes #4904

See merge request GNOME/gtk!4717
2022-05-12 02:18:02 +00:00
Matthias Clasen
7302407880 Merge branch 'wip/exalm/color-scales' into 'main'
Redesign GtkColorScale

See merge request GNOME/gtk!4720
2022-05-12 02:01:03 +00:00
Alexander Mikhaylenko
0f7d93492d theme: Redesign color scales
See https://gitlab.gnome.org/GNOME/libadwaita/-/issues/469

Since this style needs changes in color scales themselves, it makes sense
to have it in GTK as well.
2022-05-12 02:22:52 +04:00
Alexander Mikhaylenko
aee4475c0f range: Support border-radius for GtkColorScale troughs
With how this hack is organized, it's simpler to add more code here than
to pass it to GtkColorScale itself.
2022-05-12 02:21:51 +04:00
Alexander Mikhaylenko
1f61cb2251 coloreditor: Stop adding marks style to color scales 2022-05-12 02:21:34 +04:00
Christian Hergert
0382e3b46c actionmuxer: check for observer before unregistering
This can happen if the group can be resolved even when doing the initial
registration of an action as observer will not yet be in the GSList of
watchers (and therefore has no weak references).

Fixes a warning like the following:

 g_object_weak_unref: couldn't find weak ref
2022-05-11 14:43:31 -07:00
Christian Hergert
547b2891cb actionmuxer: set handler ids initially to zero
These were getting created with possible non-zero values and then inserted
into a hashtable where the readers may not know the state of the group.

Ensure those values are set to zero until we assign them below.
2022-05-11 14:43:24 -07:00
Sophie Herold
89614f5f72 inspector: Stop using blurb as tooltip
Does not make sense any longer if we don't set blurbs.
2022-05-11 18:16:44 +02:00
Sophie Herold
a546ae32d7 Remove all nicks and blurbs from param specs
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
2022-05-11 18:16:29 +02:00
Sonny Piers
5a0d6e3fc8 dropdown: Add UI definition example 2022-05-08 22:52:05 +02:00