Timm Bäder
24415a6ffb
cssimageurl: Explicitly check for local_error != NULL
...
This should always be the case since gdk_texture_new_from_file should
always set the error when it returns NULL, but make it explicit anyway.
2021-09-18 13:08:46 +02:00
Timm Bäder
ae08aa3622
constraintsolver: Remove a dead assignment
2021-09-18 12:53:41 +02:00
Timm Bäder
c2ab1f172d
window: Fix mnemonics-visible getter+setter annotations
2021-09-18 08:29:18 +02:00
Timm Bäder
136a3f6e5a
stackswitcher: Expand child buttons
...
Fixes #4196
2021-09-18 08:29:18 +02:00
Timm Bäder
2bc82da34d
inspector: Cache if we have ever constructed a window
...
Silly optimization to get rid of
gtk_main_do_event
gtk_inspector_handle_event
gtk_inspector_window_get_for_display
g_object_get_data
showing up in profiles even though it's useless since we've never even
created any inspector window in the first place.
2021-09-18 08:29:18 +02:00
Georges Basile Stavracas Neto
02bb23486f
filechooserwidget: Return an id in get_choice()
...
gtk_file_chooser_widget_get_choice() is supposed to return the option
id of the choice, but it currently is returning the option label.
Return the option id instead.
2021-09-18 00:22:05 -03:00
Georges Basile Stavracas Neto
bc0d9488ee
filechooserwidget: Match choice id from "options"
...
When choices are added to the file chooser widget, the options of
that choice are stored object data under the "options" key. However,
gtk_file_chooser_widget_set_choice() was checking for "choices".
Retrieve the options from the "options" key stored data object data.
2021-09-18 00:20:42 -03:00
Matthias Clasen
9cfce67d0f
textview: Remove a dead store
...
Pointed out by clang.
2021-09-17 22:06:21 -04:00
Matthias Clasen
295d406207
listitemmanager: Add a few assertions
...
This might help poor static analyzers.
2021-09-17 22:06:21 -04:00
Matthias Clasen
c4e558da46
imcontextsimple: Rewrite a function slightly
...
This hopefully avoids upsetting static analyis.
2021-09-17 20:02:12 -04:00
Matthias Clasen
be1a60d5d0
label: Remove a dead assignment
...
It may have quieted gcc at some point, but
it upsets clang nowadays. Remove it.
2021-09-17 19:54:16 -04:00
Benjamin Otte
cf3830704b
icontheme: Fix variable mixup leading to crashes
...
Note: Don't have 2 variables named "icon" and "gicon", you will screw
them up.
reftests included.
Fixes #4269
2021-09-17 17:41:13 +00:00
Matthias Clasen
76d31ff04b
Merge branch 'menu_button_a11y_improvements' into 'master'
...
Set correct accessible relations for GtkMenuButton
Closes #4254
See merge request GNOME/gtk!3950
2021-09-17 16:51:52 +00:00
Emmanuele Bassi
15ffd49efb
Apply 4 suggestion(s) to 1 file(s)
2021-09-17 16:26:00 +00:00
Matthias Clasen
37a54eb9fc
Merge branch 'matthiasc/for-master' into 'master'
...
gsk: Add a test for transform_bounds
See merge request GNOME/gtk!3966
2021-09-17 16:22:04 +00:00
Matthias Clasen
52a8492887
rendernodepaintable: Provide accurate aspect ratio
...
Since we report width and height as integers, the
default implementation of this introduces rounding
errors. This shows up in the node-editor, as having
uneven scale factors like sx=1.0 and sy=1.0035.
Text nodes don't handle uneven scales like that well
and overdraw.
2021-09-17 10:28:49 -04:00
Lukáš Tyrychtr
ba5d010e39
Delete unneccessary comment and make other more descriptive
2021-09-17 15:11:26 +02:00
Matthias Clasen
0cce92ab19
Merge branch 'fix-typo' into 'master'
...
gtkcolorbutton: Fix documentation
See merge request GNOME/gtk!3965
2021-09-17 10:52:59 +00:00
James Westman
f95c21b67c
gtkcolorbutton: Fix documentation
2021-09-16 23:53:42 -05:00
Benjamin Otte
37a7c6780a
icontheme: Implement gtk_icon_theme_lookup_by_gicon() for textures
...
More feature parity.
Before this, it would have worked just as well - just going via a PNG
bytes step inbetween.
2021-09-17 04:31:46 +02:00
Benjamin Otte
e58f70d7bb
pixbufutils: Don't hardcode formats
...
Just let the loaders figure out the file format themselves.
2021-09-17 02:34:15 +02:00
Benjamin Otte
4fcf54757f
icontheme: Insist that people provide proper values
...
Seriously...
2021-09-17 02:29:59 +02:00
Benjamin Otte
b5da07f0e1
icontheme: Use textures more
...
We were going via GLoadablieIcon/GInputStream for everything previously
and we have no API for that with GdkTexture.
With this commit, gdk-pixbuf isn't used anymore when starting
widget-factory for anything but SVG.
2021-09-17 02:12:07 +02:00
Benjamin Otte
a85f4ec6c2
icontheme: Load textures directly when possible
...
This doesn't fix the codepaths for SVG (both for recoloring and
resizing) and doesn't handle streams yet.
2021-09-17 02:02:51 +02:00
Matthias Clasen
fecb31b706
builder: Stop using pixbufutils
...
We can just use gdk_pixbuf_new_from_resource here.
2021-09-17 02:02:51 +02:00
Matthias Clasen
729ad8e64a
cssimageurl: Just create a texture directly
...
We don't need to use the pixbufutils api here.
2021-09-17 02:02:51 +02:00
Matthias Clasen
dcd873a6d8
builder: create textures without pixbufs
...
Load textures using the GdkTexture apis, without
going through a pixbuf first.
2021-09-17 02:02:51 +02:00
Benjamin Otte
679c93e843
texture: Add private can_load() function
...
... and use it to load textures in gtk_picture_set_from_file().
2021-09-17 00:25:22 +02:00
Jakub Steiner
ed679703b8
theme: make toggled tbuttons in toolbars visible
...
- do what Alex does in libadwaita
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4264
2021-09-16 12:47:26 +02:00
Benjamin Otte
7fd8899092
pixbufutils: Simplify function
2021-09-15 22:00:41 -04:00
Matthias Clasen
8b85e7f35a
Annotate gtk_get_default_language as const
2021-09-14 16:38:08 -04:00
Matthias Clasen
d7909dccdc
Annotate gtk_editable_get_chars as malloc
2021-09-14 16:38:08 -04:00
Matthias Clasen
7773ae4538
csstypes: Add annotations and inlines
...
Inline _gtk_css_change_for_sibling and
_gtk_css_change_for_child, and mark a few
other functions as const or malloc.
2021-09-14 16:38:08 -04:00
Matthias Clasen
bec44acdeb
Annotate some builder apis as malloc
2021-09-14 16:38:08 -04:00
Matthias Clasen
5bfac597f6
Annotate gtk_accelerator_get_default_mod_mask as const
2021-09-14 16:38:08 -04:00
Matthias Clasen
44a031c3c1
Annotate gtk_css_tokenizer_get_location as const
2021-09-14 16:38:08 -04:00
Matthias Clasen
be885c888f
cssparser: Mark some functions as pure and malloc
2021-09-14 16:38:08 -04:00
Lukáš Tyrychtr
0120ff3518
Merge branch 'master' into menu_button_a11y_improvements
2021-09-14 15:34:14 +02:00
Matthias Clasen
2e63b53b1e
Merge branch 'fix_accessible_described_by' into 'master'
...
Fix generation of accessible description in presence of described by relations
See merge request GNOME/gtk!3948
2021-09-14 13:29:28 +00:00
Lukáš Tyrychtr
955d50a080
Fix generation of accessible description in presence of described by relations
...
The loop going through the relation list should have stopped on the NULL sentinel value, however it never accesed the next list element.
2021-09-14 14:33:30 +02:00
Lukáš Tyrychtr
b664b2d1fd
Set correct accessible relations for GtkMenuButton
...
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
2021-09-14 14:26:18 +02:00
Alexander Mikhaylenko
8f9a5175f0
media-controls: Make play button flat
...
Match the volume button.
2021-09-14 12:23:03 +05:00
Alexander Mikhaylenko
099c923679
searchbar: Vertically center the close button
2021-09-14 12:22:45 +05:00
Julian Sparber
cdc1fa166d
stack: Dispose children before emitting items-changed
...
This makes sure that the `GListModel` returned by
`gtk_stack_get_pages()` actually has the items removed before
`items-changed` is emitted.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4255
2021-09-13 17:19:05 +02:00
James Westman
0782c8a051
gdk_rgba_parse: Support HSL colors
2021-09-10 16:56:42 -05:00
Matthias Clasen
d75246a543
inspector: Cosmetics
...
Make some settings entries smaller, and make the
scales match in size. Also, inline adjustments
in the ui file, since we can do that now.
2021-09-05 12:59:11 -04:00
Matthias Clasen
f703744564
Merge branch 'ebassi/accel-parse-doc' into 'master'
...
Improve the gtk_accelerator_parse() docs
See merge request GNOME/gtk!3921
2021-09-04 23:39:10 +00:00
Matthias Clasen
754212d0f9
textview: Invalidate Pango contexts
...
We need to invalidate the Pango contexts when
font settings change. Use the new helper
gtk_widget_update_pango_context to make it less
likely that we forget to update some things.
2021-09-04 15:42:05 -04:00
Matthias Clasen
a9b81577c6
widget: Provide a helper for updating pango contexts
2021-09-04 15:42:05 -04:00
Matthias Clasen
eaa2dada54
Rename an internal function
...
It occupies a name I want to reuse for something else.
2021-09-04 15:42:05 -04:00