Matthias Clasen
35488959b4
paned: Add a paned handle class
...
Instead of bending GtkGizmo to the breaking point,
split off a GtkPanedHandle class that just does
what is needed here. Its simpler, and lets us keep
GtkGizmo simpler too. Everybody wins.
2021-02-17 21:45:33 -05:00
Matthias Clasen
af1981eda2
popovercontent: Few small fixes
...
Forgot to include config.h. Oops, and we make things
a bit shorter still.
2021-02-17 21:44:53 -05:00
Matthias Clasen
41abda9f03
Make gtk_im_modules_init properly private
...
Putting non-exported symbols in public headers can
only lead to confusion and day drinking. Don't do it.
Fixes : #3676
2021-02-17 15:25:42 -05:00
Matthias Clasen
04daa236ad
Revert "gizmo: Add a css_changed function"
...
This reverts commit 39f72b3834
.
2021-02-16 23:51:14 -05:00
Matthias Clasen
31ceb4ddfb
Revert "gizmo: Chain up in css_changed"
...
This reverts commit bb0a1b0cfe
.
2021-02-16 23:51:14 -05:00
Matthias Clasen
c2f811dd29
popover: Add a popover content class
...
Instead of bending GtkGizmo to the breaking point,
split off a GtkPopoverContent class that just does
what is needed here. Its simpler, and lets us keep
GtkGizmo simpler too.
2021-02-16 23:51:14 -05:00
Jakub Steiner
edcd4c6207
Adwaita: control surface for resize tiled windows
...
- window resizing control area is implemented as where the shadows are drawn
- create a 'fake' shadow for the tiled case to allow easier resizing of
the tiled window ratio even if it's offset to the side of the border
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3670
2021-02-16 14:10:14 +01:00
Jakub Steiner
67b5a34bad
Adwaita: Avoid fine-tune scrollbars jumping
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3672
2021-02-16 11:59:45 +01:00
Matthias Clasen
bb0a1b0cfe
gizmo: Chain up in css_changed
...
css_changed is a vfunc that *must* chain up.
Failure to do so broke the resizing of overlay scrollbars,
amongst other things.
This bug was introduced in 39f72b3834
.
2021-02-15 14:26:52 -05:00
Matthias Clasen
2ac5c3282f
Merge branch 'lenient-compose-parsing' into 'master'
...
imcontext: Be more lenient in parsing Compose
See merge request GNOME/gtk!3201
2021-02-15 18:08:45 +00:00
Matthias Clasen
6b3c356eb7
Merge branch 'wip/jimmac/larger-smaller-scrollbar-gtk4' into 'master'
...
Adwaita: Scrollbar transitions and size
Closes #1886
See merge request GNOME/gtk!3204
2021-02-15 18:06:00 +00:00
Jakub Steiner
5c5cd34c2f
Adwaita: Scrollbar transitions and size
...
- tone down the size of the controller again
- transition between the indicator and control fluidly
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1886
2021-02-15 12:25:09 +01:00
Matthias Clasen
2f43b8dc49
imcontext: Improve compose table parsing
...
Avoid leaking value in error cases, and actually
emit a warning for a missing quote. Pointed out
by Peter Bloomfield.
2021-02-15 01:46:00 -05:00
Matthias Clasen
d2e074e36b
imcontext: Be more lenient in parsing Compose
...
X11 allows keysyms to be specified in addition to strings.
We only support the strings. In the past, we ignored everything
after the string. Go back to doing that, but issue a warning
that we've ignored the keysym.
2021-02-14 12:56:00 -05:00
Matthias Clasen
2623932886
Merge branch 'fix-compose-comments' into 'master'
...
Fix compose comments
Closes #3664
See merge request GNOME/gtk!3199
2021-02-14 17:25:58 +00:00
Matthias Clasen
f15aa2f3e5
imcontext: Fix a regression in Compose file parsing
...
We accidentally dropped the handing of # comments.
Bring it back. Test included.
Fixes : #3664
2021-02-14 11:56:24 -05:00
Matthias Clasen
52a2891933
window: Add some more details to css docs
...
Mention more of the supported style classes.
2021-02-14 11:22:44 -05:00
Matthias Clasen
7ebc3a9489
Update popover css docs
...
Mention that shadows are now possible.
2021-02-14 11:14:23 -05:00
Matthias Clasen
aa1d08687d
popover: Handle shadow changes
...
When the box-shadow css property of the contents
widget changes, queue a resize on the popover.
2021-02-14 10:12:10 -05:00
Matthias Clasen
39f72b3834
gizmo: Add a css_changed function
...
In a break from the current gizmo api, add a separate
setter, since the calls with long argument lists full
of NULL are getting out of hand.
2021-02-14 10:12:10 -05:00
Matthias Clasen
b948799778
popover: Support shadows
...
Use gdk_popup_layout_set_shadow_width to take shadows into
account when positioning popovers, and set the input region
to exclude the shadow, since we aren't doing interactive
resizing and the like.
When the popover has a beak, we make the surface size be
content size + shadow + tail, and then position the content
according to the final position inside this slightly too large
surface. The surface being too large doesn't matter, since we
set up an input region.
2021-02-14 10:11:17 -05:00
Matthias Clasen
b3a055a9b7
popover: Queue a resize when position changes
...
At least with an arrow, changing the position
requires a resize
2021-02-13 20:27:01 -05:00
Matthias Clasen
bd877ccf06
popover: Cosmetics
2021-02-13 20:26:54 -05:00
Timm Bäder
0d5957b97a
nativedialog: Remove unused run state
2021-02-12 08:39:40 +01:00
Matthias Clasen
9f10f9a595
Merge branch 'fix-network-places' into 'master'
...
placesview: Avoid use-after-free
See merge request GNOME/gtk!3186
2021-02-11 19:41:10 +00:00
Matthias Clasen
560e27a3f4
Merge branch 'wip/jimmac/tiled-shadow-fix-fix-gtk4' into 'master'
...
Adwaita: bring borders for tiled
Closes #3661
See merge request GNOME/gtk!3184
2021-02-11 17:04:47 +00:00
Emmanuele Bassi
a63a2b26cf
Ensure we don't overflow when using g_memdup2()
...
When we turn integers into size_t we should check we're not going to
make a mess.
2021-02-11 14:22:23 +00:00
Emmanuele Bassi
78e3908a00
gtk: Move from g_memdup() to g_memdup2()
...
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
2021-02-11 14:22:22 +00:00
Jakub Steiner
f953dfef11
Adwaita: bring borders for tiled
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3661
2021-02-11 15:16:57 +01:00
Matthias Clasen
95d48ac2e8
placesview: Avoid use-after-free
...
The places view has questionable code for handling
'destroy', which seems to trigger use-after-free in
some cases. Clean this up a bit by acknowledging the
cancellation fully, rather than relying on the
destroyed flag.
2021-02-11 09:14:34 -05:00
Matthias Clasen
e823fa6665
Merge branch 'fix-filter-value' into 'master'
...
css: Avoid an invalid read
See merge request GNOME/gtk!3181
2021-02-11 00:51:40 +00:00
Christian Hergert
c90ffc7363
snapshot: fix warning when asserts are disabled
2021-02-10 16:13:38 -08:00
Matthias Clasen
3eb4ec89f3
css: Avoid an invalid read
...
This was broken in ea7185bdb1
.
Pointed out by Christian Hergert.
2021-02-10 19:13:36 -05:00
Jakub Steiner
da64856f37
Adwaita: don't cast shadows for halt-tiled windows
...
- while the case of a single half tiled window casting shadow is valid,
the main use case for half tiled windows is when they have a neighbor.
The :backdrop should be enough of a focus indicator and we avoid shadow
casting on neighbors that are on the same Z level.
2021-02-09 18:57:31 +01:00
Christian Hergert
461fe36707
adwaita: disable shadows when window is maximized or fullscreen
...
These shadows cause a significant draw performance drop for maximized
windows. Disabling them increases the chances we can have faster scroll
performance of text.
There is some risk here for systems where they have a dock and you expect
the shadow to draw beneath that dock for transparency reasons.
2021-02-09 09:27:22 -08:00
Alexander Mikhaylenko
cf61d96188
headerbar: Null-check boxes when removing window controls
...
Prevent a crash when show-title-buttons value changes to FALSE during
destruction.
2021-02-08 18:46:35 +05:00
Alexander Mikhaylenko
319755662f
headerbar: Don't use gtk_widget_unparent() with GtkBox
...
gtk_widget_unparent() is for widget implementations, it's not supposed to
be used from outside.
2021-02-08 18:46:27 +05:00
Matthias Clasen
15697d5c0c
Merge branch 'focus' into 'master'
...
listbox: Fix handling of non-focusable rows
Closes #3633
See merge request GNOME/gtk!3152
2021-02-07 15:57:11 +00:00
Matthias Clasen
5f48764ac8
cssfiltervalue: Reject invalid filters
...
The Filter Effects Spec doesn't allow negative values
for most of the filter parameters.
2021-02-06 16:16:44 -05:00
Matthias Clasen
cc6fcbfc09
cssfiltervalue: Fix blur filter interpretation
...
According to https://www.w3.org/TR/filter-effects-1/ ,
the length passed to blur() is the standard deviation,
and according to https://www.w3.org/TR/css-backgrounds-3/#shadow-blur
the blur radius is twice the standard deviation.
2021-02-06 16:16:44 -05:00
Matthias Clasen
ea7185bdb1
cssfiltervalue: Implement drop-shadows
...
We have all the pieces, so this is surprisingly easy.
2021-02-06 16:16:43 -05:00
Matthias Clasen
429dfcf483
cssshadowvalue: Add a 'filter mode'
...
Shadow values created by gtk_css_shadow_value_new_filter or
gtk_css_shadow_value_parse_filter interpret their radius value
as standard deviation. Add a flag for this mode, and use it
where necessary.
2021-02-06 16:10:34 -05:00
Matthias Clasen
be3f352b59
cssshadowvalue: Add a parsing function
...
Add a variant of the parse function that parses
just a single (non-box) shadow, as required for
the drop-shadow filter.
2021-02-06 16:10:32 -05:00
Matthias Clasen
5b8896f1db
cssshadowvalue: Add gtk_css_shadow_value_pop_snapshot
...
This is the counterpart ot gtk_css_shadow_value_push_snapshot.
To make this easy, move the determination whether we need a
shadow out of the push function and save it.
2021-02-06 16:09:21 -05:00
Matthias Clasen
4e27de7df9
cssshadowvalue: Drop the underscore
...
Rename _gtk_css_shadow_value_parse to drop the underscore.
It was the only underscore-prefixed function in this file.
2021-02-06 16:08:19 -05:00
Matthias Clasen
9770872d12
css: Implement the drop-shadow filter
...
We have all the pieces, so this is surprisingly easy.
2021-02-05 21:37:14 -05:00
Matthias Clasen
de24b4f91b
cssshadowvalue: Add a parsing function
...
Add a variant of the parse function that parses
just a single (non-box) shadow, as required for
the drop-shadow filter.
2021-02-05 21:36:22 -05:00
Emmanuele Bassi
958005317b
Merge branch 'master' into 'master'
...
Improve the docs of GtkWidget and GtkGrid
See merge request GNOME/gtk!2946
2021-02-05 12:14:26 +00:00
Matthias Clasen
482b73c376
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Rewrite the long description for GtkDialog
Closes #3646
See merge request GNOME/gtk!3156
2021-02-05 00:10:47 +00:00
Maximiliano Sandoval R
3e2e6633b0
gtkshow: Fix doc typo
2021-02-04 21:02:22 +01:00