Matthias Clasen
9ebf3fac73
composetable: Add api to check tables
...
This copies the check_table code from gtkimcontextsimple.c,
in order to have an api for tests.
2021-02-01 19:40:22 -05:00
Matthias Clasen
be35c46ce9
composetable: Drop table debug code
...
This is better off in the tests that we are going to add.
2021-02-01 19:02:21 -05:00
Matthias Clasen
dbbcb13721
composetable: Parser fixes
...
We were not handling octal escapes right.
2021-02-01 16:05:05 -05:00
Matthias Clasen
edeaf9c040
imcontext: Drop GTK_MAX_COMPOSE_LEN
...
Drop GTK_MAX_COMPOSE_LEN from docs. It is no longer
used by GTK at all. We leave the define in place
for now, to avoid breaking 3rd party code that might
use it.
2021-02-01 12:31:23 -05:00
Matthias Clasen
61f709811c
composetable: Warn when ignoring things
...
We should at least give a hint that we've seen the line,
otherwise people will wonder why nothing happened.
2021-02-01 12:27:41 -05:00
Matthias Clasen
f7c4375509
composetable: parse long sequences
...
Allow compose sequences of up to 20 code points.
Fixes : #3521
2021-02-01 12:27:35 -05:00
Matthias Clasen
52fb900ced
composetable: Fix an off-by-one
...
Fix an off-by-one in the code parsing octal escapes
in compose files.
2021-02-01 12:10:05 -05:00
Matthias Clasen
031944ad30
imcontext: Stop using GTK_MAX_COMPOSE_LEN
...
Allocate the compose_buffer, and resize it when needed
to match the tables we use.
2021-02-01 12:10:05 -05:00
Matthias Clasen
bf8b974f68
imcontext: Code cleanup
...
Use g_clear_pointer instead of opencoding it in
multiple places.
2021-02-01 12:10:05 -05:00
Matthias Clasen
3d85d53e5d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2319
See merge request GNOME/gtk!3140
2021-02-01 06:20:40 +00:00
Matthias Clasen
094a346539
imcontext: Allow sequences of length GTK_MAX_COMPOSE_LEN
...
There was an off-by-one error, making us reject sequences
of this length. But the rest of the code handles them
just fine.
Fixes : #2319
2021-02-01 00:55:25 -05:00
Matthias Clasen
162814f969
imcontext: Improve an error message
...
This error message was misleading, as pointed out
by Ralf Jung.
2021-02-01 00:44:41 -05:00
Matthias Clasen
e39b5c99f1
imcontext: Add a precondition check
2021-02-01 00:43:44 -05:00
Matthias Clasen
8883243aaa
imcontext: Show preedit for compose sequences
...
Show the sequences as they are entered, using ⎄ for
the compose key, to match what IBus does nowadays.
Also handle backspace to allow corrections.
2021-02-01 00:37:43 -05:00
Matthias Clasen
89511eecf1
imcontext: Update our check for dead keys
...
A bunch of keysyms for dead keys have been added since this
code was last touched. Update the check to cover the full
range from dead_grave to dead_greek.
2021-01-31 23:56:24 -05:00
Matthias Clasen
2c304ca80d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3139
2021-02-01 01:48:47 +00:00
Matthias Clasen
bf4102e664
Merge branch 'wip/exalm/consumes-motion' into 'master'
...
Drag fixes and cleanups
Closes #3513
See merge request GNOME/gtk!3001
2021-02-01 01:34:45 +00:00
Matthias Clasen
7985d277b3
nativedialog: Add more docs
...
Emphasize that native dialogs aren't widgets, and are not
kept alive by GTK.
2021-01-31 20:25:44 -05:00
Matthias Clasen
de4b8d547b
Merge branch 'wip/exalm/activate' into 'master'
...
listitemwidget: Activate on release instead of press
Closes #3345
See merge request GNOME/gtk!3008
2021-02-01 00:32:05 +00:00
Ungedummt
4d11158d97
GtkGrid: Add xml example for GtkBuildable to docs
...
Added an example and a short discription for the properties
2021-01-31 10:19:14 +01:00
Ungedummt
293b81cad2
Fix small typo in the docs of GtkWidget
...
In a XML example was MyGrid as a class defined; replaced with GtkGrid
2021-01-31 10:19:08 +01:00
Michael McClurg
cd7ec8ac92
Document nullability of gtk_list_box_get_selected_row
2021-01-30 15:23:41 +00:00
Matthias Clasen
3dbf5038fa
Fix unsetting focus
...
Make _gtk_window_unset_focus_and_default queue the changes
for after the next draw. This achieves two things: first,
it avoids invalidating css at the wrong time (e.g. when
setting child-visible during size-allocation), and second,
it defers the focus change until after the widget is
hidden, so that moving the focus has the desired effect
of picking a different, visible widget.
Fixes : #3623
2021-01-29 21:41:16 -05:00
Emmanuele Bassi
988ebc2248
docs: Annotate XML fragments as such
...
This way we can get syntax highlighting.
2021-01-29 16:31:10 +00:00
Emmanuele Bassi
9f31e95420
docs: Escape bare tags
...
Otherwise tools processing the description of GtkWidget will be *very*
confused.
2021-01-29 16:31:10 +00:00
Emmanuele Bassi
3a076e26f7
docs: Use the appropriate syntax for code block language
2021-01-29 16:31:09 +00:00
Emmanuele Bassi
e3e85fc6f3
docs: Remove stray code block end marker
2021-01-29 16:31:09 +00:00
Alexander Mikhaylenko
11f3b7730c
windowhandle: Use drag threshold instead of double click threshold
...
Now that we have gtk_drag_check_threshold_double(), be consistent with
other draggable widgets and make sure we don't take over a drag before a
child does.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3513
2021-01-29 12:01:34 +05:00
Alexander Mikhaylenko
f63e6394ac
dragsource: Use double coordinates for checking drag threshold
...
If multiple nested widgets have drag sources on them, both using bubble
phase, we need to reliably pick the inner one. Both of them will try to
start dragging, and we need to make sure there are no situations where the
outer widget starts drag earlier and cancels the inner one.
Currently, this can easily happen via integer rounding: start and current
coordinates passed into gtk_drag_check_threshold() are initially doubles
(other than in GtkNotebook and GtkIconView), and are casted to ints. Then
those rounded values are used to calculate deltas to compare to the drag
threshold, losing quite a lot of precision along the way, and often
resulting in the outer widget getting larger deltas.
To avoid it, just don't round it. Introduce a variant of the function that
operates on doubles: gtk_drag_check_threshold_double() and use it instead
of the original everywhere.
2021-01-29 12:01:34 +05:00
Alexander Mikhaylenko
bbca4c38df
entry: Fix drag threshold check
...
It was passing offsets as current oordinates.
2021-01-29 12:00:10 +05:00
Alexander Mikhaylenko
28f5d26719
windowhandle: Don't drag on capture phase
...
This was needed to work around widgets claiming event sequences on press,
by ignoring them and starting the drag anyway unless they have certain
event controllers on them.
The most visible offender was GtkButton, but since the last commit it
doesn't claim the sequence anymore and we can remove the hack.
2021-01-29 12:00:10 +05:00
Alexander Mikhaylenko
bf2620f041
checkbutton: Claim sequence on release instead of press
...
Make it possible to drag windows from check buttons in future.
2021-01-29 12:00:10 +05:00
Alexander Mikhaylenko
870b82b541
button: Stop claiming event sequence on press
...
Currently GtkButton claims the sequence both on press and on release. Stop
claiming it on press and only do it on release, allowing drags to start
from it.
This will allow to remove a hack from GtkWindowHandle.
2021-01-29 12:00:10 +05:00
Matthias Clasen
da59c77ae2
widget: Use subpixel positioning
...
Before turning off pangos rounding of glyph positions,
we must check if the cairo we are using is new enough
to have working subpixel positioning (the relevant
cairo commit is 52a7c79fd4ff96bb5fac175f0199819b0f8c18fc).
2021-01-28 18:17:22 -05:00
Matthias Clasen
98c247ec29
label: Drop some unused includes
2021-01-28 12:27:07 -05:00
Matthias Clasen
38e2f9138d
Remove vestigial glade support
...
These files have not been kept up to date, and
glade doesn't work with GTK4 currently.
2021-01-28 12:27:07 -05:00
Matthias Clasen
3cc7d9b8c0
Move the gesture icons in the right place
...
Put these images into gtk/icons, where they belong.
2021-01-28 12:27:07 -05:00
Matthias Clasen
1ac9400712
Drop unused logo resource
...
The inspector no longer sets a window icon.
2021-01-28 12:27:07 -05:00
Matthias Clasen
10d5705b70
Reduce use of GtkStyleContext
...
Remove some unnecessary uses of GtkStyleContext where
we can directly go to the GtkCssStyle, and and drop
unnnecessary includes.
2021-01-28 12:27:07 -05:00
Matthias Clasen
2d0d579735
Unify border-spacing handling
...
Avoid using GtkStyleContext unnecessarily, just go
to the css node directly.
2021-01-28 12:27:07 -05:00
Matthias Clasen
ac0f524722
build: Redo the tools build
...
Move the tools directory to be toplevel, and instead of
recompiling sources twice, link them with the our new
static libgtk.a.
2021-01-28 12:27:07 -05:00
Matthias Clasen
06321511ad
builder-tool: Translate GtkImage:pixbuf
...
The pixbuf property doesn't exist anymore. It is
commonly set to a path in ui files, so translate it
to the file property.
2021-01-27 17:01:51 -05:00
Sophie Herold
b89376da55
widget: get_name() is not nullable
...
Partial revert of !2905
2021-01-27 17:49:17 +00:00
Matthias Clasen
eeb3dd3511
Merge branch 'fix-can-focus' into 'master'
...
widget: Fix can-focus
Closes #3610
See merge request GNOME/gtk!3123
2021-01-27 05:34:21 +00:00
Matthias Clasen
7b0ce11e46
Merge branch 'search-entry-capture' into 'master'
...
Search entry capture
Closes #3098
See merge request GNOME/gtk!3115
2021-01-27 05:14:30 +00:00
Matthias Clasen
8ef1d6a49c
widget: Fix can-focus
...
Setting can-focus to FALSE on a widget is supposed
to prevent focus from entering the entire subtree.
So when we grab focus directly to a widget, we need
to check the can-focus flag not just of the widget
itself, but all its ancestors.
Fixes : #3610
2021-01-26 23:45:06 -05:00
Matthias Clasen
7db60f958d
searchentry: Capture events in the bubble phase
...
This is an unfortunate naming clash, but it avoids
an event handling clash between the capture widget
and its children.
Fixes : #3098
2021-01-26 22:17:57 -05:00
Matthias Clasen
5ee7606779
css: Support colors in cross fades
...
The CSS Image Spec (Level 4) allows colors in
cross-fade expressions to specify solid-color images.
Support this.
2021-01-26 21:14:09 -05:00
Matthias Clasen
25409c5a5a
css: Add a constructor for GtkCssImageFallback
...
Add a way to create a solid color image.
2021-01-26 21:10:11 -05:00
Matthias Clasen
1258fcaaf4
css: Fix text-decoration-line support
...
This property needs to be treated as flags, not as
enum, since it should be possible to specify more
than one value, e.g.
text-decoration-line: underline overline;
Tests included.
Fixes : #3621
2021-01-26 17:53:14 -05:00
Matthias Clasen
1fe6fb6739
Merge branch 'circular-menubutton' into 'master'
...
Allow circular menubuttons
Closes #3423 and #3523
See merge request GNOME/gtk!3117
2021-01-26 12:47:38 +00:00
Matthias Clasen
80b1d55683
Merge branch 'css-overline' into 'master'
...
css: Support overline
See merge request GNOME/gtk!3116
2021-01-26 05:44:14 +00:00
Matthias Clasen
1cebc4316b
Allow circular menubuttons
...
Fixes #3523
2021-01-26 00:20:23 -05:00
Matthias Clasen
65a4118d50
css: Support overline
...
We can support text-decoration-line: overline,
since pango supports it now.
2021-01-26 00:04:04 -05:00
Matthias Clasen
4857829aaa
popover: Try to not exceed monitor bounds
...
When the natural size of the popover exceeds
the monitor width, clamp it to fit on screen.
This gives the Emoji chooser a chance to
work on phone screens.
Fixes : #3307
2021-01-25 23:33:04 -05:00
Matthias Clasen
2ea4574caf
emojichooser: Allow the section buttons to wrap
...
Use a flowbox instead of a horizontal box for
the section buttons at the bottom, so they can
wrap and allow for narrow layout.
We also need to stop giving the scrolledwindow
a content height, so it can shrink to make room
for more rows of section buttons.
2021-01-25 23:32:15 -05:00
Matthias Clasen
102b74f9eb
emojichooser: Make keynav work with != 7 columns
...
The number of 7 columns was hardcoded in a few places
related to keynav across sections. The flowbox does
not have an api for it, but we can find out anyway
how many columns there are.
2021-01-25 23:32:08 -05:00
Matthias Clasen
8a0d4dfa94
searchbar: Capture events in the bubble phase
...
This is an unfortunate naming clash, but it avoids
an event handling clash between the capture widget
and its children.
Fixes : #3098
2021-01-25 22:16:29 -05:00
Matthias Clasen
b4e645862a
searchbar: Fix documentation mishap
...
The css section was inserted between the example
and the sentence referring to it.
2021-01-25 22:15:56 -05:00
Matthias Clasen
ea48506a32
Merge branch 'simplify-get-module-path' into 'master'
...
modules: Simplify _gtk_get_module_path
See merge request GNOME/gtk!3113
2021-01-26 02:53:38 +00:00
Jan Alexander Steffens (heftig)
23f0a29260
modules: Simplify _gtk_get_module_path
...
Remove the bizarre loops.
2021-01-25 22:47:16 +01:00
Jakub Steiner
23af707b41
Adwaita: make scrollbars larger
...
When using scrollbars as active controls, rather than their primary role as indicators,
increase their size as click targets.
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1886
2021-01-25 14:15:22 +01:00
Matthias Clasen
344f9fcf05
css: Implement transform-origin
...
Implement most of transform-origin. We only
handle the xy components currently, which lets
us reuse the position value implementation that
is used for background-position.
2021-01-24 22:49:08 -05:00
Matthias Clasen
fe515c4c1c
testsuite: Link some tests statically
...
Link tests for private apis statically.
2021-01-23 10:34:57 -05:00
Matthias Clasen
14f0a0addb
Create a static library
...
Rearrange our build to create a libgtk.a for the the contents of gtk/,
and build libgtk-4.so from our per-subdirectory static libraries.
This will let us link tests statically for testing internal apis.
2021-01-23 10:31:23 -05:00
Matthias Clasen
0ef91c3ba8
Avoid a buffer overrun
...
We were putting the '\0' behind the end. Oops.
2021-01-22 13:56:04 -05:00
Matthias Clasen
39d5dd89c5
Avoid a heap-use-after-free
...
_gtk_gesture_cancel_sequence frees the struct pointed to by data,
so don't write to it afterwards. Found by asan.
2021-01-22 11:39:04 -05:00
Matthias Clasen
6c54abeca7
wayland: Explicitly announce ssd for kwin
...
Without this, kwin correctly assumes that we are
using client-side decorations. This is a port
of 32ae97f1
from GTK 3.24.
Fixes : #3609
2021-01-21 22:45:47 -05:00
Emmanuele Bassi
c46391420f
Merge branch 'ebassi/lazier-a11y' into 'master'
...
Lazier accessibility
See merge request GNOME/gtk!3102
2021-01-21 18:57:34 +00:00
Matthias Clasen
5a3c3d8210
Merge branch 'inspector-controllers' into 'master'
...
Inspector controllers
See merge request GNOME/gtk!3101
2021-01-21 18:15:57 +00:00
Emmanuele Bassi
95ceb49770
a11y: Make GtkATContext realization lazier
...
We only realize the ATContext on the top level, which will create an
GtkAtSpiRoot object and the corresponding GtkAtSpiCache object. Whenever
an AT connects to the accessibility bus, and asks for the various
objects, all the ATContext will be realized on demand.
2021-01-21 16:40:57 +00:00
Emmanuele Bassi
0bde58ffd7
a11y: Avoid signal emission during cache population
...
If we're responding to a request to get all the cached items, there's no
need to emit signals when adding an ATContext to the cache.
2021-01-21 16:40:57 +00:00
Matthias Clasen
ccd9827b63
inspector: Redo the actions page
...
Don't create widgets in bind, instead just set
the new action on the action-editor, and let it
recreate the parts that need to be recreated.
2021-01-21 10:25:13 -05:00
Matthias Clasen
db189cfb9f
inspector: Reshuffle action editor
...
Prepare the action editor for being able to change its
actions after creation.
2021-01-21 10:24:31 -05:00
Matthias Clasen
7527f181d5
inspector: Simplify action editor
...
We are not using the size group anymore, so drop it.
2021-01-21 10:20:21 -05:00
Matthias Clasen
c05b418512
inspector: Split out variant editor
2021-01-21 10:19:18 -05:00
Matthias Clasen
e97d996fe4
inspector: Redo the shortcuts page
...
Use a column view here.
2021-01-21 10:19:18 -05:00
Matthias Clasen
0537b167ca
inspector: Redo the controllers page
...
Use a column view, and only show the widgets own
controllers.
2021-01-21 10:19:18 -05:00
Matthias Clasen
fff6b35821
inspector: Redo the controllers page
...
Use a column view, and only show the widgets own
controllers.
2021-01-20 18:51:01 -05:00
Emmanuele Bassi
a1216599ff
Add rename-to annotation for GtkListStore.insert_valuesv()
...
The vector-based variant should shadow the variadic arguments function
in bindings.
2021-01-20 14:10:17 +00:00
Emmanuele Bassi
8fff0e0fdf
docs: Reformat GtkListStore.insert_values()
2021-01-20 14:10:17 +00:00
Matthias Clasen
5985b62f60
columnview: Redo indicator arrows
...
Use the same approach as GtkTreeViewColumn for sort
indicators. Luckily, the same css works for both.
2021-01-19 14:24:19 -05:00
Matthias Clasen
e7c29b989c
menbutton: Redo indicator arrows
...
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.
2021-01-19 14:02:23 -05:00
Matthias Clasen
2100e427d9
treeviewcolumn: Redo sort arrows
...
Instead of hardcoding icon names in the widget, use
sort-indicator.ascending and sort-indicator.descending styles
and set the icon to use with -gtk-icon-source. This lets themes
change the icon that is used here, without forcing all uses of
pan-up/down-symbolic to be treated the same.
Document this in the treeview CSS docs.
Fixes : #3577
2021-01-19 14:02:16 -05:00
Alexander Mikhaylenko
5968b10b0b
listitemwidget: Activate on release instead of press
...
Single click activation should only be done on release and not on press,
otherwise it breaks touch scrolling. Double-click activation still can be
done on press.
This matches the GtkListBox behavior as well.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3345
2021-01-19 12:36:32 +05:00
Matthias Clasen
1ac1147ecb
Merge branch 'check_button_activate' into 'master'
...
Add activate signal to GtkCheckButton
Closes #3525 and #3550
See merge request GNOME/gtk!3012
2021-01-19 04:06:01 +00:00
Matthias Clasen
6b7d56ac49
cellrenderertoggle: Fix css node handling
...
Commit cbbbf44dd4
tried to replace
gtk_style_context_save_named with an explicit
css node to save to, but it failed, and the failure
was showing up as crashes in the inspector.
Fix by Benjamin Otte.
Fixes : #3599
2021-01-18 20:52:59 -05:00
Thomas Holder
992cd088cf
gtk_file_chooser_set_current_name: fix type of name argument
...
The description says UTF-8 string, but the annotation said filename.
Cherry-picked from gtk-3-24 1573ff6803
2021-01-18 22:14:03 +01:00
Matthias Clasen
6aa893e091
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3437
See merge request GNOME/gtk!3087
2021-01-17 17:51:15 +00:00
Matthias Clasen
5aa03bcb0d
aboutdialog: Fix initial focus
...
When GtkAboutDialog was changed to derive from
GtkWindow, it lost the initial focus handling that
GtkDialog has. Reinstate some of it.
Fixes : #3437
2021-01-17 11:53:53 -05:00
Matthias Clasen
d7060025e0
inspector: Avoid a critical
...
Avoid a critical when closing the inspector with the
recorder page open.
2021-01-17 10:55:53 -05:00
Matthias Clasen
00883016af
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #3593
See merge request GNOME/gtk!3086
2021-01-17 14:20:13 +00:00
Timm Bäder
5ea3777599
widget: Fix gtk_widget_class_add_binding() argument name
2021-01-17 08:12:14 +01:00
Timm Bäder
a3949763f2
Add nullable annotations to GtkShortcutFunc
...
Fixes #3593
2021-01-17 08:11:42 +01:00
Matthias Clasen
1b961a9ae2
Merge branch 'surface-scale' into 'master'
...
Surface scale
Closes #3578
See merge request GNOME/gtk!3085
2021-01-17 05:23:22 +00:00
Timm Bäder
934b91f65f
label: Remove unneeded NULL guards
...
The pointers passed to GtkWidgetClass::measure cannot be NULL
2021-01-17 04:39:26 +01:00
Timm Bäder
c3050231d1
label: Refactor get_layout_location
...
Make this function shorter, the parameters non-nullable and the simple
cases more explicit.
2021-01-17 04:39:26 +01:00
Timm Bäder
ec8614e8e4
label: Fix a potential memory leak
...
This only happens in error cases so not very interesting. Anyway, try to
make scan-build happy.
2021-01-17 04:39:26 +01:00
Timm Bäder
cb41b96a9e
builderparser: Save finalizers in a GPtrArray
...
We get up to 370 of these when starting the widget-factory.
2021-01-17 04:39:26 +01:00
Timm Bäder
872b46a527
widget: Shorten get_halign() a bit
2021-01-17 04:39:26 +01:00
Timm Bäder
b1c8613dbe
accessible: Fix memory leak if context is unset
...
Unref the acessible values
2021-01-17 04:39:26 +01:00
Timm Bäder
de6cd4f0d2
builder: Use a GPtrArray when parsing signals
2021-01-17 04:39:26 +01:00
Timm Bäder
aec2fb939f
builderparser: Keep properties in a GPtrArray
2021-01-17 04:39:26 +01:00
Timm Bäder
69293db804
builderparser: Only allocate subparser stack when needed
...
Out of the 3.3k possibly_finish_subparser calls when opening the
widget-factory, only 300 need one.
2021-01-17 04:39:26 +01:00
Matthias Clasen
e905f7ff7c
native: Listen for scale changes
...
Connect to change notification for the surface
scale-factor property, and update the widgets
when it changes.
Fixes : #3578
2021-01-16 15:22:46 -05:00
Matthias Clasen
a5e929ce36
docs: Add details
...
Explain the difference between GtkPicture and GtkImage,
and when you might want to use which.
2021-01-16 14:45:20 -05:00
Matthias Clasen
691b6b88ea
inspector: Add a legend for the layout overlay
...
Colors are more useful if you know what they represent.
2021-01-16 12:38:24 -05:00
Matthias Clasen
144cf2d040
overlaylayout: Set the child type in the class
...
We don't need to override create_layout_child here,
and setting the child type has the advantage that
the layout properties are showing up in the inspector.
2021-01-15 22:35:11 -05:00
Matthias Clasen
d89ff71819
Flip margin-start and -end in RTL
...
We lost this at some point, but the widget margins
are still meant to be relative to the text direction.
Fixes : #3583
2021-01-15 14:58:21 -05:00
Matthias Clasen
f60d245e32
Make HighContrastInverse a dark variant
...
Make HighContrastInverse available as the dark variant of HighContrast,
in addition to being a standalone theme. This regularizes our theme
variants, and doesn't hurt.
2021-01-14 22:55:52 -05:00
Matthias Clasen
f04e5bd590
Make Adwaita-dark available as a theme
...
This makes Adwaita-dark available as a standalone
theme.
2021-01-14 22:42:50 -05:00
Emmanuele Bassi
ef33ec639c
Merge branch 'ebassi/aspect-frame-doc' into 'master'
...
Ebassi/aspect frame doc
See merge request GNOME/gtk!3073
2021-01-12 16:50:31 +00:00
Emmanuele Bassi
39e07a8d56
Document limits of gtk_aspect_frame_get_ratio()
...
The GtkAspectFrame:ratio getter will return the value set, not the
actual ratio computed in case GtkAspectFrame:obey-child is TRUE.
2021-01-12 12:28:18 +00:00
Emmanuele Bassi
5286743cbe
Document GtkAspectFrame properties
2021-01-12 12:28:00 +00:00
Emmanuele Bassi
58bb998ef0
docs: GtkAspectFrame is not a GtkFrame any more
2021-01-12 12:23:14 +00:00
Emmanuele Bassi
a56b2900dd
a11y: Fix leak
...
Introduced by me in commit 03b60a2d5e
.
2021-01-12 12:01:29 +00:00
Emmanuele Bassi
ff34124394
Merge branch 'ebassi/atspi-path-sanitize' into 'master'
...
a11y: Sanitize the AT-SPI object path further
See merge request GNOME/gtk!3071
2021-01-12 11:36:52 +00:00
Emmanuele Bassi
03b60a2d5e
a11y: Sanitize the AT-SPI object path further
...
When falling back to g_get_prgname(), we need to take into account that
the program name may be the full argv[0] path, which will end up messing
the DBus object path.
2021-01-12 11:15:28 +00:00
Matthias Clasen
73fb28a058
iconhelper: Recreate the texture when needed
...
When the icon size changes, we want to reload themed
icons.
This was showing up as the GtkImage in about dialogs
getting a big size with the same small icon upon
changing -gtk-icon-size in the inspector.
2021-01-11 17:50:05 -05:00
Matthias Clasen
65eaf8e8c4
Adwaita: Make about dialog icons big
...
Use 128 as the icon size for the image widget
in about dialogs.
2021-01-11 17:50:05 -05:00
Matthias Clasen
beeedb5141
aboutdialog: Set icon-size for the logo
...
Make it explicit that we want large icons here.
2021-01-11 17:50:05 -05:00
Matthias Clasen
1d40750a60
aboutdialog: Set a style class
...
Add the .aboutdialog style class to toplevel
widget of about dialogs, similar to what we
do for e.g. GtkAssistant.
2021-01-11 17:46:55 -05:00
Matthias Clasen
96baf9769a
about dialog: Remove manual icon sizing
...
We have icon theme code to do that for us.
2021-01-11 17:46:55 -05:00
Matthias Clasen
5044031b53
Merge branch 'wip/kalev/gcc-11' into 'master'
...
Avoid diagnostics for gcc-11 false positive out of bounds accesses
See merge request GNOME/gtk!3064
2021-01-11 22:04:52 +00:00
Kalev Lember
c514c41d0e
Avoid diagnostics for gcc-11 false positive out of bounds accesses
...
This is a patch by Jeff Law <law@redhat.com> done in downstream Fedora
to fix the build with gcc 11.
2021-01-11 17:19:36 +01:00
Jakub Steiner
45848c5298
Merge branch 'wip/jimmac/adjust-for-contemporary-trends' into 'master'
...
Wip/jimmac/adjust for contemporary trends
Closes #3568 and #3560
See merge request GNOME/gtk!3060
2021-01-11 16:09:08 +00:00
Jakub Steiner
b5cb2f7e41
Adwaita: update image assets
...
- reflect button styling
- ignore backdrop for non buttons
2021-01-11 16:24:22 +01:00
Jakub Steiner
378ad75d48
Adwaita: scales border
...
- remove -alt specialcasing for a straight forward border like
everything else and avoid broken :dark and HC
2021-01-11 16:00:32 +01:00
Jakub Steiner
6a047e53a8
Adwaita: less dramatic :active for undecorated buttons
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3575
2021-01-11 15:00:38 +01:00
Jakub Steiner
31a7bc70c9
Adwaita: fix button border logic
...
- tint borders dark on non default / blue / red buttons
- just use plain $borders_color otherwise
- fixes HC/HCi
- ditch -alt buttons
2021-01-11 14:08:57 +01:00
Jakub Steiner
874cae1dab
Adwaita: flatter, lighter buttons
...
- lighten up for contrast, less of an oldschool gradient
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3568
2021-01-11 13:50:32 +01:00
Jakub Steiner
7a3dd41dba
Adwaita: round progress and levelbars
2021-01-11 13:50:32 +01:00
Jakub Steiner
149962670a
Adwaita: :checked:active and checked:hover states
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3560
2021-01-11 13:50:32 +01:00
Jakub Steiner
849e3c8b4b
Adwaita: flat scales, progressbars and level bars
2021-01-11 13:50:32 +01:00
Jakub Steiner
c9807f5afe
Adwaita: remove edge highlights
...
- flat is the name of the game
- kids scream make it flat
- simplify mixins
2021-01-11 13:50:32 +01:00
Matthias Clasen
2b6b35d91f
build: Add a sassc feature
...
Add an option to disable css rebuilds. This allows
to build GTK from release tarballs (Which are including
the css) without a sassc dependency.
2021-01-09 01:30:13 -05:00
Matthias Clasen
441d944c08
droptarget: Some docs cleanups
...
Fixes #3565 , among other things.
2021-01-08 22:24:42 -05:00
Chun-wei Fan
99b2da4c47
gtk/gtksecurememoryprivate.h: Include glib.h
...
Some compilers somehow do not have `inline` defined, so include glib.h
to ensure that keyword is defined.`
2021-01-08 22:24:42 -05:00
Matthias Clasen
8243b5493b
a11y: Avoid __ prefixes for variable names
...
Seems that msvc does not like that.
2021-01-08 22:24:42 -05:00
Matthias Clasen
2a79152762
Merge branch 'mcatanzaro/company-unparent-warning' into 'master'
...
Add critical if widget has a parent during dispose
See merge request GNOME/gtk!3053
2021-01-07 18:37:28 +00:00
Benjamin Otte
4761641098
Add critical if widget has a parent during dispose
...
This is a refcounting bug. Be very verbose about it instead of trying to
call a function that releases a reference to the widget without
references.
2021-01-07 11:39:32 -06:00
Michael Catanzaro
afaa275dc8
gtkbuilder: fix recommendations that no longer make sense in GTK 4
...
In GTK 3, it was pretty much always better to use
gtk_builder_new_from_whatever() rather than
gtk_builder_add_from_whatever(). But in GTK 4, this is no longer
generally true. Let's add some context on when you want to use one or
the other.
2021-01-07 11:34:42 -06:00
Matthias Clasen
d8d8322912
Merge branch 'wip/jimmac/flat-buttons' into 'master'
...
Adwaita: fine tune flat button styling
Closes #3481
See merge request GNOME/gtk!3046
2021-01-07 13:42:42 +00:00
Jakub Steiner
3a5eee7dbe
HC: switch border color
...
- lighten inverted HC borders while darkening the regular/light variant
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3460
2021-01-07 12:44:53 +01:00
Jakub Steiner
0cda6f42b8
Adwaita: fine tune flat button styling
...
- enough contrast for hover and active, while noticably different in
normal nad headerbar context (and both light and dark variants).
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3481
2021-01-07 12:12:55 +01:00
Matthias Clasen
7583810c90
Merge branch 'wip/exalm/headerbar' into 'master'
...
headerbar: Prepend start window controls instead of appending
See merge request GNOME/gtk!3044
2021-01-06 22:10:25 +00:00
Alexander Mikhaylenko
fd073deea9
headerbar: Prepend start window controls instead of appending
...
Make sure they are always in the correct position.
2021-01-06 22:04:55 +05:00
Matthias Clasen
5652ab0a61
Merge branch 'macos-ci' into 'master'
...
Macos ci
See merge request GNOME/gtk!3032
2021-01-06 14:52:11 +00:00
Matthias Clasen
2ff23b08be
Merge branch 'wip/jimmac/headerbar-specialcasing' into 'master'
...
Adwaita: specialcase switches and scales for headerbars
Closes #3504
See merge request GNOME/gtk!3043
2021-01-06 14:40:36 +00:00
Jakub Steiner
e657da6658
Adwaita: specialcase switches and scales for headerbars
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3504
2021-01-06 13:02:21 +01:00
Jakub Steiner
fd00aa98ea
HC: special case .dim-label
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3507
2021-01-06 12:46:35 +01:00
David Lechner
eb6fbf907f
doc: fix annotation for GtkCssLocation
...
GtkCssLocation is a type so it should be prefixed with # rather than @.
2021-01-06 04:32:09 +00:00
Christian Hergert
4035f86b6d
macos: use deprecated NSOnState for older systems
2021-01-05 16:37:30 -08:00
Christian Hergert
f2e0097cac
gtk: fix brace initialization for bloom filter
...
This was breaking CI for macOS and it is a simple enough change to ensure
that just works for the internal buckets.
2021-01-05 16:21:05 -08:00
Matthias Clasen
ca9801f5fb
3to4: Remove GtkToolbar::toolbar_style
...
The property was removed (with the rest of the widget),
so keeping it around in the ui file makes no sense.
Testcase included.
2021-01-05 13:58:58 -05:00
David Lechner
a5b88a53c2
docs: fix parameter reference in gtk_bitset_contains()
...
This fixes an error in the doc comments where the first parameter was
referred to as @bitset instead of @self.
2021-01-05 11:39:43 -06:00
Matthias Clasen
f974c5343e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3038
2021-01-05 16:49:53 +00:00
Matthias Clasen
56af472cfc
a11y: Only spew help once
...
Make GTK_A11Y=help only spew once, and avoid a warning
when we do.
2021-01-05 11:15:33 -05:00
Matthias Clasen
b79c26b39e
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!3029
2021-01-05 15:20:25 +00:00
Timm Bäder
42fedfc870
csstokenizer: Keep a GString for name parsing around
...
We only every parse one of those at a time, so keep a GString around for
it. This way we don't have to create a new GString every time we parse
an identifier. Doesn't spare us the strdup though.
2021-01-05 08:53:13 +01:00
Timm Bäder
24836c0351
csstokenizer: Add separate init functions for token types
...
Using a variadic function is just awkward there. Use different init
functions and use them as appropriate; we already know which one to call
everywhere.
2021-01-05 08:53:13 +01:00
Timm Bäder
21b6c8b5d8
builder: Remove unused typedef
2021-01-05 08:53:13 +01:00
Timm Bäder
41fb6f6a8e
builder: Remove unused function prototype
2021-01-05 08:53:13 +01:00
Timm Bäder
071ea6b559
builderparser: Use GPtrArray for stack
2021-01-05 08:53:11 +01:00
Matthias Clasen
8f585f7a53
video: Realize the media stream before setting a file
...
This makes it so that we obtain a GL context before
creating the GstSink, so we at least advertise our
ability to handle GL buffer.
Gstreamer still won't send us any.
2021-01-04 15:00:36 -05:00
Jakub Steiner
fe7b11b4e9
Adwaita: increase contrast of popover separators
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3535
2021-01-04 17:55:44 +01:00
Yetizone
601dfeeff9
checkbutton: Add activate signal to work with gtk_widget_activate()
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3525
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3550
2021-01-04 17:25:53 +02:00
Matthias Clasen
cf623ce774
Merge branch 'window-geometry-info' into 'master'
...
gtk/window: remove GtkWindowGeometryInfo from public header file
See merge request GNOME/gtk!3028
2021-01-04 13:55:08 +00:00
Timm Bäder
256b094b13
messagedialog: Modernize source file
...
Move vfunc implementations above class_init, remove unneeded prototypes,
properly indent everything and remove trailing whitespace
2021-01-03 11:01:29 +01:00
Timm Bäder
699adb0b10
widget: Refactor gtk_widget_class_set_template()
...
Don't call gbytes_get_data/get_size so often and exit early if the given
bytes is already precompiled.
2021-01-03 11:01:29 +01:00
Timm Bäder
c91b5eaa41
widget: Inline setup_template_child() into only caller
...
This is a pretty short and self-contained function.
2021-01-03 11:01:29 +01:00
Timm Bäder
7e1f20bf4c
icontheme: Make a parameter const
2021-01-03 11:01:29 +01:00
Timm Bäder
f9fe640905
settings: Overallocate property_values
...
Instead of walking the pspecs twice and checking for the owner_type,
just allocate n_pspecs entries. They are the same value right now
anyway, but even if they aren't it doesn't hurt to have a few extra ones
allocated.
2021-01-03 11:01:29 +01:00
Timm Bäder
34ea99006f
settings: Load keyfiles ourselves
...
This does not change anything in the case where the .init file does not
exist. We still hit the disk once. Otherwise, we now only hit it once
instead of twice and avoid a potential race-condition.
2021-01-03 11:01:29 +01:00
Timm Bäder
06cce81a97
widget: Use gtk_widget_get_native() in get_surface_allocation()
2021-01-03 11:01:29 +01:00
Timm Bäder
4a1a7940d5
gtksettings: Remove unused defines
2021-01-03 11:01:29 +01:00
Timm Bäder
1108d00014
render: Inline function into only caller
2021-01-03 11:01:29 +01:00
Timm Bäder
034672e84e
frame: Remove unnecessary function
...
Just call the vfunc directly in the only place we used to call the old
wrapper
2021-01-03 11:01:29 +01:00
Timm Bäder
00c885c93c
gesture: Replace tabs
2021-01-03 11:01:29 +01:00
Timm Bäder
114f0bd8d6
box: Replace tabs with spaces
2021-01-03 11:01:29 +01:00
Timm Bäder
24c67efdfd
scrolledwindow: Use g_clear_handle_id
2021-01-03 11:01:29 +01:00
Timm Bäder
6a3748146d
viewport: Small cleanup
...
No need to check for visibility before calling gtk_widget_measure().
2021-01-03 11:01:29 +01:00
Timm Bäder
92ec754737
widget: Move quark_builder_set_id declaration to other GQuarks
2021-01-03 11:01:29 +01:00
Timm Bäder
d11fbbc478
widget: Re-arrange some more functions
2021-01-03 11:01:29 +01:00
Timm Bäder
f11f0da11c
wiget: Fix whitespace issues
...
Switch from tabs to spaces everywhere consistently and remove all
trailing whitespace.
2021-01-03 11:01:29 +01:00
Timm Bäder
ebdf2989f8
widget: Move a few vfunc implementations above class_init
...
And save us the prototypes at the top of the file this way.
2021-01-03 11:01:29 +01:00
Timm Bäder
bc35c5d494
nevertrigger: Remove unused instance members
2021-01-03 11:01:29 +01:00
Timm Bäder
70a3e5e8ce
shortcutmanager: Use g_list_store_find()
...
We require glib 2.66 these days, so we can unconditionally use
g_list_store_find().
2021-01-03 11:01:29 +01:00
Timm Bäder
74ff61a937
gesturelongpress: Remove a useless cast
...
We already get a GtkGestureLongPress here.
2021-01-03 11:01:29 +01:00
Timm Bäder
280d7e57bd
gesturelongpress: Keep the pspec around
...
So we can use it to notify(), like we do everywhere else.
2021-01-03 11:01:29 +01:00
Timm Bäder
03f5a368ec
label: Remove unused private functions
2021-01-03 11:01:29 +01:00
Timm Bäder
0b15aba82a
label: Remove mnemonics_visible_apply_recursively from private header
...
This is only used in gtklabel.c
2021-01-03 11:01:28 +01:00
Timm Bäder
d8fa9de93a
label: Modernize source file
...
Try to sort toplevel functions to minimize unnecessary function
prototypes at the beginning of the file, get rid of all tabs and
trailing whitespace.
2021-01-03 11:01:28 +01:00
Timm Bäder
71efa96ef2
gesturestylus: Only add histroy element if translation succeeded
...
Instead of always doing it and then undoing it if the translation does
not succeed.
2021-01-03 11:01:28 +01:00
Timm Bäder
e336fe2bf8
gesturestylus: Retrieve event and controller widget only once
...
Make it clear that these are not gonna chance while iterating the loop.
2021-01-03 11:01:28 +01:00
Matthias Clasen
c804645382
video: Tweak the docs
...
Point out the limitations and use cases of GtkVideo
and mention that GtkPicture can display video just fine.
2021-01-02 12:21:03 -05:00
Matthias Clasen
0ba5631100
video: Pause on unset too
...
When new media stream is set on the GtkVideo
widget and we're autoplaying, pause the old one.
Otherwise, the music keeps playing unexpectedly.
2021-01-02 01:33:48 -05:00
Matthias Clasen
f2e5775380
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3506 and #3530
See merge request GNOME/gtk!3024
2021-01-01 22:48:11 +00:00
Matthias Clasen
20f3d1608d
video: Be consistent about play/pause
...
Always check that the stream is prepared, and the
widget is mapped, before calling gtk_media_stream_play().
2021-01-01 16:25:54 -05:00
Matthias Clasen
29afe5a688
video: Stop playing when appropriate
...
When the widget gets unrealized or hidden, pause
the mediastream. Otherwise, audio might keep playing
unexpectedly.
2021-01-01 15:17:59 -05:00