theme for console app

This commit is contained in:
Vadim Lopatin 2016-09-08 15:09:26 +03:00
parent bfc612fea8
commit 5c8f8b2c8a
3 changed files with 24 additions and 22 deletions

View File

@ -15,11 +15,11 @@ class ConsoleWindow : Window {
ConsolePlatform _platform; ConsolePlatform _platform;
ConsoleWindow _parent; ConsoleWindow _parent;
this(ConsolePlatform platform, dstring caption, Window parent, uint flags) { this(ConsolePlatform platform, dstring caption, Window parent, uint flags) {
super();
_platform = platform; _platform = platform;
_parent = cast(ConsoleWindow)parent; _parent = cast(ConsoleWindow)parent;
_dx = _platform.console.width; _dx = _platform.console.width;
_dy = _platform.console.height; _dy = _platform.console.height;
backgroundColor = 0x808080;
} }
/// show window /// show window
override void show() { override void show() {

View File

@ -266,7 +266,7 @@ class TabControl : WidgetGroupDefaultDrawing {
_moreButton = new ImageButton("MORE", "tab_more"); _moreButton = new ImageButton("MORE", "tab_more");
_moreButton.styleId = STYLE_BUTTON_TRANSPARENT; _moreButton.styleId = STYLE_BUTTON_TRANSPARENT;
_moreButton.mouseEvent = &onMouse; _moreButton.mouseEvent = &onMouse;
_moreButton.margins(Rect(3,3,3,6)); _moreButton.margins(Rect(0,0,0,0));
_enableCloseButton = true; _enableCloseButton = true;
styleId = _tabStyle; styleId = _tabStyle;
addChild(_moreButton); // first child is always MORE button, the rest corresponds to tab list addChild(_moreButton); // first child is always MORE button, the rest corresponds to tab list

View File

@ -43,12 +43,12 @@
<state state_enabled="false" textColor="#80000000"/> <state state_enabled="false" textColor="#80000000"/>
</style> </style>
<style id="BUTTON_TRANSPARENT" <style id="BUTTON_TRANSPARENT"
backgroundImageId="btn_background_transparent"
align="Center" align="Center"
margins="0,0,0,0"
/> />
<style id="BUTTON_CHECK_TRANSPARENT" <style id="BUTTON_CHECK_TRANSPARENT"
backgroundImageId="btn_background_check_transparent"
align="Center" align="Center"
margins="0,0,0,0"
/> />
<style id="BUTTON_LABEL" <style id="BUTTON_LABEL"
layoutWidth="FILL_PARENT" layoutWidth="FILL_PARENT"
@ -170,7 +170,7 @@
> >
</style> </style>
<style id="TAB_DOWN_BUTTON_DARK" <style id="TAB_DOWN_BUTTON_DARK"
padding="5,1,1,1" padding="1,0,1,0"
backgroundImageId="tab_btn_dark_down" backgroundImageId="tab_btn_dark_down"
/> />
<style id="TAB_UP_DARK" <style id="TAB_UP_DARK"
@ -179,7 +179,7 @@
> >
</style> </style>
<style id="TAB_UP_BUTTON_DARK" <style id="TAB_UP_BUTTON_DARK"
padding="5,1,1,1" padding="1,0,1,0"
backgroundImageId="tab_btn_dark_up" backgroundImageId="tab_btn_dark_up"
> >
<length id="overlap" value="2"/> <length id="overlap" value="2"/>
@ -191,30 +191,32 @@
<state state_selected="false" state_window_focused="false" state_hovered="false" textColor="#9c9c9c"/> <state state_selected="false" state_window_focused="false" state_hovered="false" textColor="#9c9c9c"/>
</style> </style>
<style id="TAB_UP" <style id="TAB_UP"
backgroundImageId="tab_up_background" backgroundColor="#000000"
layoutWidth="FILL_PARENT" layoutWidth="FILL_PARENT"
> >
<state state_selected="true" backgroundImageId="tab_up_backgrond_selected"/> <state state_selected="true" backgroundImageId="{' ' 0x000000 stretch}"/>
</style> </style>
<style id="TAB_UP_BUTTON_TEXT" <style id="TAB_UP_BUTTON_TEXT"
textColor="#000000" textColor="#808080"
align="Center" align="Center"
> >
<state state_selected="true" state_focused="true" textColor="#000000"/> <state state_selected="true" state_focused="true" textColor="#000000"/>
<state state_selected="true" textColor="#000000"/> <state state_selected="true" textColor="#000000"/>
<state state_focused="true" textColor="#000000"/> <state state_focused="true" textColor="#FFFFFF"/>
<state state_hovered="true" textColor="#808000"/> <state state_hovered="true" textColor="#808000"/>
</style> </style>
<style id="TAB_UP_BUTTON" <style id="TAB_UP_BUTTON"
backgroundImageId="tab_btn_up" backgroundImageId="{' ' 0x000000 stretch}"
/> >
<state state_selected="true" backgroundImageId="{' ' 0x808080 stretch}"/>
</style>
<style id="TAB_HOST" <style id="TAB_HOST"
layoutWidth="FILL_PARENT" layoutWidth="FILL_PARENT"
layoutHeight="FILL_PARENT" layoutHeight="FILL_PARENT"
backgroundColor="#F0F0F0" backgroundColor="#000000"
/> />
<style id="TAB_WIDGET" <style id="TAB_WIDGET"
backgroundColor="#EEEEEE" backgroundColor="#000000"
/> />
<style id="MAIN_MENU" <style id="MAIN_MENU"
@ -283,18 +285,18 @@
<style id="COMBO_BOX" <style id="COMBO_BOX"
backgroundImageId="combobox_background" backgroundImageId="combobox_background"
padding="2,2,2,2" padding="0,0,0,0"
margins="2,2,2,2" margins="0,0,0,0"
minWidth="40" minWidth="8"
/> />
<style id="COMBO_BOX_BODY" <style id="COMBO_BOX_BODY"
padding="2,2,2,2" padding="0,0,0,0"
minWidth="40" minWidth="8"
align="Left|VCenter" align="Left|VCenter"
focusRectColors="#000" focusRectColors="#000"
/> />
<style id="COMBO_BOX_BUTTON" <style id="COMBO_BOX_BUTTON"
padding="2,2,2,2" padding="0,0,0,0"
backgroundImageId="btn_background_transparent" backgroundImageId="btn_background_transparent"
align="Center" align="Center"
/> />
@ -329,8 +331,8 @@
backgroundImageId="editbox_background" backgroundImageId="editbox_background"
padding="0,0,0,0" padding="0,0,0,0"
margins="0,0,0,0" margins="0,0,0,0"
minWidth="100" minWidth="20"
minHeight="60" minHeight="10"
layoutWidth="FILL_PARENT" layoutWidth="FILL_PARENT"
layoutHeight="FILL_PARENT" layoutHeight="FILL_PARENT"
/> />