- 10 Aug, 2022 1 commit
-
-
Alexander Mikhaylenko authored
Make sure bindings that don't expose properties in docs still have descriptions.
-
- 22 Jul, 2022 2 commits
-
-
Alexander Mikhaylenko authored
-
Alexander Mikhaylenko authored
Deltas don't contain it anymore.
-
- 20 Jun, 2022 2 commits
-
-
Alexander Mikhaylenko authored
Follow GTK4.
-
Alexander Mikhaylenko authored
- Add G_PARAM_STATIC_STRINGS everywhere. - Add missing G_PARAM_EXPLICIT_NOTIFY - Remove G_PARAM_EXPLICIT_NOTIFY from read-only and construct-only props - Consistently order them to ease grepping
-
- 12 May, 2022 1 commit
-
- 03 Feb, 2022 2 commits
-
-
It is not used by gir.
-
-
- 19 Jan, 2022 1 commit
-
-
Chun-wei Fan authored
It is unfortunately a GCCism, so use the traditional method instead. Unfortunately the autocleanup compiler extensions are not standard across the board.
-
- 28 Dec, 2021 2 commits
-
-
Alexander Mikhaylenko authored
-
Alexander Mikhaylenko authored
It's not necessary and removing it makes it simpler to copy between libhandy and libadwaita.
-
- 06 Dec, 2021 2 commits
-
-
Alexander Mikhaylenko authored
All widgets have migrated, we can do it now. Fixes #27
-
Alexander Mikhaylenko authored
Keep duration for now, it will be removed after all widgets have stopped using it.
-
- 22 Nov, 2021 1 commit
-
-
Update migration guides.
-
- 08 Nov, 2021 3 commits
-
-
Alexander Mikhaylenko authored
Move begin-swipe to when the swipe actually starts, replace what it was before with a prepare signal. Currently we have a hack in AdwFlap to check starting swipe in update-swipe instead of begin-swipe because the latter runs too early. Now it can be removed. Update migration guides. Fixes #79
-
Alexander Mikhaylenko authored
It's not critical to depend on 2.70 right now, and it can cause problems: even some of our CI images don't have 2.70 yet. Instead, define G_DEFINE_FINAL_TYPE and G_DEFINE_FINAL_TYPE_WITH_CODE for older glib versions, so we can use the newer macros when available. This should be good enough for now, later if we decide to bump the version this can be reverted.
-
Christopher Davis authored
See https://www.bassi.io/articles/2021/07/27/final-types/ Don't do this in the demo for now. Fixes #273
-
- 03 Nov, 2021 1 commit
-
-
Alexander Mikhaylenko authored
Fix a refcycle between the widget and the swipe tracker.
-
- 26 Jul, 2021 1 commit
-
-
Maximiliano authored
See https://spdx.org/licenses/.
-
- 01 Jun, 2021 1 commit
-
-
ZenWalker authored
-
- 17 May, 2021 1 commit
-
-
- 07 May, 2021 6 commits
-
-
While this makes perfect sense for touchpad, on touch it's useful to be able to start a swipe outside the swipe area and move the finger over to the swipe area. This should make swipes more responsive in AdwFlap.
-
-
They existed for AdwSwipeGroup, can be removed too now. Just inline them.
-
Stop using adw_swipe_tracker_emit_end_swipe() so we can remove it.
-
Another thing that's not needed without swipe groups.
-
GtkButton doesn't claim the event sequence on press anymore, so we can safely swipe from it. Fixes #18
-
- 02 Apr, 2021 1 commit
-
-
Alexander Mikhaylenko authored
This was useful for Glade and GtkInspector; Glade doesn't work on GTK 4 and GtkInspector stopped showing property names. Translating them is a lot of work for translators, and these are most of our translatable strings. Fixes #89
-
- 02 Mar, 2021 3 commits
-
-
Alexander Mikhaylenko authored
Avoid wrapping back to the first page when swiping forward from the last page.
-
-
-
- 19 Feb, 2021 4 commits
-
-
Actually use the `pos` parameter in get_bounds().
-
Since we now have the ability to support swiping through multiple pages, expose it as a property.
-
Previously we used a bunch of heuristics for this. We checked if velocity was directed towards the nearest snap point and its value was larger than a threshold. If it is, we completed the swipe, otherwise we cancelled it. This was good enough at the time, because this code was originally written for back/forward swipe. Since then, the swipe tracker was extended to handle arbitrary snap points and not just 0 and 1, or -1 and 0, depending on text direction. After that it was iterated on, but never significantly redone. This worked well enough, but had two problems: 1. In some cases, notably for AdwCarousel with non-expanded pages, it may be wanted to be able to swipe through multiple pages at once. This wasn't really possible because we always picked the adjacent snap point. 2. Since we can't do that well, we want to restrict swipes to one page at a time. It was done in a rather hacky way by clamping the position into [-1, 1] range from the place where we started the swipe. This works if we start the swipe from idle position, but if an animation was already going, the range would be clamped to arbitrary values, and very likely containing only one snap point, which we already swiped past at this point. In this case, finishing the swipe would cancel it regardless of velocity. This means that if one tries to quickly move through carousel pages via swiping, half of the swipes will be inexplicably cancelled. We'll use the deceleration formula from https://medium.com/@esskeetit/how-uiscrollview-works-e418adc47060#10ce to calculate then projection point, then pick the nearest snap point and calculate the duration as we did before. It works well enough for short distances, but has two problems: 1. It caps the maximum distance at a pretty low value - about 5 pages in my testing. 2. With how we pick the nearest snap point, it's too easy to accidentally cancel the swipe, To combat the first problem, we can modify the curve: only use linear function at small distances, and smoothly transition it to a parabola further. For the second problem we can add two special cases: first, if the swipe ended up between the initial snap point and the next one, we always prefer the latter. Second, a good old velocity threshold for cancelling. We'll also use a slightly smaller deceleration value for touchpad: 0.997 instead of 0.998. Now that we can pick any snap point, the [-1, 1] clamping doesn't make sense anymore, so instead let's replace it with a more flexible mechanism: if we're near a snap point, pick its adjacent snap points. Otherwise, take the two nearest snap points, and take their adjacent snap points. This way we have 3 snap points to choose from when starting a swipe from an idle position, and 4 if we start during an ongoing transition. This way, if we've just swiped from snap point n to n+1, the transition will pick snap points n-1, n, n+1, n+2 and if we swipe again, we will likely land on n+2. During that transition, if we swipe again, it will likely have already passed the snap point n+1, so this time the available snap points will be n, n+1, n+2, n+3, so we can swipe again and it will still complete, and so on. This will make it easy to allow multi-page swipes as well, by just removing the clamping.
-
In some cases we may get event with very low delta at the end of the swipe. While we can't completely ignore them, we can smooth them using a scroll history, similarly to what GTK kinetic scrolling does: keep track of the last 150ms of events, and sum their deltas when calculating the velocity.
-
- 13 Jan, 2021 1 commit
-
-
Alexander Mikhaylenko authored
-
- 12 Jan, 2021 2 commits
-
-
Alexander Mikhaylenko authored
-
Alexander Mikhaylenko authored
-
- 22 Dec, 2020 1 commit
-
-
Alexander Mikhaylenko authored
Turns out gtk_get_current_event() is (transfer full), we need to free it.
-
- 15 Dec, 2020 1 commit
-
-
Alexander Mikhaylenko authored
Event coordinates are relative to the GdkWindow the event was on. Meanwhile, gtk_widget_translate_coordinates() transforms coordinates from a widget to another widget, instead of from a window to widget. This means that it's only correct if the widget and window coordinates match, which is not always the case and leads to misplaced swipe area in some cases.
-