Browse Source

正餐的UI改完

张洋 1 month ago
parent
commit
7071dfc50f

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


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


+ 7 - 1
bin/Win32/Debug/zhipuzi_pos_windows/skin/tabletype_option.xml

@@ -1,5 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <Window>
 <Window>
-	<TabletypeOption endellipsis="true" align="center" valign="center" width="120" height="42" float="true" padding="15,19,0,0" bkcolor="#FFECECEC" selectedtextcolor="#FFFFFFFF" selectedbkcolor="#FF60B177">
+	<TabletypeOption endellipsis="true" width="130" height="38" float="true" font="13"
+		textcolor="#FF5F6368" selectedtextcolor="#FFFFFFFF" pushedtextcolor="#FFFFFFFF"
+		bkcolor="#00000000" selectedbkcolor="#00000000"
+		normalimage="file='bt_cat_n.png' corner='19,19,19,19'"
+		hotimage="file='bt_cat_hot.png' corner='19,19,19,19'"
+		pushedimage="file='bt_cat_sel.png' corner='19,19,19,19'"
+		selectedimage="file='bt_cat_sel.png' corner='19,19,19,19'">
 	</TabletypeOption>
 	</TabletypeOption>
 </Window>
 </Window>

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


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


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


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


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


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


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


+ 6 - 6
bin/Win32/Debug/zhipuzi_pos_windows/skin/zhengcan_page.xml

@@ -11,7 +11,7 @@
 					</HorizontalLayout>
 					</HorizontalLayout>
 				</HorizontalLayout>
 				</HorizontalLayout>
 				
 				
-				<VerticalLayout name="zhengcan_tablelist_scrolllayout" vscrollbar="true">
+				<VerticalLayout name="zhengcan_tablelist_scrolllayout" vscrollbar="true" bkcolor="#FFFFFFFF">
 					<VerticalLayout name="zhengcan_tablelist" padding="0,0,0,0">
 					<VerticalLayout name="zhengcan_tablelist" padding="0,0,0,0">
 					
 					
 					</VerticalLayout>
 					</VerticalLayout>
@@ -25,13 +25,13 @@
 						<Button name="zhengcan_zhuantai_queding" text="确定" height="45" width="120" padding="10,17,20,0" textcolor="#FFFFFFFF" normalimage="file='btn_border_blue.png' corner='5,5,5,5'" hotimage="file='btn_border_blue_Hover.png' corner='5,5,5,5'" pushedimage="file='btn_border_blue_Click.png' corner='5,5,5,5'"></Button>
 						<Button name="zhengcan_zhuantai_queding" text="确定" height="45" width="120" padding="10,17,20,0" textcolor="#FFFFFFFF" normalimage="file='btn_border_blue.png' corner='5,5,5,5'" hotimage="file='btn_border_blue_Hover.png' corner='5,5,5,5'" pushedimage="file='btn_border_blue_Click.png' corner='5,5,5,5'"></Button>
 					</HorizontalLayout>
 					</HorizontalLayout>
 					
 					
-					<VerticalLayout name="zhengcan_saomadiancan_layout" float="true" bkimage="saomadiancan_attention_bk.png">
-						<Button name="zhengcan_saomadiancan_btn" text="" width="250" height="102" padding="0,0,0,0" normalimage="" hotimage="" pushedimage=""></Button>
+					<VerticalLayout name="zhengcan_saomadiancan_layout" float="true" width="182" height="52" bkimage="file='saomadiancan_attention_bk.png' corner='26,26,26,26'">
+						<Button name="zhengcan_saomadiancan_btn" text="" width="182" height="52" padding="0,0,0,0" normalimage="" hotimage="" pushedimage=""></Button>
 						
 						
-						<Control bkimage="saomadiancan_num.png" float="true" pos="190,28,226,64" mouse="false"></Control>
+						<Control bkimage="saomadiancan_num.png" float="true" pos="139,9,173,43" mouse="false"></Control>
 						
 						
-						<Label text="扫码点餐待处理" font="20" float="true" pos="35,32,180,57" textcolor="#FFFFFFFF" mouse="false"></Label>
-						<Label name="zhengcan_saomadiancan_num_value" text="0" font="18" float="true" pos="200,33,225,58" mouse="false"></Label>
+						<Label text="扫码点餐待处理" font="15" float="true" pos="22,0,132,52" textcolor="#FFFFFFFF" mouse="false"></Label>
+						<Label name="zhengcan_saomadiancan_num_value" text="0" font="15" float="true" pos="139,9,173,43" align="center" textcolor="#FFFFFFFF" mouse="false"></Label>
 					</VerticalLayout>
 					</VerticalLayout>
 					
 					
 					<HorizontalLayout name="loading">
 					<HorizontalLayout name="loading">

