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
Matthias Clasen
2d3885a44a
center layout: Fix handling of expanding center child
...
We were not taking spacing into account when adjusting
the size of an expanding center child, causing it to slip
under the end child at times.
Fixes : #3506
2021-01-01 11:02:57 -05:00
Matthias Clasen
a4baac7193
docs: Complete a sentence
...
Fixes : #3530
2021-01-01 09:40:40 -05:00
David Lechner
4fb70c5e4d
gtk/window: remove GtkWindowGeometryInfo from public header file
...
GtkWindowGeometryInfo is only used by static methods in gtkwindow.c
so it doesn't need to be in the public header file.
2020-12-30 01:32:27 -06:00
Matthias Clasen
878b34fae3
gtk4-encode-symbolic: Add debug output
...
Add a --debug option that makes this tool produce
some debug output that can be helpful in tracking
down why symbolic svgs are broken.
2020-12-29 21:30:52 -05:00
Matthias Clasen
5fe433418d
Merge branch 'mcatanzaro/#3509' into 'master'
...
message dialog: use title style only if there is secondary text
Closes #3509
See merge request GNOME/gtk!3015
2020-12-29 17:47:01 +00:00
Michael Catanzaro
2336120010
message dialog: use title style only if there is secondary text
...
If there is no secondary text, then the primary text is just a message,
not a title, and should not use title style.
This partially reverts 1e3ec7c1f9
. The
message dialog nown looks like it used to in GTK 3. However, it's still
styled only using a style class rather than using pango markup, as in
GTK 3.
Fixes #3509
2020-12-29 11:15:14 -06:00
Matthias Clasen
0d54d73a51
Fix menu item alignment with submenus
...
We were not aligning model button labels with nesting
submenus with indicators in their containing menu.
This was visible in the application demo of gtk4-demo.
2020-12-29 12:10:35 -05:00
Timm Bäder
108933b655
Merge branch 'wip/chergert/volatile-fixes' into 'master'
...
types: fix various use of volatile in type registration
See merge request GNOME/gtk!2865
2020-12-29 07:49:12 +00:00
Matthias Clasen
daded2bc86
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3004
2020-12-27 05:21:26 +00:00
Matthias Clasen
bc7619abaf
Merge branch 'gtkclip' into 'master'
...
gtk: remove GtkClipboard leftovers
See merge request GNOME/gtk!2991
2020-12-27 04:32:26 +00:00
Matthias Clasen
459d6e1349
Merge branch 'wip/carlosg/for-master' into 'master'
...
gtk/gesturestylus: Convert motion history from surface coordinates
Closes #3491
See merge request GNOME/gtk!2999
2020-12-27 04:30:38 +00:00
Emmanuel Gil Peyrot
84c6708366
Remove unused static inline function
...
This was causing a warning on AArch64 since __LITTLE_ENDIAN__ and
__BIG_ENDIAN__ weren’t set, but the functions were actually completely
unused.
2020-12-25 16:16:43 +01:00
Carlos Garnacho
cf20cfd31e
gtk/gesturestylus: Convert motion history from surface coordinates
...
Motion history coordinates are based on GdkSurface coordinates. Transform
the coordinates from the GtkNative they are received on, accounting for the
possible transforms (e.g. due to window borders and shadows).
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3491
2020-12-24 19:59:51 +01:00
Matthias Clasen
7e579bb59a
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2997
2020-12-24 07:13:22 +00:00
Benjamin Otte
96e1b85c2c
gdkarray: Add a "stolen" boolean to splice()
...
If set to TRUE, does not call the free func for the removed items.
This can be used to move items between arrays without having to do the
refcounting dance.
2020-12-24 06:38:45 +01:00
Benjamin Otte
71e616d17e
listview: Use the correct scroll policy
...
Use the horizontal policy for horizontal decisions, not the vertical
one.
This broke in 0011ce949c
.
2020-12-24 06:38:45 +01:00
Benjamin Otte
8d014d6cb0
roundedbox: Remove unused API
2020-12-24 06:38:45 +01:00
Benjamin Otte
f7f8990f7a
picture: Fix copy/paste error in docs
2020-12-24 06:38:45 +01:00
Benjamin Otte
d6f288427a
video: When autoplaying, start playing once the video is prepared
...
This fixe video sources with longer loading times not automatically
playing.
2020-12-24 06:38:45 +01:00
Matthias Clasen
6bd0dc3e78
colorbutton: Correct the css docs
...
Mention the wrapper colorbutton node.
2020-12-23 09:03:07 -05:00
Matthias Clasen
4f0c920a8e
fontbutton: Correct the css docs
...
Mention the wrapper fontbutton node.
2020-12-23 08:59:58 -05:00
Matthias Clasen
b0b793dd94
menubutton: Correct the css docs
...
We are using menubutton instead of button.popup now.
2020-12-23 08:56:18 -05:00
Matthias Clasen
efbb649eee
modelbutton: Center titles
...
The centering of titles was broken in b5b81dea7f
.
Make it mostly work again by adding an empty end indicator.
Related: #3405
2020-12-23 00:51:51 -05:00
Matthias Clasen
5cd2ee927a
window: Release application in destroy
...
We used to do this; it was lost in some life-cycle
reshuffling.
2020-12-22 20:34:13 -05:00
Marc-André Lureau
90dfb5e138
gtk: remove GtkClipboard leftovers
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-12-22 16:39:54 +04:00
Matthias Clasen
e854b90293
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!2990
2020-12-22 04:53:31 +00:00
Matthias Clasen
6d042d9e61
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2988
2020-12-22 02:29:03 +00:00
Matthias Clasen
fcd449f0d4
modelbutton: Remove an unused field
...
We're not using the centered field anymore.
2020-12-21 17:45:01 -05:00
Michael Catanzaro
ab1b117d91
Fix buffer overruns in 'gtk-builder-tool simplify'
...
Oops, here we allocate only one byte for each pointer we want to store.
We need to multiply by the size of a pointer.
2020-12-21 15:39:34 -06:00
Matthias Clasen
466484176f
Merge branch 'ebassi/docs-for-master' into 'master'
...
Ebassi/docs for master
See merge request GNOME/gtk!2983
2020-12-21 19:22:38 +00:00
Matthias Clasen
147386189f
inspector: Show glyphs as in node files
...
Reuse the glyph serialization code from gsk to
show glyphs in the same way here.
2020-12-21 13:11:46 -05:00
Emmanuele Bassi
b1d952b8a2
docs: Add examples for GtkDropTarget
...
Like we did for GtkDragSource.
2020-12-21 17:11:42 +00:00
Emmanuele Bassi
b9bcdbbfdc
docs: Add examples of GtkDragSource use
...
The description is a bit terse; we should help out application
developers some more.
2020-12-21 17:03:59 +00:00
Yetizone
c4a8c0893b
box: improve documentation
...
Rephrase a function parameter description and remove "." from all function parameters descriptions
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3499
2020-12-21 17:26:23 +02:00
Timm Bäder
e90f5e8a20
gskpango: Don't copy fg color
...
No need to do that here, we copy it in to the individual render nodes
anyway.
2020-12-21 15:23:25 +01:00
Timm Bäder
cf352374ae
gskpango: Correct a comment
...
Not all other draw calls will use cairo.
2020-12-21 13:23:28 +01:00
Timm Bäder
98b99201b0
gskpango: Remove bounds rect
...
We only need this to render shapes and trapezoids, i.e. only when
falling back to cairo. Remove code to measure the layout and convert the
ink_rect to a graphene_rect_t from gtk_snapshot_append_layout() and do
it when drawing shapes and trapezoids instead.
2020-12-21 12:56:38 +01:00
Timm Bäder
bce4d669ee
gskpango: Fix a potential cairo_t leak
...
The previous early return did not cairo_destroy() it.
2020-12-21 12:49:06 +01:00
Timm Bäder
e7a326e230
label: Refactor get_layout_location()
...
Rename a few local variables to be clearer about whether they belong to
the widget or to the layout.
Remove a workaround for an old bug that is no longer valid. We don't
underallocate the layout anymore. Aways center vertically, with respect
to the yalign.
2020-12-21 12:44:01 +01:00
Timm Bäder
9eaeaa8452
label: Refactor snapshot()
...
Use two early-out style if statements to reduce indentation in this
entire function.
2020-12-21 12:32:32 +01:00
Timm Bäder
2031c5bf90
textlayout: Remove dead offset_y code
2020-12-21 10:26:03 +01:00
Timm Bäder
0b4ed8d791
renderborder: Avoid 0 width outline color nodes
2020-12-21 10:26:03 +01:00
Timm Bäder
c34f98931e
layoutoverlay: Avoid adding transparent color nodes
...
We have a region for the border here, but the color is defined as
transparent black because we don't want to render anything for it.
This way, the generated .node file for the listbox demo in gtk4-demo
with enabled layout borders is 3.5MB instead of 3.8MB.
2020-12-21 10:26:03 +01:00
Timm Bäder
2feac2772f
layoutoverlay: Avoid adding 0 sized color nodes
...
This way, the output node file of the listbox demo in gtk4-demo with
enabled layout borders is only 3.8MB instead of 12MB.
2020-12-21 10:26:03 +01:00
Timm Bäder
21299cc7e4
icontheme: Make some constant values const
2020-12-21 10:26:02 +01:00
Timm Bäder
e747ea7dfd
pixbufutils: Only convert icon size to string once
2020-12-21 10:26:02 +01:00
Timm Bäder
810cd7881e
icontheme: Make icon_paintable_ensure_texture() return an unowned value
...
It's private, has only one caller and that one doesn't need the extra
ref.
2020-12-21 10:26:02 +01:00
Timm Bäder
e6f6d1e478
main: Add & use gdk_event_dup_axes()
...
The way this code is written trips up scan-build. Add
gdk_event_dup_axes() and use it in gtkmain.c.
2020-12-21 10:26:02 +01:00
Emmanuele Bassi
14bf45a0d5
3to4: Remove GtkCheckButton:draw-indicator
...
The property was removed from the widget, so we need to remove it from
UI files too.
Fixes : #3492
2020-12-18 23:14:24 +00:00
Matthias Clasen
f31765d5dd
Merge branch 'ebassi/mnemonic-label-remove' into 'master'
...
a11y: Fix removing mnemonic widgets
See merge request GNOME/gtk!2970
2020-12-18 00:00:48 +00:00
Emmanuele Bassi
af0973c847
a11y: Fix removing mnemonic widgets
...
We must not use the variadic arguments version with GList, as it expects
a pointer to a GtkAccessible.
2020-12-17 15:49:00 +00:00
Emmanuele Bassi
e71f6b0bc0
docs: Note the caveat on GtkEditable signals with delegates
...
We cannot bubble up ::insert-text and ::delete-text signals from the
delegate to the wrapper editable without causing an infinite recursion,
due to how the signals are designed; ideally, we would have decoupled
signal emission from virtual functions *before* releasing GTK4, but now
that we have, we can't break the contract.
2020-12-17 15:13:43 +00:00
Emmanuele Bassi
1738724e4a
Notify properties on deletion in PasswordEntryBuffer
...
The GtkEntryBufferClass.deleted_text() behaviour changed between GTK3
and GTK4, which means any subclass of GtkEntryBuffer is now responsible
for emitting the "notify" signal for the "text" and "length" properties.
Without this, the GtkText delegate widget used by GtkPasswordEntry would
not be able to communicate changes in the contents of its buffer.
Fixes : #3484
2020-12-17 15:01:35 +00:00
Jakub Steiner
addcf57b4d
Adwaita: flat button adjustments
...
- normally lighter (on bg_color)
- darker for headerbar
- undecorated checked buttons were never style properly (even gtk3)
see page2 volume buttons
Finetunes https://gitlab.gnome.org/GNOME/gtk/-/issues/3427
2020-12-17 12:20:29 +01:00
Sebastian Keller
02f0681344
settings: Change gtk-cursor-aspect-ratio from float to double
...
Float properties can not be read from keyfiles. This was causing changes
to this property in settings.ini to be ignored. Fix this by changing it
to a double.
Technically this change could be considered an API break, but there are
no users of this property as float yet and it is early enough to expect
there to never be any.
Also document this change in the 3 to 4 migration guide since in gtk 3
this setting will be kept a float.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3441
2020-12-16 22:35:36 +01:00
Emmanuele Bassi
e3de92f1ea
docs: Fix annotation for GtkSearchEntry::activate
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
2ffa2be64e
doc: Document missing GtkNotebook types
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
387078b40c
docs: Document GtkNativeDialogClass
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
5203bf0b83
docs: Document GtkTreeViewColumn::clicked
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
fb93baeae4
docs: Add missing description for GtkWidget::move-focus
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
cc9528eaec
docs: Add missing documentation to GtkStatusbar
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
73dda96711
docs: Add missing stanzas for gtk_test_accessible API
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
ab59c47880
docs: Add missing documentation to GtkPopover
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
e4b7847904
docs: Fix documentation of GtkGestureStylus
...
Document all the signals, and fix the syntax for boolean values.
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
308115ebae
docs: Add gtk-doc stanza for GtkExpander::activate
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
1cb72536ea
docs: Fix syntax of GtkEntry::activate signal
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
fc4402b456
docs: Ignore gtkpasswordentryprivate.h
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
077aec5d32
docs: Add missing documentation for GtkTextCharPredicate
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
548949214c
docs: Add missing documentation GtkNative
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
2aec47f56f
docs: Add missing documentation for GtkCellRenderer
2020-12-16 16:29:00 +00:00
Jonas Ådahl
142f7862ed
gdk/toplevellayout: Change API to be about intent, not full state
...
When being fullscreen, and wanting to unfullscreen but not caring about
whether to go unmaximized or maximized (as this information is lost), if
the GdkToplevelLayout represents the full intended state, we won't be
able to do the right thing.
To avoid this issue, make the GdkToplevelLayout API intend based, where
if one e.g. doesn't call gdk_toplevel_set_maximized() with anything, the
backend will not attempt to change the maximized state.
This means we can also remove the old 'initially_maximized' and
'initially_fullscreen' fields from the private GtkWindow struct, as we
only deal with intents now.
2020-12-16 14:16:08 +01:00
Jonas Ådahl
b6412adc32
gtk/window: Check widget mappdness and not surface mappedness
...
When deciding whether to call gdk_toplevel_present(), check the
mappedness of GtkWidget instead of the mapped-ness of GdkSurface, as the
latter is mapped asynchronously, while the former is direct state of the
GtkWindow itself.
This fixes an issue where calling e.g. gtk_window_maximize() shortly
after showing it didn't take effect, as hadn't been mapped yet. While
maximizing after showing is racy, and will likely glitch from time to
time, the correct thing to do is still to maximize and handle whatever
state the compositor configured the window to be in.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3466
2020-12-16 11:56:41 +01:00
Emmanuele Bassi
ea5e186bb8
Hide GtkTextAttributes functions
...
The type is private, so making functions operating on it public is
pointless.
2020-12-15 16:20:21 +00:00
Emmanuele Bassi
69b181f263
Remove boxed type for GtkCrossingData
...
The GtkCrossingData type is completely private, so there's no point in
having a boxed type for it.
2020-12-15 15:55:15 +00:00
Emmanuele Bassi
474b4ac1af
build: Use Meson support for dylib versions
...
Do not hand-code it inside GTK's meson.build.
2020-12-15 12:47:05 +00:00
Emmanuele Bassi
99e0929d6c
build: Use a consistent style for Meson files
2020-12-15 12:46:59 +00:00
Emmanuele Bassi
e75e44bdcc
build: Remove duplicate definition
...
The `GTK_COMPILATION` symbol is defined in gir_args.
2020-12-15 11:47:32 +00:00
Emmanuele Bassi
7975bbfcaa
build: Remove linker flags from static libraries
...
We only need hardening linker flags on the libgtk shared library;
internal static libraries don't really need them.
2020-12-15 11:36:20 +00:00
Matthias Clasen
e2afb59a0b
Merge branch 'matthiasc/for-master' into 'master'
...
Avoid adding // to resource paths
Closes #3469
See merge request GNOME/gtk!2947
2020-12-14 13:14:32 +00:00
Jakub Steiner
daa5d5aead
Merge branch 'dropdown-searchbar' into 'master'
...
dropdown: Improve search bar styling
See merge request GNOME/gtk!2948
2020-12-14 09:39:38 +00:00
nana-4
34d99ea1d0
Adwaita: Improve emoji picker styling
...
- Add borders around the main scrollable content, like most other
places.
- Set padding and spacing on .emoji-searchbar and .emoji-toolbar in a
more proper way.
- Remove unused button.emoji-section label styles.
2020-12-14 05:26:39 +09:00
nana-4
90355c0b27
emojichooser: Add .emoji-searchbar style class
...
Similar to .emoji-toolbar, it would be nice to have this for styling.
2020-12-14 05:26:13 +09:00
nana-4
538cf9e294
dropdown: Improve search bar styling
...
As per the mockup. See:
https://gitlab.gnome.org/Teams/Design/os-mockups/-/blob/master/dropdown-lists/dropdown-lists.png
2020-12-14 05:08:59 +09:00
Matthias Clasen
96a300b2de
Merge branch 'wip/jimmac/button-shed' into 'master'
...
headerbar window controls & clean up flat button extend
Closes #3427
See merge request GNOME/gtk!2942
2020-12-12 02:51:05 +00:00
Matthias Clasen
aeca9cb7ba
Avoid adding // to resource paths
...
The GResource machinery is not forgiving about this
sort of thing.
Fixes : #3469
2020-12-11 21:47:54 -05:00
Carlos Garnacho
612d3bca7d
gtk/window: Bring back L-shaped resize corners
...
These ended up square in the various refactors. Make them again L-shaped
by extending these along the edge being checked. This means we have to
check for corner positions in all edges, though.
2020-12-12 01:42:42 +01:00
Carlos Garnacho
e9fe270e94
gtk/scrolledwindow: Handle full scroll sequences only
...
In order to do this, leverage smooth scroll handling into the capture
phase scroll controller, controlled by ::scroll-begin in the propagation
phase controller.
There's 2 cases here:
- A child widget handles scroll. The scrolled window does not get
::scroll-begin, the child widget handles the full scroll sequence.
- No child handles scroll, the scrolled window gets ::scroll-begin,
and transfers control of scrolling to the capture phase controller.
As scrolling is performed, the pointer may fall into scrollable children,
but the scrolled window will be capturing the scroll events, so these
won't be seen by the child widgets.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/593
2020-12-12 01:42:42 +01:00
Carlos Garnacho
8402665c55
gtk/eventscrollerscroll: Handle smooth events in discrete controllers
...
We let smooth scroll events that don't trigger a ::scroll signal through.
This is unintended, these are handled, even if just accumulated.
This fixes cases like GtkSpinButton inside GtkScrolledWindow, where both
would handle events, until the GtkSpinButton eventually shifts away from
underneath the pointer.
Brought up at https://gitlab.gnome.org/GNOME/gtk/-/issues/593
2020-12-12 01:42:42 +01:00
Carlos Garnacho
79090f1755
gtk/entrycompletion: Ensure to show first row when shown, not allocated
...
This code was here in gtk3 to cater for the completion window being
positioned. That was only to meant once as long as the completion window
was shown.
This doesn't work as well for gtk4, ::size-allocate gets propagated from
the toplevel, so happens much more often for the completion window, this
ends up with the completion position being reset to the first row
frequently.
Do this simply once when popping up the completion, instead.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3083
2020-12-12 01:42:42 +01:00
Carlos Garnacho
3d84a38867
gtk/treeview: Position editable widgets correctly wrt left border
...
The coordinates are already widget-local here, not transformed by the
adjustment positions. Using the adjustment value here ends up pushing
the entry far from the left border.
The correct minimum value here is 0, which matches the treeview left
border.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3009
2020-12-12 01:42:42 +01:00
Carlos Garnacho
5155fac94f
gtk/modelbutton: Handle unpaired releases
...
Let model buttons handle unpaired releases, these may happen indirectly
e.g. due to other child menus being opened at the time. Clicking would
dismiss the menu, but the menu item beneath the pointer would not get
activated.
We can handle that button release though via ::unpaired-release, so
there's no second click required.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3463
2020-12-12 01:42:42 +01:00
Carlos Garnacho
7a4d15dc67
gtk/range: Move button release handling to GtkGestureDrag
...
Tracking it through the GtkGestureClick becomes a bit cumbersome for
handling of simultaneously pressed buttons. We can track ::stopped,
but that also emits for a number of situations where we want drag to
continue.
However, the GtkGestureDrag is grouped with the click gesture, and
knows better when to finish the drag gesture (not just because of a
button release), so hook drag and zoom mode finalization there.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3426
2020-12-12 01:42:42 +01:00
Emmanuele Bassi
2c97d44281
docs: Fix the Widget as Buildable example
...
The layout properties use an old name.
2020-12-11 23:41:51 +00:00
Matthias Clasen
324683993e
docs: Update references to GtkWindow:fullscreened
...
The property got renamed from fullscreen to fullscreened.
Update all references.
2020-12-10 09:10:21 -05:00
Jakub Steiner
f6f6241627
Adwaita: special case flat headerbar buttons
...
- make sure the hovers and pushed states are legible on a tintend headerbar
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3427
2020-12-10 14:24:29 +01:00
Jakub Steiner
6a33bed353
Adwaita: flat button :hover and :active
...
- special case undecorated button hovers
2020-12-10 14:16:25 +01:00
Jakub Steiner
f83ee0be23
Adwaita: headerbar_color > headerbar_bg_color
...
- semantic correction
2020-12-10 13:58:42 +01:00
Jakub Steiner
7442bdc383
Adwaita: duplicate selector
...
- awkward duplicate selector that should have no effect
(resulting in the same css)
2020-12-10 13:51:10 +01:00
Emmanuele Bassi
b8a651df47
Share the popcount() fallback for MSVC
...
We use __builtin_popcount() in a couple of places, so it makes sense to
have it in one header.
2020-12-09 16:06:52 +00:00
Matthias Clasen
c5dd34344f
Merge branch 'wip/carlosg/for-master' into 'master'
...
Wip/carlosg/for master
Closes #3426 and #3264
See merge request GNOME/gtk!2933
2020-12-09 15:04:01 +00:00