plus美化按钮配色方案

xianzhi0520 6月前 941

//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);


最新回复 (19)
  • tanzh 6月前
    0 2
    不错不错
  • 小光芒 6月前
    0 3
    看起来真的不错
  • cyzn_lfss 6月前
    0 4
    感谢感谢!
  • Viewer8122 6月前
    0 5
    很好看,谢谢分享~!
  • lcj21 6月前
    0 6
    这个不错,很好看,感谢分享!
  • xianzhi0520 6月前
    0 7
    !!!!主窗口导入以后global.style = style 然后其他窗口直接..style调用 使用样式的语句最好放在winform.show()之前 避免其他的影响(已经踩过坑)
  • mannixpi 6月前
    0 8
    此楼层已删除
  • xianzhi0520 5月前
    0 9
    其实,目前再没有好用的自绘控件库的情况下,用plus的配色可以模拟按钮类型的已经足够了 还是希望@光庆 大佬封装一下exdui4.1的dll 做一些组件像E里面那种方式调用 var button = exdui.buttonEx; var OnButtonClick = function(){ } button.create(winform.hwnd,'标题'u,0,0,300,200,80,30,OnButtonClick) 类似这样的
  • 光庆 5月前
    0 10

    exdui 封装工作量应该不小,暂时不敢接这个活。

  • xianzhi0520 5月前
    0 11
    光庆 exdui 封装工作量应该不小,暂时不敢接这个活。
    没有啦 我是不会封装 不然 我就自己搞了 目前已经可以调用创建窗口和按钮 编辑框 static这样的内置组件 事件挂接都可以 信息框也可以调用了
  • xianzhi0520 5月前
    0 12
    光庆 exdui 封装工作量应该不小,暂时不敢接这个活。
    出了基本组件内置 其他的 就是画扩展组件 找个易语言模块源码 里面的组件怎么画的 照搬过来 就可以了 就是不知道常用的CopyMemery在aardio里面怎么表达
  • 光庆 5月前
    0 13
    xianzhi0520 出了基本组件内置 其他的 就是画扩展组件 找个易语言模块源码 里面的组件怎么画的 照搬过来 就可以了 就是不知道常用的CopyMemery在aardio里面怎么表达
    raw.copy raw.convert
  • xianzhi0520 5月前
    3 14
    光庆 raw.copy raw.convert
    ok 基类已经封装完了,正在封装内置组件,内置组件完了就是扩展自绘组件,回头发上来 大家一起扩展
  • aardio 5月前
    0 15
    xianzhi0520 ok 基类已经封装完了,正在封装内置组件,内置组件完了就是扩展自绘组件,回头发上来 大家一起扩展
    赞赞赞
  • xianzhi0520 5月前
    0 16
    此楼层已删除
  • orti 5月前
    0 17
    楼主加油
  • 风行者 5月前
    0 18
    加油
  • 小光芒 5月前
    0 19
    加油
  • breezee 2月前
    0 20
    加油!
返回
发新帖
作者最近主题: