Skip to content

Commit 7457114

Browse files
authored
Merge branch 'main' into leolost/gesture-preparations
2 parents 1938e8c + 6f0093a commit 7457114

19 files changed

+339
-342
lines changed

po/ca.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ msgstr ""
88
"Project-Id-Version: beat-box\n"
99
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
1010
"POT-Creation-Date: 2024-12-18 21:23+0000\n"
11-
"PO-Revision-Date: 2024-11-25 12:07+0000\n"
11+
"PO-Revision-Date: 2024-12-19 16:04+0000\n"
1212
"Last-Translator: David M <[email protected]>\n"
13-
"Language-Team: Catalan <https://l10n.elementary.io/projects/desktop/gala/ca/"
14-
">\n"
13+
"Language-Team: Catalan <https://l10n.elementary.io/projects/desktop/gala/ca/>"
14+
"\n"
1515
"Language: ca\n"
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=2; plural=n != 1;\n"
20-
"X-Generator: Weblate 5.6.2\n"
20+
"X-Generator: Weblate 5.8.4\n"
2121
"X-Launchpad-Export-Date: 2017-04-05 07:08+0000\n"
2222

2323
#: daemon/DBus.vala:82 daemon-gtk3/BackgroundMenu.vala:11
@@ -127,16 +127,16 @@ msgstr "Traduccions actualitzades"
127127
#: data/gala.metainfo.xml.in:35
128128
msgid "Fixed rare crash when a dock window was killed"
129129
msgstr ""
130+
"S'ha solucionat una fallada rara de quan es matava una finestra de "
131+
"l'acoblador."
130132

131133
#: data/gala.metainfo.xml.in:36
132134
msgid "Added interactive screenshot shortcut"
133-
msgstr ""
135+
msgstr "S'ha afegit una drecera interactiva de captura de pantalla."
134136

135137
#: data/gala.metainfo.xml.in:37
136-
#, fuzzy
137-
#| msgid "Fix potential crash when taking screenshots"
138138
msgid "Fixed crash when using tiling shortcuts"
139-
msgstr "Correcció de la fallada potencial en fer captures de pantalla"
139+
msgstr "Correcció de l'error de quan s'usaven les dreceres de mosaic"
140140

141141
#: data/gala.metainfo.xml.in:56
142142
msgid "Improved shadows performance"

po/en_GB.po

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: beat-box\n"
99
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
1010
"POT-Creation-Date: 2024-12-18 21:23+0000\n"
11-
"PO-Revision-Date: 2024-12-05 01:16+0000\n"
11+
"PO-Revision-Date: 2024-12-19 16:04+0000\n"
1212
"Last-Translator: David Hewitt <[email protected]>\n"
1313
"Language-Team: English (United Kingdom) <https://l10n.elementary.io/projects/"
1414
"desktop/gala/en_GB/>\n"
@@ -126,17 +126,15 @@ msgstr "Updated translations"
126126

127127
#: data/gala.metainfo.xml.in:35
128128
msgid "Fixed rare crash when a dock window was killed"
129-
msgstr ""
129+
msgstr "Fixed rare crash when a dock window was killed"
130130

131131
#: data/gala.metainfo.xml.in:36
132132
msgid "Added interactive screenshot shortcut"
133-
msgstr ""
133+
msgstr "Added interactive screenshot shortcut"
134134

135135
#: data/gala.metainfo.xml.in:37
136-
#, fuzzy
137-
#| msgid "Fix potential crash when taking screenshots"
138136
msgid "Fixed crash when using tiling shortcuts"
139-
msgstr "Fix potential crash when taking screenshots"
137+
msgstr "Fixed crash when using tiling shortcuts"
140138

141139
#: data/gala.metainfo.xml.in:56
142140
msgid "Improved shadows performance"