+ 8 - 8
bin/Win32/Debug/zhipuzi_pos_windows/skin/zhengcan_tableitem.xml

@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <Window>
 <Window>
 	
 	
-	<ZhengcanTableItem name="zhengcan_tableitem" bkcolor="#FFFFFFFF" width="177" height="140">
-		<Label name="tablename" float="true" pos="10,15,170,60" wordbreak="true" endellipsis="true" font="16"></Label>
-		<Label name="status" font="14" float="true" pos="10,70,170,100" align="left"></Label>
+	<ZhengcanTableItem name="zhengcan_tableitem" width="177" height="140" bkimage="file='dc_cart.png' corner='10,10,10,10'">
+		<Label name="tablename" float="true" pos="12,12,165,33" endellipsis="true" font="115"></Label>
+		<Label name="status" font="12" float="true" pos="12,42,68,64" align="center" textcolor="#FF8A9099" bkimage="file='tc_pill_grey.png' corner='11,11,11,11'"></Label>
 		
 		
 		<Control></Control>
 		<Control></Control>
-		<HorizontalLayout name="zhengcan_tableitem_bottom" height="32" bkcolor="#FFEBEBEB">
-			<Control name="people_image" bkimage="zhengcan_people_2.png" float="true" pos="10,9,28,25"></Control>
-			<Label name="renshu" visible="true" width="50" height="26" font="14" text="6人" float="true" pos="33,5,90,30"></Label>
+		<HorizontalLayout name="zhengcan_tableitem_bottom" height="32">
+			<Control name="people_image" bkimage="zhengcan_people_2.png" float="true" pos="12,6,30,22"></Control>
+			<Label name="renshu" visible="true" width="60" height="26" font="12" text="6人" float="true" pos="35,3,95,29"></Label>
 
 
-			<Control name="time_image" bkimage="zhengcan_time_2.png" float="true" pos="97,10,115,26"></Control>			
-			<Label name="shijian" visible="true" font="14" text="" float="true" pos="113,5,175,30"></Label>	
+			<Control name="time_image" bkimage="zhengcan_time_2.png" float="true" pos="74,6,92,22"></Control>
+			<Label name="shijian" visible="true" font="12" text="" float="true" pos="97,3,165,29"></Label>
 		</HorizontalLayout>
 		</HorizontalLayout>
 		
 		
 		<Control visible="false" name="zhuantai_zhuanchu" bkimage="zhengcan_zhuanchu.png" float="true" pos="0,0,177,140"></Control>
 		<Control visible="false" name="zhuantai_zhuanchu" bkimage="zhengcan_zhuanchu.png" float="true" pos="0,0,177,140"></Control>

+ 40 - 11
zhipuzi_pos_windows/control/CZhengcanTableItemUI.cpp

