From e96e11d6f8b965ea522c983e040d41e3b9ef105a Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 18 五月 2020 21:33:19 +0800
Subject: [PATCH] 2020-05-18-4

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs
index 272203e..484e815 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs
@@ -37,7 +37,7 @@
         /// <summary>
         /// 榛樿鐨勯偅涓彍鍗�
         /// </summary>
-        private FrameLayoutControl frameDefult = null;
+        private FrameLayoutStatuControl frameDefult = null;
 
         #endregion
 
@@ -49,6 +49,7 @@
         public SceneFunctionSwitchControl()
         {
             this.Height = Application.GetRealHeight(90);
+            this.Y = Application.GetRealHeight(40);
         }
 
         /// <summary>
@@ -66,7 +67,7 @@
             {
                 btnTemp.Text = listTitleText[i];
                 //寮�濮嬪垵濮嬪寲
-                XX = this.InitTitleTextControl(i, listTitleText[i], btnTemp.GetTextWidth(), XX);
+                XX = this.InitTitleTextControl(i, listTitleText[i], btnTemp.GetRealWidthByText(), XX);
             }
             //鍥炶皟鏂规硶
             this.frameDefult.ButtonClickEvent?.Invoke(null, null);
@@ -80,7 +81,7 @@
         private int InitTitleTextControl(int i_index, string titleText, int realWidth, int XX)
         {
             //鍦烘櫙妗�(鐐瑰嚮鑼冨洿鏈夌偣灏忥紝闇�瑕佹墿澶у畠鐨勭偣鍑昏寖鍥�)
-            var frameBack = new FrameLayoutControl();
+            var frameBack = new FrameLayoutStatuControl();
             frameBack.UseClickStatu = false;
             frameBack.Height = Application.GetRealHeight(90);
             frameBack.Width = realWidth;
@@ -89,6 +90,7 @@
             //鍚嶇О
             var btnName = new NormalViewControl(frameBack.Width, Application.GetRealHeight(63), false);
             btnName.Text = titleText;
+            btnName.TextAlignment = TextAlignment.Center;
             if (m_nowSelectIndex == i_index)
             {
                 this.frameDefult = frameBack;

--
Gitblit v1.8.0