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



commit dd86193be67064544ed974f856d6ef67121a87d3
Author: Robert Roth <robert roth off gmail com>
Date:   Mon Dec 6 08:44:58 2021 +0200

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

 src/math-window.vala  | 5 +++++
 src/ui/math-window.ui | 1 -
 2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/math-window.vala b/src/math-window.vala
index e0f7c444..1b4a43e3 100644
--- a/src/math-window.vala
+++ b/src/math-window.vala
@@ -89,26 +89,31 @@ public class MathWindow : Hdy.ApplicationWindow
         case ButtonMode.BASIC:
             mode_label.label = _("Basic");
             action.set_state (new Variant.string ("basic"));
+            this.default_width = 360;
             break;
 
         case ButtonMode.ADVANCED:
             mode_label.label = _("Advanced");
             action.set_state (new Variant.string ("advanced"));
+            this.default_width = 680;
             break;
 
         case ButtonMode.FINANCIAL:
             mode_label.label = _("Financial");
             action.set_state (new Variant.string ("financial"));
+            this.default_width = 680;
             break;
 
         case ButtonMode.PROGRAMMING:
             mode_label.label = _("Programming");
             action.set_state (new Variant.string ("programming"));
+            this.default_width = 680;
             break;
 
         case ButtonMode.KEYBOARD:
             mode_label.label = _("Keyboard");
             action.set_state (new Variant.string ("keyboard"));
+            this.default_width = 680;
             break;
         }
 
diff --git a/src/ui/math-window.ui b/src/ui/math-window.ui
index bdd4abdf..67c9224e 100644
--- a/src/ui/math-window.ui
+++ b/src/ui/math-window.ui
@@ -109,7 +109,6 @@
     <property name="role">gnome-calculator</property>
     <property name="resizable">True</property>
     <property name="show_menubar">False</property>
-    <property name="default_width">680</property>
     <child>
       <object class="GtkBox">
         <property name="visible">True</property>


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