diff --git a/src/dlangui/dialogs/msgbox.d b/src/dlangui/dialogs/msgbox.d index a6563082..fd4c11c0 100644 --- a/src/dlangui/dialogs/msgbox.d +++ b/src/dlangui/dialogs/msgbox.d @@ -56,7 +56,6 @@ class MessageBox : Dialog { /// override to implement creation of dialog controls override void init() { TextWidget msg = new TextWidget("msg", _message); - backgroundColor(0xE0E0E0); padding(Rect(10, 10, 10, 10)); msg.padding(Rect(10, 10, 10, 10)); addChild(msg); diff --git a/src/dlangui/widgets/editors.d b/src/dlangui/widgets/editors.d index d81eaeb8..83103518 100644 --- a/src/dlangui/widgets/editors.d +++ b/src/dlangui/widgets/editors.d @@ -471,7 +471,7 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction /// returns mouse cursor type for widget override uint getCursorType(int x, int y) { - return CursorType.IBeam; + return x < _pos.left + _leftPaneWidth ? CursorType.Arrow : CursorType.IBeam; } diff --git a/src/dlangui/widgets/styles.d b/src/dlangui/widgets/styles.d index a212fba1..d0246c82 100644 --- a/src/dlangui/widgets/styles.d +++ b/src/dlangui/widgets/styles.d @@ -143,6 +143,12 @@ immutable string STYLE_TAB_UP_DARK = "TAB_UP_DARK"; immutable string STYLE_TAB_UP_BUTTON_DARK = "TAB_UP_BUTTON_DARK"; /// standard style id for tab control tab button text in dock frame immutable string STYLE_TAB_UP_BUTTON_DARK_TEXT = "TAB_UP_BUTTON_DARK_TEXT"; +/// standard style id for tab control in dock frame +immutable string STYLE_TAB_DOWN_DARK = "TAB_DOWN_DARK"; +/// standard style id for tab control tab button in dock frame +immutable string STYLE_TAB_DOWN_BUTTON_DARK = "TAB_DOWN_BUTTON_DARK"; +/// standard style id for tab control tab button text in dock frame +immutable string STYLE_TAB_DOWN_BUTTON_DARK_TEXT = "TAB_DOWN_BUTTON_DARK_TEXT"; /// standard style id for tooltip popup immutable string STYLE_TOOLTIP = "TOOLTIP"; diff --git a/src/dlangui/widgets/tabs.d b/src/dlangui/widgets/tabs.d index 12071b7c..fa18fd7d 100644 --- a/src/dlangui/widgets/tabs.d +++ b/src/dlangui/widgets/tabs.d @@ -231,13 +231,18 @@ class TabControl : WidgetGroupDefaultDrawing { /// signal on tab close button Signal!TabCloseHandler onTabCloseListener; + protected Align _tabAlignment; + @property Align tabAlignment() { return _tabAlignment; } + @property void tabAlignment(Align a) { _tabAlignment = a; } + /// empty parameter list constructor - for usage by factory this() { this(null); } /// create with ID parameter - this(string ID) { + this(string ID, Align tabAlignment = Align.Top) { super(ID); + _tabAlignment = tabAlignment; setStyles(STYLE_TAB_UP, STYLE_TAB_UP_BUTTON, STYLE_TAB_UP_BUTTON_TEXT); _items = new TabItemList(); _moreButton = new ImageButton("MORE", "tab_more"); @@ -628,15 +633,20 @@ class TabWidget : VerticalLayout, TabHandler, TabCloseHandler { this(null); } /// create with ID parameter - this(string ID) { + this(string ID, Align tabAlignment = Align.Top) { super(ID); - _tabControl = new TabControl("TAB_CONTROL"); + _tabControl = new TabControl("TAB_CONTROL", tabAlignment); _tabHost = new TabHost("TAB_HOST", _tabControl); _tabControl.onTabChangedListener.connect(this); _tabControl.onTabCloseListener.connect(this); styleId = STYLE_TAB_WIDGET; - addChild(_tabControl); - addChild(_tabHost); + if (tabAlignment == Align.Top) { + addChild(_tabControl); + addChild(_tabHost); + } else { + addChild(_tabHost); + addChild(_tabControl); + } focusGroup = true; } diff --git a/views/res/mdpi/tab_btn_dark_down_focused.9.png b/views/res/mdpi/tab_btn_dark_down_focused.9.png new file mode 100644 index 00000000..0ea1b0f9 Binary files /dev/null and b/views/res/mdpi/tab_btn_dark_down_focused.9.png differ diff --git a/views/res/mdpi/tab_btn_dark_down_focused_dark.9.png b/views/res/mdpi/tab_btn_dark_down_focused_dark.9.png new file mode 100644 index 00000000..81af9e1b Binary files /dev/null and b/views/res/mdpi/tab_btn_dark_down_focused_dark.9.png differ diff --git a/views/res/mdpi/tab_btn_dark_down_focused_selected.9.png b/views/res/mdpi/tab_btn_dark_down_focused_selected.9.png new file mode 100644 index 00000000..8fd60b3d Binary files /dev/null and b/views/res/mdpi/tab_btn_dark_down_focused_selected.9.png differ diff --git a/views/res/mdpi/tab_btn_dark_down_focused_selected_dark.9.png b/views/res/mdpi/tab_btn_dark_down_focused_selected_dark.9.png new file mode 100644 index 00000000..dbdea765 Binary files /dev/null and b/views/res/mdpi/tab_btn_dark_down_focused_selected_dark.9.png differ diff --git a/views/res/mdpi/tab_btn_dark_down_hover.9.png b/views/res/mdpi/tab_btn_dark_down_hover.9.png new file mode 100644 index 00000000..65a3dbac Binary files /dev/null and b/views/res/mdpi/tab_btn_dark_down_hover.9.png differ diff --git a/views/res/mdpi/tab_btn_dark_down_hover_dark.9.png b/views/res/mdpi/tab_btn_dark_down_hover_dark.9.png new file mode 100644 index 00000000..881958d2 Binary files /dev/null and b/views/res/mdpi/tab_btn_dark_down_hover_dark.9.png differ diff --git a/views/res/mdpi/tab_btn_dark_down_normal.9.png b/views/res/mdpi/tab_btn_dark_down_normal.9.png new file mode 100644 index 00000000..c30090b6 Binary files /dev/null and b/views/res/mdpi/tab_btn_dark_down_normal.9.png differ diff --git a/views/res/mdpi/tab_btn_dark_down_normal_dark.9.png b/views/res/mdpi/tab_btn_dark_down_normal_dark.9.png new file mode 100644 index 00000000..b62d21b6 Binary files /dev/null and b/views/res/mdpi/tab_btn_dark_down_normal_dark.9.png differ diff --git a/views/res/mdpi/tab_btn_dark_down_selected.9.png b/views/res/mdpi/tab_btn_dark_down_selected.9.png new file mode 100644 index 00000000..d5ae72ec Binary files /dev/null and b/views/res/mdpi/tab_btn_dark_down_selected.9.png differ diff --git a/views/res/mdpi/tab_btn_dark_down_selected_dark.9.png b/views/res/mdpi/tab_btn_dark_down_selected_dark.9.png new file mode 100644 index 00000000..bd1c8a61 Binary files /dev/null and b/views/res/mdpi/tab_btn_dark_down_selected_dark.9.png differ diff --git a/views/res/mdpi/tab_down_background_dark_focused.9.png b/views/res/mdpi/tab_down_background_dark_focused.9.png new file mode 100644 index 00000000..3a4f62bd Binary files /dev/null and b/views/res/mdpi/tab_down_background_dark_focused.9.png differ diff --git a/views/res/mdpi/tab_down_background_dark_focused_dark.9.png b/views/res/mdpi/tab_down_background_dark_focused_dark.9.png new file mode 100644 index 00000000..53533f2b Binary files /dev/null and b/views/res/mdpi/tab_down_background_dark_focused_dark.9.png differ diff --git a/views/res/mdpi/tab_down_background_dark_normal.9.png b/views/res/mdpi/tab_down_background_dark_normal.9.png new file mode 100644 index 00000000..f5367db8 Binary files /dev/null and b/views/res/mdpi/tab_down_background_dark_normal.9.png differ diff --git a/views/res/mdpi/tab_down_background_dark_normal_dark.9.png b/views/res/mdpi/tab_down_background_dark_normal_dark.9.png new file mode 100644 index 00000000..d9cb44c2 Binary files /dev/null and b/views/res/mdpi/tab_down_background_dark_normal_dark.9.png differ diff --git a/views/res/tab_btn_dark_down.xml b/views/res/tab_btn_dark_down.xml new file mode 100644 index 00000000..666103a6 --- /dev/null +++ b/views/res/tab_btn_dark_down.xml @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/views/res/tab_btn_dark_down_dark.xml b/views/res/tab_btn_dark_down_dark.xml new file mode 100644 index 00000000..22f7f9be --- /dev/null +++ b/views/res/tab_btn_dark_down_dark.xml @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/views/res/tab_down_background_dark.xml b/views/res/tab_down_background_dark.xml new file mode 100644 index 00000000..0412fb26 --- /dev/null +++ b/views/res/tab_down_background_dark.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/views/res/tab_down_background_theme_dark.xml b/views/res/tab_down_background_theme_dark.xml new file mode 100644 index 00000000..825a1cf4 --- /dev/null +++ b/views/res/tab_down_background_theme_dark.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/views/res/theme_dark.xml b/views/res/theme_dark.xml index 137ddc2a..27337e30 100644 --- a/views/res/theme_dark.xml +++ b/views/res/theme_dark.xml @@ -147,6 +147,15 @@ + + + +