po/es.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ msgstr ""
88
"Project-Id-Version: gala\n"
99
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
1010
"POT-Creation-Date: 2024-12-18 21:23+0000\n"
11-
"PO-Revision-Date: 2024-11-24 18:16+0000\n"
11+
"PO-Revision-Date: 2024-12-19 16:04+0000\n"
1212
"Last-Translator: Italo Felipe Capasso Ballesteros <[email protected]>\n"
13-
"Language-Team: Spanish <https://l10n.elementary.io/projects/desktop/gala/es/"
14-
">\n"
13+
"Language-Team: Spanish <https://l10n.elementary.io/projects/desktop/gala/es/>"
14+
"\n"
1515
"Language: es\n"
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=2; plural=n != 1;\n"
20-
"X-Generator: Weblate 5.6.2\n"
20+
"X-Generator: Weblate 5.8.4\n"
2121
"X-Launchpad-Export-Date: 2017-02-27 05:44+0000\n"
2222

2323
#: daemon/DBus.vala:82 daemon-gtk3/BackgroundMenu.vala:11
@@ -128,16 +128,16 @@ msgstr "Traducciones actualizadas"
128128
#: data/gala.metainfo.xml.in:35
129129
msgid "Fixed rare crash when a dock window was killed"
130130
msgstr ""
131+
"Se corrigió un error fatal al terminar un proceso asociado a una ventana "
132+
"anclada"
131133

132134
#: data/gala.metainfo.xml.in:36
133135
msgid "Added interactive screenshot shortcut"
134-
msgstr ""
136+
msgstr "Se agregó un atajo para captura de pantalla interactiva"
135137

136138
#: data/gala.metainfo.xml.in:37
137-
#, fuzzy
138-
#| msgid "Fix potential crash when taking screenshots"
139139
msgid "Fixed crash when using tiling shortcuts"
140-
msgstr "Solucionado un posible bloqueo al tomar capturas de pantalla"
140+
msgstr "Solucionado un error fatal al usar los atajos de mosaico"
141141

142142
#: data/gala.metainfo.xml.in:56
143143
msgid "Improved shadows performance"

po/he.po

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ msgstr ""
33
"Project-Id-Version: PACKAGE VERSION\n"
44
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
55
"POT-Creation-Date: 2024-12-18 21:23+0000\n"
6-
"PO-Revision-Date: 2024-11-24 18:16+0000\n"
6+
"PO-Revision-Date: 2024-12-19 16:04+0000\n"
77
"Last-Translator: Yaron Shahrabani <[email protected]>\n"
8-
"Language-Team: Hebrew <https://l10n.elementary.io/projects/desktop/gala/he/"
9-
">\n"
8+
"Language-Team: Hebrew <https://l10n.elementary.io/projects/desktop/gala/he/>"
9+
"\n"
1010
"Language: he\n"
1111
"MIME-Version: 1.0\n"
1212
"Content-Type: text/plain; charset=UTF-8\n"
1313
"Content-Transfer-Encoding: 8bit\n"
1414
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
15-
"X-Generator: Weblate 5.6.2\n"
15+
"X-Generator: Weblate 5.8.4\n"
1616
"X-Launchpad-Export-Date: 2017-02-21 05:47+0000\n"
1717

1818
#: daemon/DBus.vala:82 daemon-gtk3/BackgroundMenu.vala:11
@@ -121,17 +121,15 @@ msgstr "התרגומים עודכנו"
121121

122122
#: data/gala.metainfo.xml.in:35
123123
msgid "Fixed rare crash when a dock window was killed"
124-
msgstr ""
124+
msgstr "תוקנה קריסה שנגרמה כשחלון מעוגן חוסל"
125125

126126
#: data/gala.metainfo.xml.in:36
127127
msgid "Added interactive screenshot shortcut"
128-
msgstr ""
128+
msgstr "נוסף קיצור דרך לצילום מסך אינטראקטיבי"
129129

130130
#: data/gala.metainfo.xml.in:37
131-
#, fuzzy
132-
#| msgid "Fix potential crash when taking screenshots"
133131
msgid "Fixed crash when using tiling shortcuts"
134-
msgstr "תיקון של תקלה אפשרית של קריסה בעת צילומים"
132+
msgstr "תוקנה קריסה עקב שימוש בקיצורי דרך של ריצוף"
135133

136134
#: data/gala.metainfo.xml.in:56
137135
msgid "Improved shadows performance"