@@ -64,7 +64,22 @@ void CZhengcanTableItemUI::UpdateShow()
 
 
 	if (m_status == "0")
 	if (m_status == "0")
 	{
 	{
-		//未开台
+		//未开台:白卡圆角九宫格(C4),文字/图标回到深色版
+		this->SetBkImage(L"file='dc_cart.png' corner='10,10,10,10'");
+
+		//像素级还原 C4:徽章 = 浅灰实底 #F0F1F3 + 辅助灰字 #8A9099
+		pStatus->SetBkImage(L"file='tc_pill_grey.png' corner='11,11,11,11'");
+
+		pName->SetTextColor(0xFF1F2329);
+		pStatus->SetTextColor(0xFF8A9099);
+
+		//页脚(人数)用设计稿 --aid #8A9099,不再用 #5F6368
+		pRenshu->SetTextColor(0xFF8A9099);
+		pShijian->SetTextColor(0xFF8A9099);
+
+		pPeopleImage->SetBkImage(L"zhengcan_people_2.png");
+		pTimeImage->SetBkImage(L"zhengcan_time_2.png");
+
 		pStatus->SetText(L"未开台");
 		pStatus->SetText(L"未开台");
 
 
 		//隐藏时钟
 		//隐藏时钟
@@ -81,10 +96,9 @@ void CZhengcanTableItemUI::UpdateShow()
 		pRenshu->SetText((CLewaimaiString::UTF8ToUnicode(m_person_num) + L"人").c_str());
 		pRenshu->SetText((CLewaimaiString::UTF8ToUnicode(m_person_num) + L"人").c_str());
 
 
 		pName->SetTextColor(0xFFFFFFFF);
 		pName->SetTextColor(0xFFFFFFFF);
-		pStatus->SetTextColor(0xFFFFFFFF);
 
 
-		pRenshu->SetTextColor(0xFFFFFFFF);
-		pShijian->SetTextColor(0xFFFFFFFF);
+		//像素级还原 C4:色块卡上的徽章是「卡色+白16%实底 + 白字」
+		pStatus->SetTextColor(0xFFFFFFFF);
 
 
 		pPeopleImage->SetBkImage(L"zhengcan_people_1.png");
 		pPeopleImage->SetBkImage(L"zhengcan_people_1.png");
 		pTimeImage->SetBkImage(L"zhengcan_time_1.png");
 		pTimeImage->SetBkImage(L"zhengcan_time_1.png");
@@ -112,17 +126,27 @@ void CZhengcanTableItemUI::UpdateShow()
 		//区分待下单、待结账、待清台这3个状态
 		//区分待下单、待结账、待清台这3个状态
 		if (m_order_id == "0")
 		if (m_order_id == "0")
 		{
 		{
-			//说明还未下单,处于待下单状态,用绿色
-			this->SetBkColor(0xFF60B177);
-			pBottom->SetBkColor(0xFF28A25E);
+			//说明还未下单,处于待下单状态,用绿色(C4:九宫格实色图,圆角不会被方角矩形盖掉)
+			this->SetBkImage(L"file='tc_card_green.png' corner='10,10,10,10'");
+			pBottom->SetBkColor(0x00000000);
+
+			//徽章 #79BD8C(绿+白16%)+ 白字;页脚 #D2E9D9(绿+白72%)
+			pStatus->SetBkImage(L"file='tc_pill_green.png' corner='11,11,11,11'");
+			pRenshu->SetTextColor(0xFFD2E9D9);
+			pShijian->SetTextColor(0xFFD2E9D9);
 
 
 			pStatus->SetText(L"待下单");
 			pStatus->SetText(L"待下单");
 		}
 		}
 		else if (m_order_status == "SUCCESS")
 		else if (m_order_status == "SUCCESS")
 		{
 		{
 			//待清台,用蓝色
 			//待清台,用蓝色
-			this->SetBkColor(0xFF497FC7);
-			pBottom->SetBkColor(0xFF3A74C2);
+			this->SetBkImage(L"file='tc_card_blue.png' corner='10,10,10,10'");
+			pBottom->SetBkColor(0x00000000);
+
+			//徽章 #6693D0(蓝+白16%)+ 白字;页脚 #CCDBEF(蓝+白72%)
+			pStatus->SetBkImage(L"file='tc_pill_blue.png' corner='11,11,11,11'");
+			pRenshu->SetTextColor(0xFFCCDBEF);
+			pShijian->SetTextColor(0xFFCCDBEF);
 
 
 			pStatus->SetText(L"待清台");
 			pStatus->SetText(L"待清台");
 		}
 		}
@@ -131,8 +155,13 @@ void CZhengcanTableItemUI::UpdateShow()
 			//包含OPEN PASSWORD CLOSE等,只要没支付成功,就是未支付状态
 			//包含OPEN PASSWORD CLOSE等,只要没支付成功,就是未支付状态
 
 
 			//说明已下单,未支付,处于待支付状态,用红色
 			//说明已下单,未支付,处于待支付状态,用红色
-			this->SetBkColor(0xFFF95252);
-			pBottom->SetBkColor(0xFFF73F3F);
+			this->SetBkImage(L"file='tc_card_red.png' corner='10,10,10,10'");
+			pBottom->SetBkColor(0x00000000);
+
+			//徽章 #E66867(红+白16%)+ 白字;页脚 #F3B7B7(红+白60%)
+			pStatus->SetBkImage(L"file='tc_pill_red.png' corner='11,11,11,11'");
+			pRenshu->SetTextColor(0xFFF3B7B7);
+			pShijian->SetTextColor(0xFFF3B7B7);
 
 
 			pStatus->SetText(L"待结账");
 			pStatus->SetText(L"待结账");
 		}
 		}

+ 13 - 15
zhipuzi_pos_windows/page/CZhengcanPageUI.cpp

