[libadwaita] squeezer: Remove duplicate code in size_allocate()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita] squeezer: Remove duplicate code in size_allocate()
- Date: Mon, 8 Aug 2022 17:48:43 +0000 (UTC)
commit 7af874ea254ba924e42619ed3bbd27ec23340fcc
Author: Pablo Correa Gomez <ablocorrea hotmail com>
Date: Mon Aug 8 17:48:43 2022 +0000
squeezer: Remove duplicate code in size_allocate()
See 642bfefa3f3767729732d82e401fdcaaf62fdd00
src/adw-squeezer.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/adw-squeezer.c b/src/adw-squeezer.c
index 43663fac..4cb4134e 100644
--- a/src/adw-squeezer.c
+++ b/src/adw-squeezer.c
@@ -818,17 +818,13 @@ adw_squeezer_size_allocate (GtkWidget *widget,
if (!page->enabled)
continue;
- if (self->orientation == GTK_ORIENTATION_VERTICAL) {
+ if (self->orientation == GTK_ORIENTATION_VERTICAL)
compare_size = height;
-
- gtk_widget_measure (child, self->orientation, -1,
- &child_min, &child_nat, NULL, NULL);
- } else {
+ else
compare_size = width;
- gtk_widget_measure (child, self->orientation, -1,
- &child_min, &child_nat, NULL, NULL);
- }
+ gtk_widget_measure (child, self->orientation, -1,
+ &child_min, &child_nat, NULL, NULL);
if (child_min <= compare_size && self->switch_threshold_policy == ADW_FOLD_THRESHOLD_POLICY_MINIMUM)
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]