po/nl.po

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ msgstr ""
88
"Project-Id-Version: gala\n"
99
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
1010
"POT-Creation-Date: 2024-12-18 21:23+0000\n"
11-
"PO-Revision-Date: 2024-09-22 01:32+0000\n"
11+
"PO-Revision-Date: 2024-12-19 16:04+0000\n"
1212
"Last-Translator: DutchVipperloid <[email protected]>\n"
1313
"Language-Team: Dutch <https://l10n.elementary.io/projects/desktop/gala/nl/>\n"
1414
"Language: nl\n"
1515
"MIME-Version: 1.0\n"
1616
"Content-Type: text/plain; charset=UTF-8\n"
1717
"Content-Transfer-Encoding: 8bit\n"
1818
"Plural-Forms: nplurals=2; plural=n != 1;\n"
19-
"X-Generator: Weblate 5.6.2\n"
19+
"X-Generator: Weblate 5.8.4\n"
2020
"X-Launchpad-Export-Date: 2017-02-21 05:47+0000\n"
2121

2222
#: daemon/DBus.vala:82 daemon-gtk3/BackgroundMenu.vala:11
@@ -126,23 +126,19 @@ msgstr "Bijgewerkte vertalingen"
126126

127127
#: data/gala.metainfo.xml.in:35
128128
msgid "Fixed rare crash when a dock window was killed"
129-
msgstr ""
129+
msgstr "Verhelpt een zeldzame crash wanneer een dock-venster was beëindigd"
130130

131131
#: data/gala.metainfo.xml.in:36
132132
msgid "Added interactive screenshot shortcut"
133-
msgstr ""
133+
msgstr "Interactieve schermafdruk snelkoppeling toegevoegd"
134134

135135
#: data/gala.metainfo.xml.in:37
136-
#, fuzzy
137-
#| msgid "Fix potential crash when taking screenshots"
138136
msgid "Fixed crash when using tiling shortcuts"
139-
msgstr "Een mogelijke crash verholpen bij het maken van screenshots"
137+
msgstr "Een crash verholpen bij het gebruiken van tegelen-snelkoppelingen"
140138

141139
#: data/gala.metainfo.xml.in:56
142-
#, fuzzy
143-
#| msgid "Improve window shadows for legacy apps"
144140
msgid "Improved shadows performance"
145-
msgstr "Verbeterde venster schaduwen voor oudere apps"
141+
msgstr "Verbeterde schaduwen-prestaties"
146142

147143
#: data/gala.metainfo.xml.in:100
148144
msgid "Fix a potential crash when moving windows between workspaces"

po/ru.po

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ msgstr ""
88
"Project-Id-Version: beat-box\n"
99
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
1010
"POT-Creation-Date: 2024-12-18 21:23+0000\n"
11-
"PO-Revision-Date: 2024-11-24 18:16+0000\n"
11+
"PO-Revision-Date: 2024-12-19 16:04+0000\n"
1212
"Last-Translator: кубик круглый <[email protected]>\n"
13-
"Language-Team: Russian <https://l10n.elementary.io/projects/desktop/gala/ru/"
14-
">\n"
13+
"Language-Team: Russian <https://l10n.elementary.io/projects/desktop/gala/ru/>"
14+
"\n"
1515
"Language: ru\n"
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
2020
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
21-
"X-Generator: Weblate 5.6.2\n"
21+
"X-Generator: Weblate 5.8.4\n"
2222
"X-Launchpad-Export-Date: 2017-02-21 05:47+0000\n"
2323

2424
#: daemon/DBus.vala:82 daemon-gtk3/BackgroundMenu.vala:11
@@ -127,17 +127,15 @@ msgstr "Обновлены переводы"
127127

128128
#: data/gala.metainfo.xml.in:35
129129
msgid "Fixed rare crash when a dock window was killed"
130-
msgstr ""
130+
msgstr "Исправлен редкий сбой, когда окно Дока оказывалось убито"
131131

132132
#: data/gala.metainfo.xml.in:36
133133
msgid "Added interactive screenshot shortcut"
134-
msgstr ""
134+
msgstr "Добавлено сочетание клавиш интерактивного снимка экрана"
135135

