Browse Source

UI相关的改完

张洋 2 weeks ago
parent
commit
d9db75f637

+ 15 - 0
DuiLib/Control/UICombo.cpp

@@ -343,6 +343,21 @@ namespace DuiLib {
 			::MapWindowRect(pOwner->GetManager()->GetPaintWindow(), HWND_DESKTOP, &rc);
 		}
 
+		// 【R68】dropboxinset 的水平分量:把弹层左右边缘内收。
+		// 【为什么】本函数此前只把 rcInset.top 拿去算高度(见上面 cyFixed),left/right 从未生效
+		//   ⇒ 弹层窗口宽度恒等于 szDrop.cx、且左边缘恒等于 Combo 左边缘;
+		//   而弹层那圈 1px 边框画在窗口边缘(见 WM_CREATE 的 SetBorderColor/SetBorderSize),
+		//   于是弹层的可见边框会比同宽输入框(底图边线内缩 4px)左右各外扩 4px。
+		//   这里补上水平内收:配合 XML 的 dropboxinset="4,0,4,0" 让弹层左右与输入框对齐。
+		// 【自限】默认 m_rcDropBox = {0,0,0,0}(构造函数 ZeroMemory)⇒ 未显式设置 dropboxinset 的
+		//   既有 Combo 行为完全不变;当前仅登录页账号 Combo 设置该项。
+		//   此处 rc 已是屏幕坐标(上方 MapWindowRect),水平像素位移与坐标系无关,直接加即可。
+		if( rcInset.left != 0 || rcInset.right != 0 ) {
+			rc.left  += rcInset.left;
+			rc.right -= rcInset.right;
+			if( rc.right - rc.left < 8 ) rc.right = rc.left + 8;	// 防御:别算出非正宽度
+		}
+
 		// 【诊断】创建前的目标矩形(已是屏幕坐标)+ 创建前焦点现场。
 		DuiLibDiag::Log(_T("COMBO-INIT create rc=%d,%d,%d,%d (screen) ownerRc=%d,%d,%d,%d"),
 			rc.left, rc.top, rc.right, rc.bottom,

BIN
bin/Win32/Debug/zhipuzi_pos_windows/DuiLib_d.dll


+ 2 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/chufang_printer_setting.xml

@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Window size="800,600" caption="0,0,0,44" roundcorner="10,10" shadowsize="3" showshadow="true">
+	<!-- 下拉项统一绿色主题(不用蓝色):热态/选中态 文字绿 + 浅绿底。与登录窗口 Combo 一致。 -->
+	<Default name="Combo" value="itemhottextcolor=&quot;#FF60B177&quot; itemhotbkcolor=&quot;#FFF2F7F4&quot; itemselectedtextcolor=&quot;#FF60B177&quot; itemselectedbkcolor=&quot;#FFE8F5EE&quot;" />
 	<VerticalLayout bkimage="shoukuan_bkg.png">
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="#FF60B177">
 			<Label name="chufang_setting_title" text="新建厨房打印机" height="44" align="center" valign="center" textcolor="#FFFFFFFF" font="114" />

+ 1 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/login.xml

@@ -128,6 +128,7 @@
 			<Combo name="accountcombo" float="true" pos="0,0,328,50"
 				  font="13"
 				  dropboxsize="328,200"
+				  dropboxinset="4,0,4,0"
 				  dropbox="bkcolor=&quot;#FFFFFFFF&quot;"
 				  normalimage="file='login_input_user_normal.png' corner='4,4,48,4'"
 				  hotimage="file='login_input_user_hot.png' corner='4,4,48,4'"

+ 2 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/setting_biaoqian_print.xml

@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Window>
+	<!-- 下拉项统一绿色主题(不用蓝色):热态/选中态 文字绿 + 浅绿底。与登录窗口 Combo 一致。 -->
+	<Default name="Combo" value="itemhottextcolor=&quot;#FF60B177&quot; itemhotbkcolor=&quot;#FFF2F7F4&quot; itemselectedtextcolor=&quot;#FF60B177&quot; itemselectedbkcolor=&quot;#FFE8F5EE&quot;" />
 	<HorizontalLayout height="50" childvalign="vcenter">
 		<Label text="标签打印机接口类型" width="275" textcolor="#FF5F6368"/>
 		<Combo name="setting_biaoqian_printer_leixing" width="140" height="34" maxheight="34" tooltip="请点击这里选择您的标签打印机接口类型" normalimage="file='gd_combo_n.png' corner='8,8,22,8'" hotimage="file='gd_combo_h.png' corner='8,8,22,8'" pushedimage="file='gd_combo_p.png' corner='8,8,22,8'" textpadding="11,0,30,0" >

+ 2 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/setting_dianzicheng.xml

@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Window>
+	<!-- 下拉项统一绿色主题(不用蓝色):热态/选中态 文字绿 + 浅绿底。与登录窗口 Combo 一致。 -->
+	<Default name="Combo" value="itemhottextcolor=&quot;#FF60B177&quot; itemhotbkcolor=&quot;#FFF2F7F4&quot; itemselectedtextcolor=&quot;#FF60B177&quot; itemselectedbkcolor=&quot;#FFE8F5EE&quot;" />
 	<HorizontalLayout height="50" childvalign="vcenter">
 		<Label text="称重电子秤" width="275" textcolor="#FF5F6368"/>
 		<CheckBox name="setting_dianzicheng_weilianjie" group="setting_dianzicheng_type" selected="true" width="14" height="14" maxheight="14" normalimage="file='gd_radio_off.png'" hotimage="file='gd_radio_off.png'" selectedimage="file='gd_radio_on.png'"/>

+ 2 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/setting_print.xml

@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Window>
+	<!-- 下拉项统一绿色主题(不用蓝色):热态/选中态 文字绿 + 浅绿底。与登录窗口 Combo 一致。 -->
+	<Default name="Combo" value="itemhottextcolor=&quot;#FF60B177&quot; itemhotbkcolor=&quot;#FFF2F7F4&quot; itemselectedtextcolor=&quot;#FF60B177&quot; itemselectedbkcolor=&quot;#FFE8F5EE&quot;" />
 	<HorizontalLayout height="50" childvalign="vcenter">
 		<Label text="打印机规格" width="275" textcolor="#FF5F6368"/>
 		<Combo name="setting_printer_guige" width="140" height="34" maxheight="34" tooltip="请点击这里选择您的打印机纸张宽度规格" normalimage="file='gd_combo_n.png' corner='8,8,22,8'" hotimage="file='gd_combo_h.png' corner='8,8,22,8'" pushedimage="file='gd_combo_p.png' corner='8,8,22,8'" textpadding="11,0,30,0" >

+ 2 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/setting_tiaomacheng.xml

@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Window>
+	<!-- 下拉项统一绿色主题(不用蓝色):热态/选中态 文字绿 + 浅绿底。与登录窗口 Combo 一致。 -->
+	<Default name="Combo" value="itemhottextcolor=&quot;#FF60B177&quot; itemhotbkcolor=&quot;#FFF2F7F4&quot; itemselectedtextcolor=&quot;#FF60B177&quot; itemselectedbkcolor=&quot;#FFE8F5EE&quot;" />
 	<VerticalLayout inset="0,18,28,18">
 		<!-- 卡片1:条码格式 → -->
 		<VerticalLayout height="168" bkimage="file='card_r10.png' corner='10,10,10,10'" inset="22,18,22,18">

+ 2 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/shangpin_create_wnd.xml

@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Window size="920,680" caption="0,0,0,44" roundcorner="10,10" shadowsize="3" showshadow="true">
+	<!-- 下拉项统一绿色主题(不用蓝色):热态/选中态 文字绿 + 浅绿底。与登录窗口 Combo 一致。 -->
+	<Default name="Combo" value="itemhottextcolor=&quot;#FF60B177&quot; itemhotbkcolor=&quot;#FFF2F7F4&quot; itemselectedtextcolor=&quot;#FF60B177&quot; itemselectedbkcolor=&quot;#FFE8F5EE&quot;" />
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="#FF60B177">
 			<Label name="memo_dlg_title" text="新建商品" height="44" align="center" valign="center" textcolor="#FFFFFFFF" font="116"/>

+ 2 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/shangpin_update_wnd.xml

@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Window size="920,680" caption="0,0,0,44" roundcorner="10,10" shadowsize="3" showshadow="true">
+	<!-- 下拉项统一绿色主题(不用蓝色):热态/选中态 文字绿 + 浅绿底。与登录窗口 Combo 一致。 -->
+	<Default name="Combo" value="itemhottextcolor=&quot;#FF60B177&quot; itemhotbkcolor=&quot;#FFF2F7F4&quot; itemselectedtextcolor=&quot;#FF60B177&quot; itemselectedbkcolor=&quot;#FFE8F5EE&quot;" />
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="#FF60B177">
 			<Label name="memo_dlg_title" text="修改商品" height="44" align="center" valign="center" textcolor="#FFFFFFFF" font="116"/>

BIN
bin/Win32/Release/zhipuzi_pos_windows/DuiLib.dll


BIN
bin/Win32/Release/zhipuzi_pos_windows/zhipuzi_pos_windows.exe


BIN
dll/debug/DuiLib_d.dll


BIN
dll/release/DuiLib.dll


BIN
zhipuzi_pos_windows/resource/skin.zip