//style 外观样式
namespace style{
primaryButton = {
background={
default=0xFF8FB2B0;
hover=0xFF928BB3;
disabled=0xFFd2d2d2;
}
};
button = {
background={
default=0x668FB2B0;
hover=0xFF928BB3;
disabled=0xFFd2d2d2;
}
};
buttonLayuiDefault = {
background={
default=0xff16baaa;
hover=0xFF45C8BB;
active=0xFF45C8BB;
disabled=0xFFd2d2d2;
}
border = {
hover = {width=1;color=0x00000000;padding=10;}
active = {bottom=5;color=0xFF00FF00;padding=10;}
default = {width=1;color=0x00000000;padding=10;}
disabled= {width=2;color=0xFFd2d2d2;padding=10;}
}
color={
default=0xffFFffff;
hover=0xffFFffff;
disabled=0xFFd2d2d2;
}
iconColor = {
default =0xffFFFF45; //默认状态字体图标颜色
hover=0x00FFffff;
disabled=0xFFd2d2d2;
}
};
buttonLayuiBlue = {
background={
default=0xFF1E9FFF;
hover=0xFF59B8FF;
disabled=0xFFfbfbfb;
}
border = {
hover = {width=1;color=0x00000000;padding=10;}
active = {bottom=5;color=0xFF00FF00;padding=10;}
default = {width=1;color=0x00000000;padding=10;}
disabled= {width=2;color=0xFFd2d2d2;padding=10;}
}
color={
default=0xffFFffff;
hover=0xffFFffff;
disabled=0xFFd2d2d2;
}
iconColor = {
default =0xffFFFF45; //默认状态字体图标颜色
hover=0x00FFffff;
disabled=0xFFd2d2d2;
}
};
buttonLayuiOrange = {
background={
default=0xFFFFB800;
hover=0xFFFFCE4F;
disabled=0xFFfbfbfb;
}
border = {
hover = {width=1;color=0x00000000;padding=10;}
active = {bottom=5;color=0xFF00FF00;padding=10;}
default = {width=1;color=0x00000000;padding=10;}
disabled= {width=2;color=0xFFd2d2d2;padding=10;}
}
color={
default=0xffFFffff;
hover=0xffFFffff;
disabled=0xFFd2d2d2;
}
iconColor = {
default =0xffFFFF45; //默认状态字体图标颜色
hover=0x00FFffff;
disabled=0xFFd2d2d2;
}
};
buttonLayuiRed = {
background={
default=0xFFFF5722;
hover=0xFFFF835C;
disabled=0xFFfbfbfb;
}
border = {
hover = {width=1;color=0x00000000;padding=10;}
active = {bottom=5;color=0xFF00FF00;padding=10;}
default = {width=1;color=0x00000000;padding=10;}
disabled= {width=2;color=0xFFd2d2d2;padding=10;}
}
color={
default=0xffFFffff;
hover=0xffFFffff;
disabled=0xFFd2d2d2;
}
iconColor = {
default =0xffFFFF45; //默认状态字体图标颜色
hover=0x00FFffff;
disabled=0xFFd2d2d2;
}
};
buttonLayuiPurple = {
background={
default=0xFFA233C6;
hover=0xFFB16FC7;
disabled=0xFFfbfbfb;
}
border = {
hover = {width=1;color=0x00000000;padding=10;}
active = {bottom=5;color=0xFF00FF00;padding=10;}
default = {width=1;color=0x00000000;padding=10;}
disabled= {width=2;color=0xFFd2d2d2;padding=10;}
}
color={
default=0xffFFffff;
hover=0xffFFffff;
disabled=0xFFd2d2d2;
}
iconColor = {
default =0xffFFFF45; //默认状态字体图标颜色
hover=0x00FFffff;
disabled=0xFFd2d2d2;
}
};
//#16baaa
transButton = {
background={
default=0;
hover=0xFF928BB3;
disabled=0xFFd2d2d2;
}
};
checkBox = {
color = {
hover = 0xFFFF0000;
active = 0xFF00FF00;
}
checked = {
color = {
hover = 0xFFFF0000;
active = 0xFF00FF00;
}
text = '\uF14a'/*_FA_CHECK_SQUARE*/
}
};
radio ={
group = "PinyinMix";
color = {
hover = 0xFFFF0000;
active = 0xFF00FF00;
}
checked = {
text = '\uF058'/*_FA_CHECK_CIRCLE*/
}
};
link = {
color = {
hover = 0xFFFF0000;
active = 0xFF00FF00;
}
};
dropdown = {
foreground={
default = 0xFFFFFFFF;
hover= 0xFF8ADBAF;
};
checked = {
foreground={
default = 0xFFDB8A8E;
hover= 0xFF8ADBAF;
};
}
};
key = {
foreground={
default = 0x00FFFFFF;
hover= 0xFF8ADBAF;
};
};
}
放在项目的lib下,命名为style.aardio
//使用实例
//先导入style
import style;
//控件为plus,创建控件
winform.add(
btnAdd={cls="plus";text='\uF067 添加';left=144;top=51;right=224;bottom=81;bgcolor=11580047;dl=1;dt=0.08;font=LOGFONT(name='FontAwesome');notify=1;tabstop=1;z=4};
btnDel={cls="plus";text='\uF1F8 删除';left=317;top=51;right=397;bottom=81;bgcolor=11580047;disabled=1;dl=1;dt=0.08;font=LOGFONT(name='FontAwesome');notify=1;tabstop=1;z=6};
btnEdit={cls="plus";text='\uF044 修改';left=230;top=51;right=310;bottom=81;bgcolor=11580047;disabled=1;dl=1;dt=0.08;font=LOGFONT(name='FontAwesome');notify=1;tabstop=1;z=5};
btnExport={cls="plus";text='\uF019 导出';left=404;top=51;right=484;bottom=81;bgcolor=11580047;dl=1;dt=0.08;font=LOGFONT(name='FontAwesome');notify=1;tabstop=1;z=7};
btnRefresh={cls="plus";text='\uF0E2 刷新';left=57;top=51;right=137;bottom=81;bgcolor=11580047;dl=1;dt=0.08;font=LOGFONT(name='FontAwesome');notify=1;tabstop=1;z=3};
)
//应用配色方案
winform.btnRefresh.skin(style.buttonLayuiDefault);
winform.btnAdd.skin(style.buttonLayuiBlue);
winform.btnEdit.skin(style.buttonLayuiOrange);
winform.btnDel.skin(style.buttonLayuiRed);
winform.btnExport.skin(style.buttonLayuiPurple);