Commit Graph

28301 Commits

Author SHA1 Message Date
Sebastian Dröge
1f96d57a0f GtkInfoBar: Add type Gtk.Box annotation for action_area/content_area getters 2020-02-18 10:45:34 +02:00
Matthias Clasen
86ac6d447c Merge branch 'recursive-search' into 'gtk-3-24'
GtkSearchEngineSimple: Disable recursive search

See merge request GNOME/gtk!1356
2020-02-14 13:15:07 +00:00
António Fernandes
90a006b362 treeview: Prevent fuzzy centered expander arrows
We want expander arrows to be vertically centered in their row, so we
pass the cell area's height to the renderer.

However, if the cell area's height is an odd number while the
"expander-size" style property is an even number, or vice versa, the
arrow will be centered in a half pixel, and fuzzily rendered.

So, round the render height to the same parity as the expander-size.

(This is not necessary for the arrow width because it's assumed equal
to the "expander-size" style-property.)
2020-02-14 08:38:29 +00:00
António Fernandes
5d46f3c2e7 treeview: Respect expander-size style property.
An expander arrows's render width is supposed to be derived from the
"expander-size" style property.

However, we are actually rendering it for a width equal to
expander-size + 1. This results in ugly blurry rendering.

There is a comment justifying this "+ 1", which has been there for
almost 2 decades. But the justification doesn't seem to apply to
the current code, so the original motivation is likely obsolete.

Let's remove this "+ 1" to render the arrow to a width exactly equal
to the "expander-size" style property.
2020-02-14 08:38:29 +00:00
António Fernandes
0494090afa Revert "treeview: respect expander-size style property"
This reverts commit d6a29e1b8c.

It fixed blurry rendering of expander arrows.

However, it also introduced a regression in that the arrows are no
longer vertically centered if rows are taller than twice the
expander-size style property.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1464
2020-02-14 08:38:29 +00:00
Alberts Muktupāvels
840ef37bfd infobar: fix initial window position
Call gtk_widget_set_allocation after chaining up to parent class
to ensure that GtkInfoBar has correct allocation. Otherwise x and y
is set to zero causing wrong window position in gtk_info_bar_realize.

This fixes info-bar-message-types.ui reftest.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/1428
2020-02-14 00:50:27 +02:00
Michael Catanzaro
fe2370a5ba window: prepare for window destruction after gtk_window_close()
Epiphany is doing something weird after calling gtk_window_close(),
because by the time the callback executes, the window has no GdkWindow.
Frankly, I don't know what's happening there, but we should probably not
crash.

Fixes #2424
2020-02-10 22:09:10 -06:00
Jakub Steiner
70ebd7e237 Merge branch 'Gtk_3_24_focus_rings' into 'gtk-3-24'
Outline/focus ring border-radii fixes

See merge request GNOME/gtk!1384
2020-02-05 12:18:55 +00:00
Carlo Lobrano
b50ccaea12 Adwaita: always use link specific colors for link selector
link target uses `$selected_bg_color` and `$selected_fg_color` for the
definition of some selectors (e.g. selected).

While `$link_color` and `$link_visited_color` are based on
`$selected_bg_color`, this does not seem coherent.

Replacing `$selected_*g_color` in link target style with link colors
defined in `_colors.scss file`.
2020-02-05 13:14:26 +01:00
Feichtmeier
cfd530db0d Outline/focus ring border-radii fixes
- change %linked_XXX class outline-radii to match the border-radii
- adapt the .dialog-action-area buttons to this
2020-02-04 12:34:20 +00:00
Jakub Steiner
b0f24fd8d5 Adwaita: generate up to date CSS
- the typography SASS changes weren't generated in the CSS
2020-02-04 11:09:38 +01:00
Matthias Clasen
09b14437a8 modelbutton: Update a11y states
We took care to set the proper role on our accessible object,
but we forgot to update the state for check and radio button
roles.
2020-01-31 19:08:09 +01:00
John Ralls
e2c34b9db7 Merge branch 'issue2225' into gtk-3-24 2020-01-30 10:31:57 -08:00
Xavier Claessens
68bd429edd GtkSearchEngineSimple: Disable recursive search
It is too slow to be useful, rely on the Tracker engine to perform recursive search.

Fixes: #2392.
2020-01-26 07:47:26 -05:00
Olivier Fourdan
b1d55f2c85 gtksettings: Remove display from cache on closing
GTK caches the settings per display in a static `GArray`, keeping a
reference to the `GdkDisplay` as the key.

However, when closing the display, the corresponding entry is not
removed from the cache in `GtkSettings`.

So when reopening again a `GdkDisplay`, if the new address matches one
of the previously closed display, the cache will return the existing
`GtkSettings` from the cache, which still holds a reference to the old
`GdkScreen` which was freed along the `GdkDisplay`.

