刚接触duilib不久,闲着无聊仿一下QQ5.5的登陆框。先看效果:
其实比较简单,简单控件的组合
下面贴一下没有技术含量的xml文件
<?xml version="1.0" encoding="utf-8" ?>
<Window size="430,330" sizebox="10,10,12,12" caption="0,0,0,100" mininfo="430,330" roundcorner="5,5">
<VerticalLayout>
<HorizontalLayout bkimage="noon.png">
<HorizontalLayout height="30">
<HorizontalLayout />
<HorizontalLayout width="90" height="30">
<Button name="setbtn" width="30" height="30" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="btn_set_normal.png" hotimage="btn_set_hover.png" pushedimage="btn_set_press.png" />
<Button name="minbtn" width="30" height="30" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="btn_mini_normal.png" hotimage="btn_mini_highlight.png" pushedimage="btn_mini_down.png" />
<Button name="closebtn" width="30" height="30" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="btn_close_normal.png" hotimage="btn_close_highlight.png" pushedimage="btn_close_down.png" />
</HorizontalLayout>
</HorizontalLayout>
</HorizontalLayout>
<VerticalLayout height="150" bkcolor="#FFEBF2F9">
<HorizontalLayout height="100">
<Edit text="QQ号码/手机/邮箱" float="true" pos="118,12,0,0" width="194" height="30" bkcolor="#FFFFFFFF" textpadding="4,3,4,3" textcolor="#00656565" disabledtextcolor="#FFA7A6AA" normalimage="edit_frame_normal_reversed.png" hotimage="edit_frame_hover_reversed.png" />
<Edit text="密码" tooltip="密码" float="true" pos="118,42,0,0" width="194" height="30" bkimage="edit_frame_normal.png" bkcolor="#FFFFFFFF" textpadding="4,3,4,3" textcolor="#00656565" disabledtextcolor="#FFA7A6AA" normalimage="edit_frame_normal.png" hotimage="edit_frame_hover.png" />
<Button float="true" pos="318,10,0,0" width="73" height="29" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="register_normal.png" hotimage="register_hover.png" pushedimage="register_press.png" />
<Button float="true" pos="318,42,0,0" width="73" height="29" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="findpwd_normal.png.png" hotimage="findpwd_hover.png" pushedimage="findpwd_press.png" />
<Option text="记住密码" float="true" pos="118,77,0,0" width="105" height="16" textcolor="#00656565" disabledtextcolor="#FFA7A6AA" align="center" normalimage="file='checkbox_normal.png' dest='0,0,17,17' source='0,0,17,17'" hotimage="file='checkbox_hightlight.png' dest='0,0,17,17' source='0,0,17,17'" pushedimage="file='checkbox_pushed.png' dest='0,0,17,17' source='0,0,17,17'" selectedimage="file='checkbox_tick_normal1.png' dest='0,0,17,17' source='0,0,17,17'" />
<Option text="自动登录" float="true" pos="242,77,0,0" width="94" height="16" textcolor="#00656565" disabledtextcolor="#FFA7A6AA" align="center" normalimage="file='checkbox_normal.png' dest='0,0,17,17' source='0,0,17,17'" hotimage="file='checkbox_hightlight.png' dest='0,0,17,17' source='0,0,17,17'" pushedimage="file='checkbox_pushed.png' dest='0,0,17,17' source='0,0,17,17'" selectedimage="file='checkbox_tick_normal1.png' dest='0,0,17,17' source='0,0,17,17'" />
<Label float="true" pos="26,9,0,0" width="82" height="82" bkimage="logo.png" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" />
<Button float="true" pos="90,74,0,0" width="16" height="16" bkimage="success_icon.png" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" />
<Button float="true" pos="291,47,0,0" width="15" height="16" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="keyboard_normal.png" hotimage="keyboard_hover.png" pushedimage="keyboard_down.png" />
<Button float="true" pos="287,18,0,0" width="20" height="20" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="list_down_normal.png" hotimage="list_down_hot.png" />
</HorizontalLayout>
<HorizontalLayout>
<Button text="登录" float="true" pos="118,13,0,0" width="194" height="30" textcolor="#00FEFEFE" disabledtextcolor="#FFA7A6AA" align="center" normalimage="button_login_normal.png" hotimage="button_login_hover.png" pushedimage="button_login_down.png" />
<Button float="true" pos="20,19,0,0" width="24" height="24" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="switch_single_normal.png" hotimage="switch_single_hover.png" pushedimage="switch_single_down.png" />
<Button float="true" pos="385,19,0,0" width="24" height="24" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="corner_right_normal_breath.png" hotimage="corner_right_hover.png" pushedimage="corner_right_normal_down.png" />
</HorizontalLayout>
</VerticalLayout>
</VerticalLayout>
</Window>