[gnome-calculator] math-window: Do not force 680 default width for basic mode (#240)



commit c812c128a7bb4c95ca5ef9f90791dd87600b1ea2
Author: Robert Roth <robert roth off gmail com>
Date:   Fri Nov 19 17:52:19 2021 +0200

    math-window: Do not force 680 default width for basic mode (#240)

 src/math-window.vala  | 4 ++++
 src/ui/math-window.ui | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/math-window.vala b/src/math-window.vala
index e9f18fe1..c9eb0d48 100644
--- a/src/math-window.vala
+++ b/src/math-window.vala
@@ -92,21 +92,25 @@ public class MathWindow : Adw.ApplicationWindow
         default:
         case ButtonMode.BASIC:
             menu_button.label = _("Basic");
+            this.default_width = -1;
             action.set_state (new Variant.string ("basic"));
             break;
 
         case ButtonMode.ADVANCED:
             menu_button.label = _("Advanced");
+            this.default_width = 680;
             action.set_state (new Variant.string ("advanced"));
             break;
 
         case ButtonMode.FINANCIAL:
             menu_button.label = _("Financial");
+            this.default_width = 680;
             action.set_state (new Variant.string ("financial"));
             break;
 
         case ButtonMode.PROGRAMMING:
             menu_button.label = _("Programming");
+            this.default_width = 680;
             action.set_state (new Variant.string ("programming"));
             break;
 
diff --git a/src/ui/math-window.ui b/src/ui/math-window.ui
index d1927bf9..0bff3a90 100644
--- a/src/ui/math-window.ui
+++ b/src/ui/math-window.ui
@@ -105,7 +105,6 @@
   </menu>
   <template class="MathWindow" parent="AdwApplicationWindow">
     <property name="title" translatable="yes">Calculator</property>
-    <property name="default_width">680</property>
     <child>
       <object class="GtkBox">
         <property name="orientation">vertical</property>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]