Commit Graph

39495 Commits

Author SHA1 Message Date
Christian Hergert
278f976add macos: fix kinetic scrolling with overshoot
Previously we had issues on macos where the overshoot would keep showing.
To fix this we need to actually use discrete events instead of the
generated deltas from macOS in the scroll wheel case. Additionally, we need
to drop the kinetic momentum events from macOS and rely on the gtk kinetic
events which are already happening anyway. We also need to submit the
is_stop event for the GDK_SCROLL_SMOOTH case when we detect it.

To keep the discrete scroll events correct, we need to alter the hack in
gtkscrolledwindow.c to use the same path as other platforms except for
when a smooth scroll event is in place. In the future, I would imagine that
this falls into the boundary of high-precision scrolling and would share
the same code paths as other platforms.

With all of these in place, kinetic scrolling with overshoot appears the
same on macOS as other platforms.
2022-03-16 12:23:04 -07:00
Matthias Clasen
3223f3e3b8 build: Avoid objcopy on arm
The trickery we do with objcopy and ld to speed up
resource inclusion does not seem to work right on
32bit Arm, so just skip it there.

Fixes: #4757, #4748, #4752
2022-03-15 22:07:52 -04:00
Matthias Clasen
ba885e2ace Apply 1 suggestion(s) to 1 file(s) 2022-03-15 22:07:35 -04:00
Fina Wilke
9cc051ffa5 gtkplacessidebar: Prevent calling g_object_unref on null
g_object_unref would be called on a null end_icon when provider_account_status
is CLOUD_PROVIDERS_ACCOUNT_STATUS_IDLE
2022-03-15 22:07:20 -04:00
Caolán McNamara
53263d3d27 fix docs for gtk_accessible_update_relation example 2022-03-15 22:06:04 -04:00
Bilal Elmoussaoui
33a1cf203e headerbar: Fix docs 2022-03-15 22:04:23 -04:00
Matthias Clasen
5adce748cb text: Stop blinking when we lose focus
We were looking at GtkWidget:has-focus from
event controller signal handlers here, but
the widget property is only changed after
the event controllers.
2022-03-15 22:03:50 -04:00
Matthias Clasen
21d39b6054 focus controller: Update for active window
When the window gains or looses active status,
update the focus controllers status.
2022-03-15 22:03:42 -04:00
Matthias Clasen
a2f30ac1ab window: Update has-focus property
Update the :has-focus property of the focus
widget when the active status of the window
changes.

We change the property after generating the
GDK_CROSSING_ACTIVE crossing events.
2022-03-15 22:03:34 -04:00
Carlos Garnacho
3764b27bab gtkscrolledwindow: Do not try to doubly trigger deceleration
This may come from different sources at around the same time, e.g.
a hold gesture while on overshoot. Avoid doing that if an
animation is already set.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4730
2022-03-15 22:02:45 -04:00
Benjamin Otte
16a7e3e3d8 listview: Fix return_if_fail()s 2022-03-15 22:00:58 -04:00
Benjamin Otte
47ea51efab flattenlistmodel: Fix indentation 2022-03-15 22:00:47 -04:00
Christian Hergert
b4b282dc81 macos: fix allocation for filechoosernative filter
The GtkFileCHooserNativeQuartz injects a NSComboBox into the NSSavePanel
(which is displayed in a remote process since 10.15 whether or not you are
a sandboxed application). The style has changed and we need more space
here to not clip part of the combobox out of view.

I tried every size from 22 to 30 and this seemed to look the most natural
without skewing the location of the text within the combobox.
2022-02-22 11:53:33 -08:00
Matthias Clasen
d4d328f96f Merge branch 'scale-button-empty-icon-list' into 'main'
Don't crash when updating the icon on a `GtkScaleButton` with a non-`NULL` empty icon list

See merge request GNOME/gtk!4475
2022-02-22 19:39:32 +00:00
Matthias Clasen
553eb55f8a Merge branch 'wip/hadess/app-id-inspector-4' into 'main'
inspector: Show app ID and resource path in the General tab

