Commits

Lars Brubaker  committed 6a30443 Merge

Merge

  • Participants
  • Parent commits 99afbd2, 19c48fb

Comments (0)

Files changed (1)

File Gui/CheckBox/CheckBoxViewSates.cs

 
 namespace MatterHackers.Agg.UI
 {
-    public class CheckBoxViewSates : GuiWidget
+    public class CheckBoxViewStates : GuiWidget
     {
         private GuiWidget normal;
         private GuiWidget normalHover;
         private GuiWidget pressedHover;
         private GuiWidget switchPressedToNormal;
 
-        public CheckBoxViewSates(GuiWidget normal, GuiWidget switchNormalToPressed, GuiWidget pressed, GuiWidget switchPressedToNormal)
+        public CheckBoxViewStates(GuiWidget normal, GuiWidget switchNormalToPressed, GuiWidget pressed, GuiWidget switchPressedToNormal)
             : this(normal, normal, switchNormalToPressed, pressed, pressed, switchPressedToNormal)
         {
         }
 
-        public CheckBoxViewSates(GuiWidget normal, GuiWidget normalHover, GuiWidget switchNormalToPressed, GuiWidget pressed, GuiWidget pressedHover, GuiWidget switchPressedToNormal)
+        public CheckBoxViewStates(GuiWidget normal, GuiWidget normalHover, GuiWidget switchNormalToPressed, GuiWidget pressed, GuiWidget pressedHover, GuiWidget switchPressedToNormal)
         {
             this.normal = normal;
             this.normalHover = normalHover;
             base.OnParentChanged(e);
         }
 
+        public override double Width
+        {
+            get
+            {
+                return base.Width;
+            }
+            set
+            {
+                base.Width = value;
+                normal.Width = this.Width;
+                normalHover.Width = this.Width;
+                switchNormalToPressed.Width = this.Width;
+                pressed.Width = this.Width;
+                pressedHover.Width = this.Width;
+                switchPressedToNormal.Width = this.Width;
+            }
+        }
+
         public void redrawButtonIfRequired(object sender, EventArgs e)
         {
             CheckBox checkBox = (CheckBox)Parent;