136136
#: data/gala.metainfo.xml.in:37
137-
#, fuzzy
138-
#| msgid "Fix potential crash when taking screenshots"
139137
msgid "Fixed crash when using tiling shortcuts"
140-
msgstr "Исправлена вероятность сбоя при создании снимков экрана"
138+
msgstr "Исправлен сбой при использовании сочетаний клавиш закрепления окон"
141139

142140
#: data/gala.metainfo.xml.in:56
143141
msgid "Improved shadows performance"

po/uz.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ msgstr ""
88
"Project-Id-Version: gala 3.2.0\n"
99
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
1010
"POT-Creation-Date: 2024-12-18 21:23+0000\n"
11-
"PO-Revision-Date: 2024-08-07 18:17+0000\n"
11+
"PO-Revision-Date: 2024-12-19 16:04+0000\n"
1212
"Last-Translator: anonymous <[email protected]>\n"
1313
"Language-Team: Uzbek <https://l10n.elementary.io/projects/desktop/gala/uz/>\n"
1414
"Language: uz\n"
1515
"MIME-Version: 1.0\n"
1616
"Content-Type: text/plain; charset=UTF-8\n"
1717
"Content-Transfer-Encoding: 8bit\n"
1818
"Plural-Forms: nplurals=2; plural=n != 1;\n"
19-
"X-Generator: Weblate 5.6.2\n"
19+
"X-Generator: Weblate 5.8.4\n"
2020

2121
#: daemon/DBus.vala:82 daemon-gtk3/BackgroundMenu.vala:11
2222
msgid "Change Wallpaper…"
@@ -118,7 +118,7 @@ msgstr ""
118118
#: data/gala.metainfo.xml.in:161 data/gala.metainfo.xml.in:183
119119
#: data/gala.metainfo.xml.in:198
120120
msgid "Updated translations"
121-
msgstr ""
121+
msgstr "Yangilangan tarjimalar"
122122

123123
#: data/gala.metainfo.xml.in:35
124124
msgid "Fixed rare crash when a dock window was killed"

src/Gestures/GesturePropertyTransition.vala