See merge request GNOME/gtk!4493
2022-02-22 19:37:36 +00:00
Kévin Commaille
d8c79e91a2
emoji: Add more locales
Based on the locales that are at least 85% translated in Damned Lies:
https://l10n.gnome.org/releases/gnome-41/
Limited by the locales available in emojibase

Closes #4568
2022-02-22 11:28:15 +01:00
Kévin Commaille
7f5a249056
emoji: Update data to CLDR v40
Based on emojibase-data v7.0.1
Contains the changes in Unicode 14.0

https://unicode.org/versions/Unicode14.0.0/
https://cldr.unicode.org/index/downloads/cldr-40
https://github.com/milesj/emojibase/blob/b85382524c/packages/data/CHANGELOG.md
2022-02-22 11:28:15 +01:00
Kévin Commaille
70ce353a58
emoji: Fix the convert-emoji program
The annotation field has been renamed to label in emojibase-data

https://github.com/milesj/emojibase/blob/b85382524c/packages/data/CHANGELOG.md
2022-02-22 11:28:06 +01:00
Luca Bacci
6123212a68 Win32 IME: Fix popup position 2022-02-21 16:13:06 +01:00
Luca Bacci
6106207b93 Win32 IME: Rename a variable 2022-02-21 15:53:22 +01:00
Luca Bacci
b5036faa2a Win32 IME: Keep track of the client widget 2022-02-21 15:53:13 +01:00
Luca Bacci
56fd3af4d0 Win32 IME: Remove the get_window_position util function
It always returns (0, 0)
2022-02-21 15:49:52 +01:00
Chun-wei Fan
c6ce05b782 gtkimcontextime.c: Fix preedit window placement on HiDPI
We must also take the scaling factor into account for placing the IME
preedit window that is often used for Chinese and Japanese input on
Windows.
2022-02-19 18:31:28 +01:00
Bastien Nocera
1877bb8a27 inspector: Show app ID and resource path in the General tab
This makes it easier to figure out those values (which are mentioned in
the GtkApplication documentation) rather than working that out from the
way they're generated (or documented as being generated).
2022-02-17 15:14:16 +01:00
Maximiliano Sandoval R
8dc2c4b24a
viewport: Set scroll-to-focus to TRUE by default
In GTK 3 this was the default.
2022-02-15 16:29:08 +01:00
Sebastian Dröge
3f329b2d0f Don't crash when updating the icon on a GtkScaleButton with a non-NULL empty icon list 2022-02-13 11:16:32 +02:00
Christian Hergert
e38e8ed73e css: reduce overdraws from "textview > text"
This was causing us to draw the same background content twice which is a
significant amount of bits to flip in the GPU for maximized windows,
especially twice.
2022-02-11 23:06:16 -08:00
Matthias Clasen
76b185e6f6 Merge branch 'wip/chergert/popover-opaque-region' into 'main'
add opaque regions to popovers

Closes #4689

See merge request GNOME/gtk!4468
2022-02-11 23:16:43 +00:00
Christian Hergert
f3999f7ebf popover: use GtkNative opaque region API
This updates GtkPopover to use the new GtkNative abstraction for
reporting opaque regions of the window, in hopes that it can speed
up compositors for things like animated lists, menu transitions,
and more.

Fixes #4689
2022-02-11 14:37:46 -08:00
Christian Hergert
f8e7ecfde1 window: use GtkNative API to update opaque region
This switches to using the new GtkNative machinery for updating the
opaque region. Some amount of local calculation is still required for
determining when we should apply shadows, and this inherits what was
done previous for that.

Related #4689
2022-02-11 14:37:46 -08:00
Christian Hergert
cc49e044a5 native: add API to update opaque region
This abstracts the machinery to update the opaque region for a GtkWindow
into GtkNative so it may be used from other native impelementations such
as GtkPopover.

Related #4689
2022-02-11 14:37:43 -08:00
Matthias Clasen
9205193147 Merge branch 'bilelmoussaoui/entry-completion' into 'main'
entry completion: add checks that entry is set already

See merge request GNOME/gtk!4450
2022-02-11 17:49:26 +00:00
Matthias Clasen
124d689f45 Merge branch 'enum-docs' into 'main'
docs: Use links in enums