@@ -79,10 +79,7 @@ void CZhengcanPageUI::HandleSelectChangeMsg(TNotifyUI& msg)
 
 
 		if (m_cur_type_id != id)
 		if (m_cur_type_id != id)
 		{
 		{
-			//切换了商品分类
-			m_curZhuozitypeOption->SetBkColor(0xFFECECEC);
-
-			msg.pSender->SetBkColor(0xFF60B177);
+			//切换了商品分类(C4:胶囊选中态由 selectedimage=bt_cat_sel.png 表达,不再用方形 bkcolor)
 
 
 			m_curZhuozitypeOption = static_cast<CControlUI*>(msg.pSender);
 			m_curZhuozitypeOption = static_cast<CControlUI*>(msg.pSender);
 
 
@@ -188,7 +185,7 @@ void CZhengcanPageUI::InitTabletypeShow()
 
 
 	if (m_curZhuozitypeOption != NULL)
 	if (m_curZhuozitypeOption != NULL)
 	{
 	{
-		m_curZhuozitypeOption->SetBkColor(0xFF60B177);
+		//C4:胶囊态由图片表达,无需 SetBkColor
 	}
 	}
 
 
 	//如果不是一个分类都没有,选中第一个分类
 	//如果不是一个分类都没有,选中第一个分类
@@ -214,7 +211,7 @@ void CZhengcanPageUI::UpdateTabletypePos()
 	}
 	}
 
 
 	//根据宽度计算每行显示的数量
 	//根据宽度计算每行显示的数量
-	int nMeihangNum = (nWidth - 20) / 140;
+	int nMeihangNum = (nWidth - 20) / 138;
 
 
 	if (nMeihangNum < 1)
 	if (nMeihangNum < 1)
 	{
 	{
@@ -232,10 +229,10 @@ void CZhengcanPageUI::UpdateTabletypePos()
 		int curCol = num % nMeihangNum + 1;
 		int curCol = num % nMeihangNum + 1;
 
 
 		RECT rect;
 		RECT rect;
-		rect.left = (curCol - 1) * 140 + 10;
+		rect.left = (curCol - 1) * 138 + 10;
 		rect.right = rect.left + 130;
 		rect.right = rect.left + 130;
-		rect.top = (curRow - 1) * 52 + 10;
-		rect.bottom = rect.top + 42;
+		rect.top = (curRow - 1) * 46 + 10;
+		rect.bottom = rect.top + 38;
 
 
 		curItem->SetFloat(true);
 		curItem->SetFloat(true);
 
 
@@ -253,7 +250,7 @@ void CZhengcanPageUI::UpdateTabletypePos()
 
 
 	//调整区域高度
 	//调整区域高度
 	int lastRow = (num - 1) / nMeihangNum + 1;
 	int lastRow = (num - 1) / nMeihangNum + 1;
-	pFenleiLayout->SetFixedHeight(lastRow * 52 + 10);
+	pFenleiLayout->SetFixedHeight(lastRow * 46 + 10);
 
 
 	//处理滚动条问题
 	//处理滚动条问题
 	CVerticalLayoutUI* pFenleiScrollLayout = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("zhengcan_zhuozi_type_layout_scrolllayout")));
 	CVerticalLayoutUI* pFenleiScrollLayout = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("zhengcan_zhuozi_type_layout_scrolllayout")));
@@ -262,7 +259,7 @@ void CZhengcanPageUI::UpdateTabletypePos()
 		lastRow = 2;
 		lastRow = 2;
 	}
 	}
 
 
-	pFenleiScrollLayout->SetFixedHeight(lastRow * 52 + 10);
+	pFenleiScrollLayout->SetFixedHeight(lastRow * 46 + 10);
 
 
 	SIZE size;
 	SIZE size;
 	size.cx = 0;
 	size.cx = 0;
@@ -476,10 +473,11 @@ void CZhengcanPageUI::UpdateTablePos()
 	//更新扫码点餐操作栏的位置
 	//更新扫码点餐操作栏的位置
 	CHorizontalLayoutUI* pSaomadiancanLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("zhengcan_saomadiancan_layout")));
 	CHorizontalLayoutUI* pSaomadiancanLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("zhengcan_saomadiancan_layout")));
 
 
-	rect.left = nWidth - 250;
-	rect.right = rect.left + 250;
-	rect.top = nFenleiHeight + 200;
-	rect.bottom = rect.top + 102;
+	//像素级还原设计稿:182x52 圆角绿胶囊,右距 18 / 下距 18(原 250x102)
+	rect.left = nWidth - 182 - 18;
+	rect.right = rect.left + 182;
+	rect.top = m_nPageHeight - nFenleiHeight - 52 - 18;
+	rect.bottom = rect.top + 52;
 
 
 	// 强制设置固定大小和位置
 	// 强制设置固定大小和位置
 	//SIZE size;
 	//SIZE size;

BIN
zhipuzi_pos_windows/resource/skin.zip