To avoid the issue, make sure to remove the `GdkDisplay` and
corresponding `GdkSettings` when closing the `GdkDisplay`.

Also, care must be taken not to recreate the `GdkSettings` and re-add
the `GdkDisplay` to the cache once the display is closed, and make sure
callers of `gtk_settings_get_for_display()` can deal with a returned
value being `NULL` if the display is closed.

Fixes: commit 360a3c1690 - "Use a cheaper way to store settings per
display"
2020-01-23 17:34:47 +01:00
John Ralls
eabaf90076 Match returns annotation on quartz version of gtk_drag_dest_get_target_List. 2020-01-22 20:53:38 -08:00
John Ralls
c3deff17a6 Check target list not null to prevent segfault. 2020-01-22 20:53:38 -08:00
John Ralls
44c033ccb8 Ensure that GtkDragDestSite is inited to 0. 2020-01-22 20:53:38 -08:00
John Ralls
81c42faa5a Handle NSException from removeItemAtIndex. 2020-01-22 20:53:38 -08:00
Emmanuele Bassi
e8cd4d4d33 Merge branch 'wip/muktupavels/issue-1084' into 'gtk-3-24'
Complete startup notification sequence for remote invocations

See merge request GNOME/gtk!1296
2020-01-22 15:07:27 +00:00
Jakub Steiner
9b11707a52 Adwaita: general typography classes
- many moons and some iterations later, these are the suggested
      general typographic styles. Already being referenced in apps like
      Banner Viewer (for now shipping custom definitions)

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1808
2020-01-22 12:06:31 +01:00
Matthias Clasen
11568b158f inspector: Avoid an array overrun
Commit 3f56af3738 added a new value to the
GdkInputSource enum, forgetting that the inspector
has an array of names to match this enum.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2385
2020-01-18 10:53:30 -05:00
Yariv Barkan
e229c6fe81 gtkgesture: Fix get-center for touchpad gestures
Touchpad gestures have only a single event sequence. The current
'center' of the gesture is the starting point + accumulated deltas.
Update gtk_gesture_get_bounding_box_center() accordingly.
2020-01-17 22:37:55 +02:00
Matthias Clasen
c6ce7fedd5 Merge branch 'wip/muktupavels/fix-critical-warning' into 'gtk-3-24'
menu: fix critical warning

See merge request GNOME/gtk!1182
2020-01-17 18:16:42 +00:00
Jakub Steiner
5d38dd5618 Adwaita: update checkbox & radio
- minor update to checkboxes and radios,
  approved for gtk3 as well.

See https://gitlab.gnome.org/GNOME/gtk/issues/2291
2020-01-15 22:18:38 +01:00
Matthias Clasen
6d3138fe6b Merge branch 'fix-2378' into 'gtk-3-24'
fontchooser: Fix size label not being hidden

See merge request GNOME/gtk!1317
2020-01-14 22:42:33 +00:00
Alex Samorukov
e02148491f Use bundle id instead of package name for the macOS preview as filename is now changed 2020-01-14 22:12:53 +00:00
James Westman
b5ea2c78d6 fontchooser: Fix size label not being hidden
Even when the level property of a font chooser did not include
GTK_FONT_CHOOSER_LEVEL_SIZE, the "Size" label was still displayed.

Fixes #2378.
2020-01-14 16:01:16 -06:00
Matthias Clasen
0bffcd8882 Merge branch 'adwaita-cross-fade-fix-gtk3' into 'gtk-3-24'
Adwaita: Fix syntax error in cross-fade() (GTK3)

See merge request GNOME/gtk!1307
2020-01-14 05:32:45 +00:00
Matthias Clasen
8ed65a96b9 Merge branch 'image-surfce-cache-leak' into 'gtk-3-24'
GtkCssImageSurface: Plug cache surface leak

See merge request GNOME/gtk!1309
2020-01-14 05:32:08 +00:00
Matthias Clasen
0c6ea4c7b2 Adwaita: Add hover for clickable infobars 2020-01-14 00:29:53 -05:00
Matthias Clasen
b55ef8d89a infobar: Activate default action on clicks
When we have a default action set on the infobar, activate it
for clicks anywhere in the infobar.  Also add an .action style
class in this case, so we can add a hover highlight to the infobar
just for this case.
2020-01-14 00:29:53 -05:00
Sebastian Keller
7e2bebb4d5 GtkCssImageSurface: Plug cache surface leak
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2373
2020-01-13 23:24:47 +01:00
nana-4
404f4c6627 Adwaita: Fix syntax error in cross-fade()
cross-fade() requires two images.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2371
2020-01-14 06:21:17 +09:00
Mario Sanchez Prada
c17c18e440 application: Complete startup notification sequence for remote invocations
When a remote instance of a GTK application implementing the Startup
Notification protocol gets spawned it will pass the startup sequence
ID as "platform data" to the main instance. Thus, we need to make sure
that the startup sequence gets completed in that case, since the remote
instance won't do it by itself, since it won't map any top level window.

