浏览代码

Merge pull request #1371 from BDisp/autosize-direction-text-init

CheckBox AutoSize should initialize with the Label default.
Charlie Kindel 4 年之前
父节点
当前提交
c76793aaa1
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      UICatalog/Scenarios/AutoSizeAndDirectionText.cs

+ 2 - 1
UICatalog/Scenarios/AutoSizeAndDirectionText.cs

@@ -53,7 +53,8 @@ namespace UICatalog {
 
 			var ckbAutoSize = new CheckBox ("Auto Size") {
 				X = Pos.Center (),
-				Y = Pos.Center () + 5
+				Y = Pos.Center () + 5,
+				Checked = labelH.AutoSize = labelV.AutoSize
 			};
 			ckbAutoSize.Toggled += (_) => labelH.AutoSize = labelV.AutoSize = ckbAutoSize.Checked;
 			Win.Add (ckbAutoSize);