张洋 1 month ago
parent
commit
0081db23b0

+ 7 - 5
bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_fooditem_youtu_2.xml

@@ -1,16 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Window>
-	<!-- 样式② 图左文右 250x76:缩略图 62x62 居左,名字价格居右(HLayout 子项高度只认 maxheight) -->
-	<DiandanFoodItem name="diandan_fooditem" width="250" height="76" bkcolor="#00000000" bordersize="0" bkimage="file='fc_r8.png' corner='8,8,8,8'">
-		<HorizontalLayout width="250" height="76" inset="3,3,0,3" childpadding="9">
-			<Control name="image" width="62" height="62" maxheight="62" bkimage="file='fc_img_ph.png'"></Control>
+	<!-- 样式② 图左文右 250x82:缩略图 80x80 贴左/上/下铺满,名字价格居右(HLayout 子项高度只认 maxheight) -->
+	<DiandanFoodItem name="diandan_fooditem" width="250" height="82" bkcolor="#00000000" bordersize="0" bkimage="file='fc_r8.png' corner='8,8,8,8'">
+		<HorizontalLayout width="250" height="82" inset="1,1,8,1" childpadding="9">
+			<Control name="image" width="80" height="80" maxheight="80" bkimage="file='fc_img_ph.png'"></Control>
 
-			<VerticalLayout width="176" height="70" maxheight="70">
+			<VerticalLayout width="152" height="80" maxheight="80">
 				<Label name="foodname" height="34" font="12" textcolor="#FF1F2329" wordbreak="true" endellipsis="true"></Label>
 				<Control></Control>
 				<Label name="price" height="19" font="113" textcolor="#FFF5623D" valign="top"></Label>
 			</VerticalLayout>
 		</HorizontalLayout>
+		<!-- 圆角遮罩:DuiLib 无裁剪,图片铺满后方角会戳出 fc_r8 圆角;外部填页面底色、洞内全透明,浮在上层盖住外沿 -->
+		<Control float="true" pos="0,0,250,82" bkimage="file='fc_mask_250x82.png'" mouse="false"></Control>
 		<Label name="nature" visible="false" width="54" height="22" font="12" text="多属性" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_grn.png' corner='11,11,11,11'" align="center" valign="center"></Label>
 
 		<Label name="chengzhong" visible="false" width="54" height="22" font="12" text="称重" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_blue.png' corner='11,11,11,11'" align="center" valign="center"></Label>

+ 6 - 4
bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_fooditem_youtu_3.xml