Lines changed: 48 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,28 @@ public class Gala.GesturePropertyTransition : Object {
3737
public Value to_value { get; construct set; }
3838

3939
/**
40-
* If not null this can be used to have an intermediate step before animating back to the origin.
41-
* Therefore using this makes mostly sense if {@link to_value} equals {@link from_value}.
42-
* This is mostly used for the nudge animations when trying to switch workspaces where there isn't one anymore.
40+
* The lower max overshoot. The gesture percentage by which #this animates the property is bounded
41+
* by this property on the lower end. If it is in the form X.YY with Y not 0 the animation will be linear
42+
* until X and then take another 100% to animate until X.YY (instead of YY%).
43+
* Default is 0.
4344
*/
44-
public Value? intermediate_value { get; construct; }
45+
public double overshoot_lower_clamp { get; set; default = 0; }
46+
/**
47+
* Same as {@link overshoot_lower_clamp} but for the upper limit.
48+
* If this is less than 1 and the transition is started without a gesture it will animate to
49+
* the {@link to_value} by this percent and then back to the {@link from_value}.
50+
* Default is 1.
51+
*/
52+
public double overshoot_upper_clamp { get; set; default = 1; }
4553

4654
/**
4755
* This is the from value that's actually used when calculating the animation movement.
4856
* If {@link from_value} isn't null this will be the same, otherwise it will be set to the current
4957
* value of the target property, when calling {@link start}.
5058
*/
5159
private Value actual_from_value;
60+
private float from_value_float; // Only valid in the time between start () and finish ()
61+
private float to_value_float; // Only valid in the time between start () and finish ()
5262

5363
private DoneCallback? done_callback;
5464

@@ -57,16 +67,14 @@ public class Gala.GesturePropertyTransition : Object {
5767
GestureTracker gesture_tracker,
5868
string property,
5969
Value? from_value,
60-
Value to_value,
61-
Value? intermediate_value = null
70+
Value to_value
6271
) {
6372
Object (
6473
actor: actor,
6574
gesture_tracker: gesture_tracker,
6675
property: property,
6776
from_value: from_value,
68-
to_value: to_value,
69-
intermediate_value: intermediate_value
77+
to_value: to_value
7078
);
7179
}
7280

@@ -100,20 +108,44 @@ public class Gala.GesturePropertyTransition : Object {
100108
return;
101109
}
102110

111+
// Pre calculate some things, so we don't have to do it on every update
112+
from_value_float = value_to_float (actual_from_value);
113+
to_value_float = value_to_float (to_value);
114+
103115
GestureTracker.OnBegin on_animation_begin = () => {
104116
actor.set_property (property, actual_from_value);
105117
};
106118

107119
GestureTracker.OnUpdate on_animation_update = (percentage) => {
108-
var animation_value = GestureTracker.animation_value (value_to_float (actual_from_value), value_to_float (intermediate_value ?? to_value), percentage);
120+
var lower_clamp_int = (int) overshoot_lower_clamp;
121+
var upper_clamp_int = (int) overshoot_upper_clamp;
122+
123+
double stretched_percentage = 0;
124+
if (percentage < lower_clamp_int) {
125+
stretched_percentage = (percentage - lower_clamp_int) * - (overshoot_lower_clamp - lower_clamp_int);
126+
} else if (percentage > upper_clamp_int) {
127+
stretched_percentage = (percentage - upper_clamp_int) * (overshoot_upper_clamp - upper_clamp_int);
128+
}
129+
130+
percentage = percentage.clamp (lower_clamp_int, upper_clamp_int);
131+
132+
var animation_value = GestureTracker.animation_value (from_value_float, to_value_float, percentage, false);
133+
134+
if (stretched_percentage != 0) {
135+
animation_value += (float) stretched_percentage * (to_value_float - from_value_float);
136+
}
137+
109138
actor.set_property (property, value_from_float (animation_value));
110139
};
111140

112-
GestureTracker.OnEnd on_animation_end = (percentage, cancel_action, calculated_duration) => {
141+
GestureTracker.OnEnd on_animation_end = (percentage, completions, calculated_duration) => {
142+
completions = completions.clamp ((int) overshoot_lower_clamp, (int) overshoot_upper_clamp);
143+
var target_value = from_value_float + completions * (to_value_float - from_value_float);
144+
113145
actor.save_easing_state ();
114146
actor.set_easing_mode (EASE_OUT_QUAD);
115147
actor.set_easing_duration (AnimationsSettings.get_animation_duration (calculated_duration));
116-
actor.set_property (property, cancel_action ? actual_from_value : to_value);
148+
actor.set_property (property, value_from_float (target_value));
117149
actor.restore_easing_state ();
118150

119151
unowned var transition = actor.get_transition (property);
@@ -128,21 +160,21 @@ public class Gala.GesturePropertyTransition : Object {
128160
gesture_tracker.connect_handlers (on_animation_begin, on_animation_update, on_animation_end);
129161
} else {
130162
on_animation_begin (0);
131-
if (intermediate_value != null) {
163+
if (overshoot_upper_clamp < 1) {
132164
actor.save_easing_state ();
133165
actor.set_easing_mode (EASE_OUT_QUAD);
134166
actor.set_easing_duration (AnimationsSettings.get_animation_duration (gesture_tracker.min_animation_duration));
135-
actor.set_property (property, intermediate_value);
167+
actor.set_property (property, value_from_float ((float) overshoot_upper_clamp * (to_value_float - from_value_float) + from_value_float));
136168
actor.restore_easing_state ();
137169

138170
unowned var transition = actor.get_transition (property);
139171
if (transition == null) {
140-
on_animation_end (1, false, gesture_tracker.min_animation_duration);
172+
on_animation_end (1, 1, gesture_tracker.min_animation_duration);
141173
} else {
142-
transition.stopped.connect (() => on_animation_end (1, false, gesture_tracker.min_animation_duration));
174+
transition.stopped.connect (() => on_animation_end (1, 1, gesture_tracker.min_animation_duration));
143175
}
144176
} else {
145-
on_animation_end (1, false, gesture_tracker.min_animation_duration);
177+
on_animation_end (1, 1, gesture_tracker.min_animation_duration);
146178
}
147179
}
148180
}

0 commit comments

Comments
 (0)