See merge request GNOME/gtk!4452
2022-02-11 17:35:42 +00:00
Matthias Clasen
d2a2591d28 Merge branch 'bilelmoussaoui/g-i' into 'main'
g-i: add a couple of missing nullable annotations

See merge request GNOME/gtk!4470
2022-02-11 17:33:05 +00:00
Bilal Elmoussaoui
3b383569a4 g-i: Add nullable annotations to EventControllerKey::im-context
Fixes https://github.com/gtk-rs/gtk4-rs/issues/874
2022-02-11 12:59:55 +01:00
Bilal Elmoussaoui
c2fe438676 g-i: Add nullable annotations to CellArea getters
Fixes https://github.com/gtk-rs/gtk4-rs/issues/891
2022-02-11 12:55:28 +01:00
Bilal Elmoussaoui
ba266325d0 g-i: Mark FileChooser [s|g]et_current_[folder|name] as nullable
The code seems to already check if folder/name is NULL
Fixes https://github.com/gtk-rs/gtk4-rs/issues/896
2022-02-11 12:21:58 +01:00
Bilal Elmoussaoui
e6322e177e g-i: Mark get_print_settings as nullable
Fixes https://github.com/gtk-rs/gtk4-rs/issues/880
2022-02-11 12:07:54 +01:00
Maximiliano Sandoval R
080a4cda49
docs: Use links in enums
Properties already refer to their object, so

    [property@Widget:sensitive] property on [class@Widget]

is redundant.
2022-02-11 12:07:09 +01:00
Bilal Elmoussaoui
6b63868641 g-i: mark get_selected_printer as nullable
There is no selected printer if the user closes the dialog
Fixes https://github.com/gtk-rs/gtk4-rs/issues/882
2022-02-11 12:05:42 +01:00
Bilal Elmoussaoui
cb710f1999 g-i: mark EventController::name as nullable
Fixes https://github.com/gtk-rs/gtk4-rs/issues/893
2022-02-11 12:02:07 +01:00
Bilal Elmoussaoui
85bb9aaefc g-i: add nullable annotation to gtk_single_selection_get_model 2022-02-11 11:56:40 +01:00
Bilal Elmoussaoui
6c02017212 layout manager: add a check if the widget exists
Avoid a crash when calling _gtk_widget_get_first_child
Fixes https://github.com/gtk-rs/gtk4-rs/issues/889
2022-02-11 11:44:16 +01:00
Matthias Clasen
9f24229f82 Merge branch 'column-view-column-new-nullable-factory' into 'main'
Allow passing a `NULL` factory to `gtk_column_view_column_new()`

See merge request GNOME/gtk!4454
2022-02-10 11:42:38 +00:00
Matthias Clasen
214370ee23 Merge branch 'icon-view-drag-dest-item-nullable' into 'main'
Mark `path` out parameter of `gtk_icon_view_get_drag_dest_item()` as `(nullable)`

See merge request GNOME/gtk!4451
2022-02-10 11:24:04 +00:00
Sebastian Dröge
878e4a34d3 Don't dereference a NULL page in gtk_assistant_set_current_page() if there are no pages at all 2022-02-09 17:50:55 +02:00
Sebastian Dröge
8245fd4beb Allow passing a NULL factory to gtk_column_view_column_new() 2022-02-08 16:25:28 +02:00
Sebastian Dröge
07d6ef13c5 Mark path out parameter of gtk_icon_view_get_drag_dest_item() as (nullable)
It can be set to `NULL` and the function body handles `NULL` explictly,
so annotate it accordingly.
2022-02-08 12:50:24 +02:00
Bilal Elmoussaoui
883e8328e0 entry completion: add checks that entry is set already
If any of the APIs that assumes that the entry is set already is used
before having one already set, things break pretty badly.

Fixes a downstream issue reported at https://github.com/gtk-rs/gtk4-rs/issues/873
2022-02-08 11:22:52 +01:00
Matthias Clasen
38ad56e6a1 Merge branch 'wip/jimmac/selected_text' into 'main'
style: legible text selections

Closes #4664

See merge request GNOME/gtk!4433
2022-02-08 00:15:45 +00:00