@@ -1,13 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Window>
-	<!-- 样式③ 名字价格压图 148x150:图内缩 3 避圆角,底部信息条 66 高(半透明底预混成实色 #FFF5F7F8) -->
+	<!-- 样式③ 名字价格压图 148x150:图片铺满整卡,底部信息条固定 48 高(白 65% 半透明 #A6FFFFFF),名字固定一行 -->
 	<DiandanFoodItem name="diandan_fooditem" width="148" height="150" bkcolor="#00000000" bordersize="0" bkimage="file='fc_r8.png' corner='8,8,8,8'">
-		<Control name="image" width="148" height="150" padding="3,3,3,0" bkimage="file='fc_img_ph.png'"></Control>
+		<Control name="image" width="148" height="150" bkimage="file='fc_img_ph.png'"></Control>
 
-		<VerticalLayout width="142" height="66" float="true" pos="3,81,145,147" mouse="false" inset="8,5,8,6" childpadding="2">
-			<Label name="foodname" height="34" font="12" textcolor="#FF1F2329" wordbreak="true" endellipsis="true"></Label>
+		<VerticalLayout width="148" height="48" float="true" pos="0,102,148,150" mouse="false" bkcolor="#A6FFFFFF" inset="8,5,8,6" childpadding="1">
+			<Label name="foodname" height="17" font="12" textcolor="#FF1F2329" endellipsis="true"></Label>
 			<Label name="price" height="19" font="113" textcolor="#FFF5623D" valign="top"></Label>
 		</VerticalLayout>
+		<!-- 圆角遮罩:盖住图片与信息条戳出 fc_r8 圆角轮廓的方角 -->
+		<Control float="true" pos="0,0,148,150" bkimage="file='fc_mask_148x150.png'" mouse="false"></Control>
 		<Label name="nature" visible="false" width="54" height="22" font="12" text="多属性" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_grn.png' corner='11,11,11,11'" align="center" valign="center"></Label>
 
 		<Label name="chengzhong" visible="false" width="54" height="22" font="12" text="称重" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_blue.png' corner='11,11,11,11'" align="center" valign="center"></Label>

+ 26 - 28
bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_page.xml

@@ -7,7 +7,24 @@
 
 			<!-- ============ 左:购物车 390(白卡 radius 10,内容区 380 保持原样) ============ -->
 			<VerticalLayout width="390" bkcolor="#00000000" childpadding="12">
-				<!-- 会员区块:独立卡片浮在灰底上(未登录白卡可点 / 登录浅绿卡) -->
+				<!-- 称重卡:独立卡片置顶(电子秤未连接时由 C++ 隐藏 diandan_page_chengzhong_layout) -->
+				<HorizontalLayout name="diandan_page_chengzhong_layout" height="100" bkimage="file='dc_cart.png' corner='10,10,10,10'">
+					<VerticalLayout width="80">
+						<Control name="diandan_page_status_chengzhong_wending" bkimage="deng_off.png" width="8" height="8" float="true" pos="15,28,23,36" mouse="false"/>
+						<Label name="diandan_page_label_chengzhong_wending" text="稳定" height="20" padding="30,20,0,0" font="14"/>
+						<Control name="diandan_page_status_chengzhong_jingzhong" bkimage="deng_off.png" width="8" height="8" float="true" pos="15,68,23,76" mouse="false"/>
+						<Label name="diandan_page_label_chengzhong_jingzhong" text="净重" height="20" padding="30,20,0,0" font="14"/>
+					</VerticalLayout>
+					<HorizontalLayout width="200">
+						<Label name="diandan_page_label_chengzhong_value" text="0.000" align="right" width="135" height="40" padding="0,35,0,0" textcolor="#FF2E9B5C" font="140"/>
+						<Label name="diandan_page_label_chengzhong_unit" text="公斤" height="30" padding="15,40,0,0" font="16"/>
+					</HorizontalLayout>
+					<VerticalLayout>
+						<Button name="diandan_page_chengzhong_zhiling" visible="false" width="80" height="32" padding="10,10,10,0" text="置零" textcolor="#FFFFFFFF" normalimage="file='btn_green_zhengchang.png' corner='5,5,5,5'" hotimage="file='btn_green_xuanfu.png' corner='5,5,5,5'" pushedimage="file='btn_green_dianji.png' corner='5,5,5,5'"/>
+						<Button name="diandan_page_chengzhong_qupi" visible="false" width="80" height="32" padding="10,15,10,0" text="去皮" textcolor="#FFFFFFFF" normalimage="file='btn_green_zhengchang.png' corner='5,5,5,5'" hotimage="file='btn_green_xuanfu.png' corner='5,5,5,5'" pushedimage="file='btn_green_dianji.png' corner='5,5,5,5'"/>
+					</VerticalLayout>
+				</HorizontalLayout>
+			<!-- 会员区块:独立卡片浮在灰底上(未登录白卡可点 / 登录浅绿卡) -->
 				<HorizontalLayout height="66" name="diandan_member_login_wrap">
 					<VerticalLayout>
 						<Button name="btn_diandan_member_login" text="" tooltip="点击登录会员" width="390" height="66" float="true" pos="0,0,390,66" normalimage="file='mb_login_n.png' corner='8,8,8,8'" hotimage="file='mb_login_h.png' corner='8,8,8,8'" pushedimage="file='mb_login_h.png' corner='8,8,8,8'"/>
@@ -37,26 +54,9 @@
 
 				<!-- 购物车区块:白卡(餐牌 / 列表 / 备注 / 优惠 / 总价) -->
 				<VerticalLayout bkimage="file='dc_cart.png' corner='10,10,10,10'">
-					<!-- 称重区:保留原样,电子秤未连接时由 C++ 隐藏 -->
-					<HorizontalLayout name="diandan_page_chengzhong_layout" height="100">
-						<VerticalLayout width="80">
-							<Control name="diandan_page_status_chengzhong_wending" bkimage="deng_off.png" width="8" height="8" float="true" pos="15,28,23,36" mouse="false"/>
-							<Label name="diandan_page_label_chengzhong_wending" text="稳定" height="20" padding="30,20,0,0" font="14"/>
-							<Control name="diandan_page_status_chengzhong_jingzhong" bkimage="deng_off.png" width="8" height="8" float="true" pos="15,68,23,76" mouse="false"/>
-							<Label name="diandan_page_label_chengzhong_jingzhong" text="净重" height="20" padding="30,20,0,0" font="14"/>
-						</VerticalLayout>
-						<HorizontalLayout width="200">
-							<Label name="diandan_page_label_chengzhong_value" text="0.000" align="right" width="135" height="40" padding="0,35,0,0" textcolor="#FF2E9B5C" font="140"/>
-							<Label name="diandan_page_label_chengzhong_unit" text="公斤" height="30" padding="15,40,0,0" font="16"/>
-						</HorizontalLayout>
-						<VerticalLayout>
-							<Button name="diandan_page_chengzhong_zhiling" visible="false" width="80" height="32" padding="10,10,10,0" text="置零" textcolor="#FFFFFFFF" normalimage="file='btn_green_zhengchang.png' corner='5,5,5,5'" hotimage="file='btn_green_xuanfu.png' corner='5,5,5,5'" pushedimage="file='btn_green_dianji.png' corner='5,5,5,5'"/>
-							<Button name="diandan_page_chengzhong_qupi" visible="false" width="80" height="32" padding="10,15,10,0" text="去皮" textcolor="#FFFFFFFF" normalimage="file='btn_green_zhengchang.png' corner='5,5,5,5'" hotimage="file='btn_green_xuanfu.png' corner='5,5,5,5'" pushedimage="file='btn_green_dianji.png' corner='5,5,5,5'"/>
-						</VerticalLayout>
-					</HorizontalLayout>
-
+	
 					<!-- 餐牌号 / 清空 药丸行 -->
-					<HorizontalLayout name="diandan_member_row" height="52" inset="14,0,14,0" childpadding="8" childvalign="vcenter">
+					<HorizontalLayout name="diandan_member_row" height="60" inset="14,8,14,0" childpadding="8" childvalign="vcenter">
 						<VerticalLayout width="104" height="32">
 							<Button name="btn_diandan_canpaihao" text="" tooltip="输入餐牌号" width="104" height="32" font="13" textcolor="#FF5F6368" normalimage="file='dc_pill.png' corner='16,16,16,16'" hotimage="file='dc_pill_h.png' corner='16,16,16,16'" pushedimage="file='dc_pill_h.png' corner='16,16,16,16'"/>
 							<Control bkimage="dc_ico_paizi16.png" width="16" height="16" float="true" pos="13,8,29,24" mouse="false"/>
@@ -81,8 +81,8 @@
 						<Control bkimage="dc_ico_warn12.png" width="12" height="12" maxheight="12" padding="14,0,0,0"/>
 						<Label name="diandan_page_label_zhengdanbeizhu" text="整单备注:" font="13" textcolor="#FFA8ADB3" valign="center"/>
 					</HorizontalLayout>
-					<!-- 虚线分隔:商品明细 / 优惠 -->
-					<Control height="1" width="388" bkimage="file='dc_dashline.png'"/>
+					<!-- 实线分隔:商品明细 / 优惠(与列表头下方同款 #FFF0F1F3) -->
+					<Control height="1" width="388" padding="1,0,0,0" bkcolor="#FFF0F1F3"/>
 
 					<HorizontalLayout name="diandan_page_youhui_tishi_layout" height="30" bkcolor="#FFFFFFFF" visible="false" padding="10,0,10,0" childvalign="vcenter">
 						<Label name="diandan_page_youhui_tishi" text="已优惠10元" textcolor="#FFE14B4A" font="13" padding="0,0,0,0" width="160" height="30" align="left" valign="center"/>
@@ -91,9 +91,9 @@
 					</HorizontalLayout>
 
 					<!-- 总价(左:打包费 / 右:总价) -->
-					<HorizontalLayout height="44" inset="10,0,14,0">
-						<Label name="diandan_page_otherprice" text="" height="44" font="13" textcolor="#FF1F2329" align="left" valign="center" showhtml="true"/>
-						<Label name="diandan_page_totalprice" text="总价:{f 124}<c #E14B4A>¥0.00</c>" height="44" font="15" textcolor="#FF1F2329" align="right" valign="center" showhtml="true"/>
+					<HorizontalLayout height="46" inset="10,0,14,0">
+						<Label name="diandan_page_otherprice" text="" height="46" font="13" textcolor="#FF1F2329" align="left" valign="center" showhtml="true"/>
+						<Label name="diandan_page_totalprice" text="总价:{f 124}<c #E14B4A>¥0.00</c>" height="46" font="15" textcolor="#FF1F2329" align="right" valign="center" showhtml="true"/>
 					</HorizontalLayout>
 
 				</VerticalLayout>
@@ -123,7 +123,7 @@
 			<!-- ============ 中:操作条 56(图标 + 文字竖排,整卡都是热区) ============ -->
 			<VerticalLayout width="56" childpadding="7">
 			<VerticalLayout width="56" height="56">
-				<Button name="btn_diandan_jia" tooltip="添加数量" text="" width="56" height="56" normalimage="file='op_plus_n.png' corner='10,10,10,10'" hotimage="file='op_plus_h.png' corner='10,10,10,10'" pushedimage="file='op_plus_p.png' corner='10,10,10,10'"/>
+				<Button name="btn_diandan_jia" tooltip="添加数量" text="" width="56" height="56" normalimage="file='op_n.png' corner='10,10,10,10'" hotimage="file='op_h.png' corner='10,10,10,10'" pushedimage="file='op_p.png' corner='10,10,10,10'"/>
 				<Control float="true" pos="18,18,38,38" bkimage="file='op_ico_add_grn.png'" mouse="false"/>
 			</VerticalLayout>
 			<VerticalLayout width="56" height="56">
@@ -203,7 +203,6 @@
 						<Button name="diandan_jiesuan_yincangyouhui_btn" text="隐藏优惠" height="30" maxheight="30" width="80" font="12" textcolor="#FF60B177" normalimage="file='btn_r8_green_n.png' corner='8,8,8,8'" hotimage="file='btn_r8_green_h.png' corner='8,8,8,8'" pushedimage="file='btn_r8_green_p.png' corner='8,8,8,8'"/>
 					</HorizontalLayout>
 
-					<Control height="1" bkcolor="#FFF0F1F3"/>
 
 					<VerticalLayout inset="18,12,18,12" childpadding="9">
 						<HorizontalLayout height="36" childpadding="8" childvalign="vcenter">
@@ -284,7 +283,6 @@
 						<Button name="diandan_jiesuan_xianshiyouhui_btn" text="显示优惠" visible="false" height="30" maxheight="30" width="80" padding="0,11,18,0" textcolor="#FF60B177" normalimage="file='btn_r8_green_n.png' corner='8,8,8,8'" hotimage="file='btn_r8_green_h.png' corner='8,8,8,8'" pushedimage="file='btn_r8_green_p.png' corner='8,8,8,8'"/>
 					</HorizontalLayout>
 
-					<Control height="1" bkcolor="#FFF0F1F3" padding="10,0,10,0"/>
 
 					<VerticalLayout name="diandan_jiesuan_zhangdanmingxi_jiage_layout" padding="20,0,20,0" height="100">
 					</VerticalLayout>

BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/fc_mask_148x150.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/fc_mask_250x82.png


+ 8 - 8
zhipuzi_pos_windows/page/CDiandanPageUI.cpp

@@ -239,7 +239,7 @@ void CDiandanPageUI::UpdateFoodtypePos()
 
 	//根据宽度计算每行显示的数量
 	//新布局:分类区可用宽 = 页宽 - inset 24 - 购物车 390 - 间距 12 - 操作条 56
-	//每个胶囊占 138(胶囊 130 + 间距 8)
+	//每个胶囊占 138(胶囊 130 + 间距 8);首列从 x=0 起,与下方商品网格左边对齐
 	int nMeihangNum = (nWidth - 482) / 138;
 
 	int num = 0;
@@ -254,7 +254,7 @@ void CDiandanPageUI::UpdateFoodtypePos()
 		int curCol = num % nMeihangNum + 1;
 
 		RECT rect;
-		rect.left = (curCol - 1) * 138 + 8;
+		rect.left = (curCol - 1) * 138;
 		rect.right = rect.left + 130;
 		rect.top = (curRow - 1) * 46 + 8;
 		rect.bottom = rect.top + 38;
@@ -311,10 +311,10 @@ void CDiandanPageUI::InitFoodShow()
 	}
 	else if (setting_xianshi_is_youtu == "2")
 	{
-		//样式② 图左文右:3 列 x 250,卡片高 76
+		//样式② 图左文右:3 列 x 250,卡片高 82
 		SIZE itemsize;
 		itemsize.cx = 250;
-		itemsize.cy = 76;
+		itemsize.cy = 82;
 		m_foodLayout->SetItemSize(itemsize);
 
 		xml_name = _T("diandan_fooditem_youtu_2.xml");
@@ -708,7 +708,7 @@ void CDiandanPageUI::UpdateJiesuanZhifuPos()
 	pZhangdanLayout->SetFixedWidth(nZhangdanWidth);
 
 	//根据宽度计算每行显示的数量
-	int nMeihangNum = (nZhangdanWidth) / 144;
+	int nMeihangNum = (nZhangdanWidth) / 132;
 	if (nMeihangNum < 1)
 	{
 		nMeihangNum = 1;
@@ -725,9 +725,9 @@ void CDiandanPageUI::UpdateJiesuanZhifuPos()
 		int curCol = num % nMeihangNum + 1;
 
 		RECT rect;
-		rect.left = (curCol - 1) * 140 + 20;
+		rect.left = (curCol - 1) * 132 + 20;
 		rect.right = rect.left + 120;
-		rect.top = (curRow - 1) * 74 + 20;
+		rect.top = (curRow - 1) * 64 + 6;
 		rect.bottom = rect.top + 54;
 
 		// 强制设置固定大小和位置
@@ -744,7 +744,7 @@ void CDiandanPageUI::UpdateJiesuanZhifuPos()
 
 	//调整区域高度
 	int lastRow = (num - 1) / nMeihangNum + 1;
-	pZhifufangshiLayout->SetFixedHeight(lastRow * 74 + 20);
+	pZhifufangshiLayout->SetFixedHeight((lastRow - 1) * 64 + 60);
 }
 
 //展示结算页面,隐藏选购页面

BIN
zhipuzi_pos_windows/resource/skin.zip