[libadwaita] view-stack: Make transition_duration a macro
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita] view-stack: Make transition_duration a macro
- Date: Fri, 9 Jul 2021 14:16:01 +0000 (UTC)
commit 411942829257e817f730a219d459820defff4db9
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu Jul 8 16:19:32 2021 +0200
view-stack: Make transition_duration a macro
It's used in a static way, there is no point in keeping it as a field.
src/adw-view-stack.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/adw-view-stack.c b/src/adw-view-stack.c
index e0ca3458..fd9de316 100644
--- a/src/adw-view-stack.c
+++ b/src/adw-view-stack.c
@@ -43,6 +43,8 @@
* Since: 1.0
*/
+#define TRANSITION_DURATION 200
+
enum {
PROP_0,
PROP_HHOMOGENEOUS,
@@ -97,8 +99,6 @@ struct _AdwViewStack {
gboolean hhomogeneous;
gboolean vhomogeneous;
- guint transition_duration;
-
AdwViewStackPage *last_visible_child;
guint tick_id;
GtkProgressTracker tracker;
@@ -573,7 +573,7 @@ start_transition (AdwViewStack *self)
self->first_frame_skipped = FALSE;
schedule_ticks (self);
gtk_progress_tracker_start (&self->tracker,
- self->transition_duration * 1000,
+ TRANSITION_DURATION * 1000,
0,
1.0);
} else {
@@ -1289,7 +1289,6 @@ adw_view_stack_init (AdwViewStack *self)
{
self->vhomogeneous = TRUE;
self->hhomogeneous = TRUE;
- self->transition_duration = 200;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]