Checking for this "platform data" in the implementation of the after_emit()
virtual method in the primary instance should be a good place to do so, since
the existence of such data proves that a remote instance has been spawned.

https://gitlab.gnome.org/GNOME/gtk/issues/1084
2020-01-10 13:32:37 +02:00
Benjamin Otte
edcddf6561 icontheme: Don't try to scale pixbufs to 0px
Always insist on at least 1px, even if the thumbnail we're turning into
an icon was 256 * 3 and should be scaled to 32 * 3/8.

(cherry picked from commit 6769db160d)
2020-01-01 18:17:14 +01:00
Carlos Garcia Campos
c6e5030c61 emojichooser: never show emoji chooser when input hint no-emoji is present
It's currently used only to not include the insert emoji option in the
context menu, but it's still possible to show the emoji chooser in both
GtkEntry and GtkTextView using the key bindings.
See also https://bugs.webkit.org/show_bug.cgi?id=205609.
2019-12-30 10:56:06 +01:00
Matthias Clasen
0d6cff45c3 accelgroup: Fix a buffer overrun
gtk_accelerator_parse_with_keycode can
overrun its buffer for certain inputs.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2325
2019-12-23 23:19:57 -05:00
Emmanuele Bassi
eeb896d648 Merge branch 'doc-scale-button-css' into 'gtk-3-24'
Document the CSS class used for the ScaleButton popover

See merge request GNOME/gtk!1246
2019-12-22 19:31:40 +00:00
Emmanuele Bassi
e7bd9adf3e Document the CSS class used for the ScaleButton popover
Otherwise it's not easy to divine the selector for the scale widget
inside the popover.
2019-12-22 19:12:20 +00:00
Yariv Barkan
dc896f0910 gtkgesturerotate: Fix a memory leak
On touchpads gtk_gesture_get_sequences() was called without a
corresponding g_list_free(). The same was true for touchscreens
if due to some reason only a single sequence was found.
2019-12-19 20:53:45 +02:00
Matthias Clasen
5df5716871 Merge branch 'wip/sadiq/fix-switch-on-touch' into 'gtk-3-24'
switch: Fix toggling switch on touch devices

See merge request GNOME/gtk!1233
2019-12-12 19:33:57 +00:00
Matthias Clasen
77f465bf19 Merge branch 'terminal-3-24' into 'gtk-3-24'
imwayland: Suppport terminal purpose

See merge request GNOME/gtk!1245
2019-12-12 19:12:34 +00:00
Dorota Czaplejewicz
c7c8ab6624 imwayland: Suppport terminal purpose 2019-12-12 18:20:06 +00:00
Mohammed Sadiq
2fc60a1e3f switch: Fix toggling switch on touch devices
priv->is_switch is used to get hint if the gesture happened
on the switch. On touch devices, ::enter-notify-event may
not be emitted, and so priv->is_switch may not be set.

Let it be set when ::pressed gesture is emitted so that
the switch is toggled when the gesture occurs regardless
of whether a pointing device is present or not.
2019-12-06 20:16:51 +05:30
LutzLue
e3247ed0d9 Annotate GtkTreeModelSort.new_with_model() appropriately
The new_with_model() method is a constructor, and it returns a GtkTreeModelSort
instance, even if the C API returns a GtkTreeModel for the convenience of C
developers.

Fixes: #1077
2019-12-03 16:02:45 +00:00
Alexander Mikhaylenko
379669b153 Adwaita: use transparent borders for popovers
Do the same thing as menus and windows do already.
2019-12-02 21:54:37 +05:00
Matthias Clasen
06d1cf5e52 Merge branch 'wip/muktupavels/opaque-region' into 'gtk-3-24'
window: fix opaque region

See merge request GNOME/gtk!1221
2019-12-01 15:11:52 +00:00
nana-4
f26b9c9f9f Adwaita: Fix some backdrop flat buttons
The commit 6f6070b5 broke the styling.

This fixes it by adding a missing placeholder selector.
2019-12-01 13:06:32 +09:00
Alberts Muktupāvels
44c994e469 window: fix opaque region
Decoration node for drawing is used only for client side decorated
windows, but corners from opaque region is subtracted also for
normal windows.

Rename function to better reflect what it does and do not subtract
corners if decoration node was not used for drawing.
2019-11-30 19:53:40 +02:00