|
@@ -2,18 +2,39 @@
|
|
|
<Window>
|
|
<Window>
|
|
|
<!-- 样式② 图左文右 188x82 一行4个(R41):缩略图 80x80 贴左/上/下铺满,名字价格居右(HLayout 子项高度只认 maxheight) -->
|
|
<!-- 样式② 图左文右 188x82 一行4个(R41):缩略图 80x80 贴左/上/下铺满,名字价格居右(HLayout 子项高度只认 maxheight) -->
|
|
|
<DiandanFoodItem name="diandan_fooditem" width="188" height="82" bkcolor="#00000000" bordersize="0" bkimage="file='fc_r8.png' corner='8,8,8,8'">
|
|
<DiandanFoodItem name="diandan_fooditem" width="188" height="82" bkcolor="#00000000" bordersize="0" bkimage="file='fc_r8.png' corner='8,8,8,8'">
|
|
|
- <HorizontalLayout width="188" height="82" inset="1,1,8,1" childpadding="9" mouse="false">
|
|
|
|
|
- <Control name="image" width="80" height="80" maxheight="80" bkimage="file='fc_img_ph.png'" mouse="false"></Control>
|
|
|
|
|
|
|
+ <!-- 【R62 修「照片顶边黑线」—— 与样式① 的 R52 同源同招:裁掉,不是盖住】
|
|
|
|
|
+ 根因:下载的源图(!max200)顶部自带 2~4px 黑底(黑底食品照);图片控件原从卡内 y=1 起铺
|
|
|
|
|
+ ⇒ 黑线露在卡内 y=1..4,横贯整个图片宽度。
|
|
|
|
|
+ 改法:
|
|
|
|
|
+ ① HLayout 的 inset 上边距取 -5 ⇒ 内容区从卡内 y=-5 开始(内容高 86);
|
|
|
|
|
+ ② 图片高取 86(= 内容区高)⇒ 占卡内 y=-5..81,其 y<0 的 5px 顶部被**容器裁剪**剪掉;
|
|
|
|
|
+ DuiLib 的 CContainerUI::DoPaint(UIContainer.cpp:908/938)会用 RGN_AND 把子项裁到容器矩形内,
|
|
|
|
|
+ 所以「向上溢出」是安全的,不会画到卡片外面;
|
|
|
|
|
+ ③ 可见图片 = 卡内 y=0..81:用 80x82 的窗口显示源图 86px 高的内容,裁掉顶部约 5.8%
|
|
|
|
|
+ ⇒ 顶边黑底消失,且图片顶端紧贴卡片描边、不留白边距;
|
|
|
|
|
+ ④ 文字区高 86 + 自身 inset 上 6 = 内容 80,名字/价格位置与原版逐像素一致。
|
|
|
|
|
+ —— 纯皮肤层修复:不改几何、不改业务、不需重编 DLL。若要回退:把 inset 改回 "1,1,8,1"、
|
|
|
|
|
+ 图片改回 height="80" maxheight="80"、VerticalLayout 改回 height="80" maxheight="80" 并去掉它的 inset。 -->
|
|
|
|
|
+ <HorizontalLayout width="188" height="82" inset="1,-5,8,1" childpadding="9" mouse="false">
|
|
|
|
|
+ <Control name="image" width="80" height="86" maxheight="86" bkimage="file='fc_img_ph.png'" mouse="false"></Control>
|
|
|
|
|
|
|
|
- <VerticalLayout width="90" height="80" maxheight="80" mouse="false">
|
|
|
|
|
- <Label name="foodname" height="34" font="12" textcolor="#FF1F2329" wordbreak="true" endellipsis="true" mouse="false"></Label>
|
|
|
|
|
|
|
+ <VerticalLayout width="90" height="86" maxheight="86" inset="0,6,0,0" mouse="false">
|
|
|
|
|
+ <Label name="foodname" height="34" font="14" textcolor="#FF1F2329" wordbreak="true" endellipsis="true" mouse="false"></Label>
|
|
|
<Control mouse="false"></Control>
|
|
<Control mouse="false"></Control>
|
|
|
<Label name="price" height="19" font="113" textcolor="#FFF5623D" valign="top" mouse="false"></Label>
|
|
<Label name="price" height="19" font="113" textcolor="#FFF5623D" valign="top" mouse="false"></Label>
|
|
|
</VerticalLayout>
|
|
</VerticalLayout>
|
|
|
</HorizontalLayout>
|
|
</HorizontalLayout>
|
|
|
- <!-- 圆角遮罩:DuiLib 无裁剪,图片铺满后方角会戳出 fc_r8 圆角;外部填页面底色、洞内全透明,浮在上层盖住外沿 -->
|
|
|
|
|
|
|
+ <!-- 圆角遮罩(R62 改版):DuiLib 无裁剪,图片铺满后方角会戳出 fc_r8 圆角轮廓;
|
|
|
|
|
+ 角块内「圆角外侧(d > 8.5)」填页面底色、其余一律透明 ⇒ 只负责盖住戳出的方角。
|
|
|
|
|
+ ⚠️ R60/R61 版遮罩自带一圈「描边色不透明环(半径 7~8.5)」,会在悬浮/按压时盖住顶层 frame 的状态色、
|
|
|
|
|
+ 使圆角处描边一色不变(用户看到「圆角描边缺失」)⇒ R62 已把环带改透明,描边色统一交给顶层 frame。 -->
|
|
|
<Control float="true" pos="0,0,188,82" bkimage="file='fc_mask_188x82.png'" mouse="false"></Control>
|
|
<Control float="true" pos="0,0,188,82" bkimage="file='fc_mask_188x82.png'" mouse="false"></Control>
|
|
|
- <!-- 顶层描边框:透明中心只描边,盖在图片与圆角遮罩之上,修「描边弧线在圆角处被盖断」(R24) -->
|
|
|
|
|
|
|
+ <!-- 顶层描边框(R62 恢复 + 重做资源):透明中心只描边,盖在图片与圆角遮罩之上。
|
|
|
|
|
+ 【为什么这一层不能省】CDiandanFoodItemUI::SetCardState 在 hot/pressed 时会把本控件换成
|
|
|
|
|
+ fc_r8_hot_frame.png / fc_r8_pressed_frame.png —— 只有这一层存在,「悬浮/按压时圆角处的描边换色」才生效。
|
|
|
|
|
+ R61 曾把它注释掉(当时误判它是锯齿元凶),结果悬浮/按压时圆角描边缺失,R62 予以恢复。
|
|
|
|
|
+ 【R62 已重做三张图】角心 (8,8)、R_IN=7.0、R_OUT=8.5、8x8 超采样 + 连续坐标
|
|
|
|
|
+ ⇒ alpha 级数 6~7 → 12,且几何与遮罩外沿严格对齐 ⇒ 弧线平滑、不再有硬台阶(这才是 R61 锯齿的真解)。 -->
|
|
|
<Control name="diandan_fooditem_frame" bkimage="file='fc_r8_frame.png' corner='8,8,8,8'" width="188" height="82" float="true" pos="0,0,188,82" mouse="false"></Control>
|
|
<Control name="diandan_fooditem_frame" bkimage="file='fc_r8_frame.png' corner='8,8,8,8'" width="188" height="82" float="true" pos="0,0,188,82" 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" mouse="false"></Label>
|
|
<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" mouse="false"></Label>
|
|
|
|
|
|
|
@@ -22,4 +43,4 @@
|
|
|
<Label name="kucun" visible="false" width="54" height="22" font="12" text="已售罄" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_gray.png' corner='11,11,11,11'" align="center" valign="center" mouse="false"></Label>
|
|
<Label name="kucun" visible="false" width="54" height="22" font="12" text="已售罄" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_gray.png' corner='11,11,11,11'" align="center" valign="center" mouse="false"></Label>
|
|
|
</DiandanFoodItem>
|
|
</DiandanFoodItem>
|
|
|
|
|
|
|
|
-</Window>
|
|
|
|
|
|
|
+</Window>
|