support tab control placement at bottom
|
@ -56,7 +56,6 @@ class MessageBox : Dialog {
|
||||||
/// override to implement creation of dialog controls
|
/// override to implement creation of dialog controls
|
||||||
override void init() {
|
override void init() {
|
||||||
TextWidget msg = new TextWidget("msg", _message);
|
TextWidget msg = new TextWidget("msg", _message);
|
||||||
backgroundColor(0xE0E0E0);
|
|
||||||
padding(Rect(10, 10, 10, 10));
|
padding(Rect(10, 10, 10, 10));
|
||||||
msg.padding(Rect(10, 10, 10, 10));
|
msg.padding(Rect(10, 10, 10, 10));
|
||||||
addChild(msg);
|
addChild(msg);
|
||||||
|
|
|
@ -471,7 +471,7 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
|
||||||
|
|
||||||
/// returns mouse cursor type for widget
|
/// returns mouse cursor type for widget
|
||||||
override uint getCursorType(int x, int y) {
|
override uint getCursorType(int x, int y) {
|
||||||
return CursorType.IBeam;
|
return x < _pos.left + _leftPaneWidth ? CursorType.Arrow : CursorType.IBeam;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -143,6 +143,12 @@ immutable string STYLE_TAB_UP_DARK = "TAB_UP_DARK";
|
||||||
immutable string STYLE_TAB_UP_BUTTON_DARK = "TAB_UP_BUTTON_DARK";
|
immutable string STYLE_TAB_UP_BUTTON_DARK = "TAB_UP_BUTTON_DARK";
|
||||||
/// standard style id for tab control tab button text in dock frame
|
/// 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";
|
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
|
/// standard style id for tooltip popup
|
||||||
immutable string STYLE_TOOLTIP = "TOOLTIP";
|
immutable string STYLE_TOOLTIP = "TOOLTIP";
|
||||||
|
|
|
@ -231,13 +231,18 @@ class TabControl : WidgetGroupDefaultDrawing {
|
||||||
/// signal on tab close button
|
/// signal on tab close button
|
||||||
Signal!TabCloseHandler onTabCloseListener;
|
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
|
/// empty parameter list constructor - for usage by factory
|
||||||
this() {
|
this() {
|
||||||
this(null);
|
this(null);
|
||||||
}
|
}
|
||||||
/// create with ID parameter
|
/// create with ID parameter
|
||||||
this(string ID) {
|
this(string ID, Align tabAlignment = Align.Top) {
|
||||||
super(ID);
|
super(ID);
|
||||||
|
_tabAlignment = tabAlignment;
|
||||||
setStyles(STYLE_TAB_UP, STYLE_TAB_UP_BUTTON, STYLE_TAB_UP_BUTTON_TEXT);
|
setStyles(STYLE_TAB_UP, STYLE_TAB_UP_BUTTON, STYLE_TAB_UP_BUTTON_TEXT);
|
||||||
_items = new TabItemList();
|
_items = new TabItemList();
|
||||||
_moreButton = new ImageButton("MORE", "tab_more");
|
_moreButton = new ImageButton("MORE", "tab_more");
|
||||||
|
@ -628,15 +633,20 @@ class TabWidget : VerticalLayout, TabHandler, TabCloseHandler {
|
||||||
this(null);
|
this(null);
|
||||||
}
|
}
|
||||||
/// create with ID parameter
|
/// create with ID parameter
|
||||||
this(string ID) {
|
this(string ID, Align tabAlignment = Align.Top) {
|
||||||
super(ID);
|
super(ID);
|
||||||
_tabControl = new TabControl("TAB_CONTROL");
|
_tabControl = new TabControl("TAB_CONTROL", tabAlignment);
|
||||||
_tabHost = new TabHost("TAB_HOST", _tabControl);
|
_tabHost = new TabHost("TAB_HOST", _tabControl);
|
||||||
_tabControl.onTabChangedListener.connect(this);
|
_tabControl.onTabChangedListener.connect(this);
|
||||||
_tabControl.onTabCloseListener.connect(this);
|
_tabControl.onTabCloseListener.connect(this);
|
||||||
styleId = STYLE_TAB_WIDGET;
|
styleId = STYLE_TAB_WIDGET;
|
||||||
addChild(_tabControl);
|
if (tabAlignment == Align.Top) {
|
||||||
addChild(_tabHost);
|
addChild(_tabControl);
|
||||||
|
addChild(_tabHost);
|
||||||
|
} else {
|
||||||
|
addChild(_tabHost);
|
||||||
|
addChild(_tabControl);
|
||||||
|
}
|
||||||
focusGroup = true;
|
focusGroup = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
After Width: | Height: | Size: 195 B |
After Width: | Height: | Size: 214 B |
After Width: | Height: | Size: 188 B |
After Width: | Height: | Size: 196 B |
After Width: | Height: | Size: 195 B |
After Width: | Height: | Size: 213 B |
After Width: | Height: | Size: 195 B |
After Width: | Height: | Size: 214 B |
After Width: | Height: | Size: 194 B |
After Width: | Height: | Size: 214 B |
After Width: | Height: | Size: 195 B |
After Width: | Height: | Size: 201 B |
After Width: | Height: | Size: 193 B |
After Width: | Height: | Size: 193 B |
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item
|
||||||
|
android:drawable="tab_btn_dark_down_focused_selected"
|
||||||
|
android:state_selected="true" android:state_window_focused="true" />
|
||||||
|
<item
|
||||||
|
android:drawable="tab_btn_dark_down_focused"
|
||||||
|
android:state_window_focused="true" />
|
||||||
|
<item
|
||||||
|
android:drawable="tab_btn_dark_down_selected"
|
||||||
|
android:state_selected="true" />
|
||||||
|
<item
|
||||||
|
android:drawable="tab_btn_dark_down_hover"
|
||||||
|
android:state_hovered="true" />
|
||||||
|
<item
|
||||||
|
android:drawable="tab_btn_dark_down_normal" />
|
||||||
|
</selector>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item
|
||||||
|
android:drawable="tab_btn_dark_down_focused_selected_dark"
|
||||||
|
android:state_selected="true" android:state_window_focused="true" />
|
||||||
|
<item
|
||||||
|
android:drawable="tab_btn_dark_down_focused_dark"
|
||||||
|
android:state_window_focused="true" />
|
||||||
|
<item
|
||||||
|
android:drawable="tab_btn_dark_down_selected_dark"
|
||||||
|
android:state_selected="true" />
|
||||||
|
<item
|
||||||
|
android:drawable="tab_btn_dark_down_hover_dark"
|
||||||
|
android:state_hovered="true" />
|
||||||
|
<item
|
||||||
|
android:drawable="tab_btn_dark_down_normal_dark" />
|
||||||
|
</selector>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item
|
||||||
|
android:drawable="tab_down_background_dark_focused"
|
||||||
|
android:state_window_focused="true" />
|
||||||
|
<item
|
||||||
|
android:drawable="tab_down_background_dark_normal" />
|
||||||
|
</selector>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item
|
||||||
|
android:drawable="tab_down_background_dark_focused_dark"
|
||||||
|
android:state_window_focused="true" />
|
||||||
|
<item
|
||||||
|
android:drawable="tab_down_background_dark_normal_dark" />
|
||||||
|
</selector>
|
|
@ -147,6 +147,15 @@
|
||||||
<state state_hovered="true" backgroundColor="#F0404080"/>
|
<state state_hovered="true" backgroundColor="#F0404080"/>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style id="TAB_DOWN_DARK"
|
||||||
|
backgroundImageId="tab_down_background_theme_dark"
|
||||||
|
layoutWidth="FILL_PARENT"
|
||||||
|
>
|
||||||
|
</style>
|
||||||
|
<style id="TAB_DOWN_BUTTON_DARK"
|
||||||
|
padding="5,1,1,1"
|
||||||
|
backgroundImageId="tab_btn_dark_down_dark"
|
||||||
|
/>
|
||||||
<style id="TAB_UP_DARK"
|
<style id="TAB_UP_DARK"
|
||||||
backgroundImageId="tab_up_background_theme_dark"
|
backgroundImageId="tab_up_background_theme_dark"
|
||||||
layoutWidth="FILL_PARENT"
|
layoutWidth="FILL_PARENT"
|
||||||
|
|
|
@ -137,6 +137,15 @@
|
||||||
<state state_hovered="true" backgroundColor="#F0404080"/>
|
<state state_hovered="true" backgroundColor="#F0404080"/>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style id="TAB_DOWN_DARK"
|
||||||
|
backgroundImageId="tab_down_background_dark"
|
||||||
|
layoutWidth="FILL_PARENT"
|
||||||
|
>
|
||||||
|
</style>
|
||||||
|
<style id="TAB_DOWN_BUTTON_DARK"
|
||||||
|
padding="5,1,1,1"
|
||||||
|
backgroundImageId="tab_btn_dark_down"
|
||||||
|
/>
|
||||||
<style id="TAB_UP_DARK"
|
<style id="TAB_UP_DARK"
|
||||||
backgroundImageId="tab_up_background_dark"
|
backgroundImageId="tab_up_background_dark"
|
||||||
layoutWidth="FILL_PARENT"
|
layoutWidth="FILL_PARENT"
|
||||||
|
|
|
@ -122,6 +122,16 @@ res/mdpi/folder.png
|
||||||
res/mdpi/media-flash-sd-mmc.png
|
res/mdpi/media-flash-sd-mmc.png
|
||||||
res/mdpi/popup_window_background.9.png
|
res/mdpi/popup_window_background.9.png
|
||||||
res/mdpi/popup_window_background_dark.9.png
|
res/mdpi/popup_window_background_dark.9.png
|
||||||
|
res/mdpi/tab_btn_dark_down_focused.9.png
|
||||||
|
res/mdpi/tab_btn_dark_down_focused_dark.9.png
|
||||||
|
res/mdpi/tab_btn_dark_down_focused_selected.9.png
|
||||||
|
res/mdpi/tab_btn_dark_down_focused_selected_dark.9.png
|
||||||
|
res/mdpi/tab_btn_dark_down_hover.9.png
|
||||||
|
res/mdpi/tab_btn_dark_down_hover_dark.9.png
|
||||||
|
res/mdpi/tab_btn_dark_down_normal.9.png
|
||||||
|
res/mdpi/tab_btn_dark_down_normal_dark.9.png
|
||||||
|
res/mdpi/tab_btn_dark_down_selected.9.png
|
||||||
|
res/mdpi/tab_btn_dark_down_selected_dark.9.png
|
||||||
res/mdpi/tab_btn_dark_up_focused.9.png
|
res/mdpi/tab_btn_dark_up_focused.9.png
|
||||||
res/mdpi/tab_btn_dark_up_focused_dark.9.png
|
res/mdpi/tab_btn_dark_up_focused_dark.9.png
|
||||||
res/mdpi/tab_btn_dark_up_focused_selected.9.png
|
res/mdpi/tab_btn_dark_up_focused_selected.9.png
|
||||||
|
@ -132,6 +142,10 @@ res/mdpi/tab_btn_dark_up_normal.9.png
|
||||||
res/mdpi/tab_btn_dark_up_normal_dark.9.png
|
res/mdpi/tab_btn_dark_up_normal_dark.9.png
|
||||||
res/mdpi/tab_btn_dark_up_selected.9.png
|
res/mdpi/tab_btn_dark_up_selected.9.png
|
||||||
res/mdpi/tab_btn_dark_up_selected_dark.9.png
|
res/mdpi/tab_btn_dark_up_selected_dark.9.png
|
||||||
|
res/mdpi/tab_down_background_dark_focused.9.png
|
||||||
|
res/mdpi/tab_down_background_dark_focused_dark.9.png
|
||||||
|
res/mdpi/tab_down_background_dark_normal.9.png
|
||||||
|
res/mdpi/tab_down_background_dark_normal_dark.9.png
|
||||||
res/mdpi/tab_up_background_dark_focused.9.png
|
res/mdpi/tab_up_background_dark_focused.9.png
|
||||||
res/mdpi/tab_up_background_dark_focused_dark.9.png
|
res/mdpi/tab_up_background_dark_focused_dark.9.png
|
||||||
res/mdpi/tab_up_background_dark_normal.9.png
|
res/mdpi/tab_up_background_dark_normal.9.png
|
||||||
|
@ -166,6 +180,8 @@ res/scrollbar_btn_up.png
|
||||||
res/scrollbar_btn_up_dark.png
|
res/scrollbar_btn_up_dark.png
|
||||||
res/scrollbar_indicator_horizontal.png
|
res/scrollbar_indicator_horizontal.png
|
||||||
res/scrollbar_indicator_vertical.png
|
res/scrollbar_indicator_vertical.png
|
||||||
|
res/tab_btn_dark_down.xml
|
||||||
|
res/tab_btn_dark_down_dark.xml
|
||||||
res/tab_btn_dark_up.xml
|
res/tab_btn_dark_up.xml
|
||||||
res/tab_btn_dark_up_dark.xml
|
res/tab_btn_dark_up_dark.xml
|
||||||
res/tab_btn_normal.9.png
|
res/tab_btn_normal.9.png
|
||||||
|
@ -183,6 +199,8 @@ res/tab_btn_up_normal_dark.9.png
|
||||||
res/tab_btn_up_selected.9.png
|
res/tab_btn_up_selected.9.png
|
||||||
res/tab_btn_up_selected_dark.9.png
|
res/tab_btn_up_selected_dark.9.png
|
||||||
res/tab_more.png
|
res/tab_more.png
|
||||||
|
res/tab_down_background_dark.xml
|
||||||
|
res/tab_down_background_theme_dark.xml
|
||||||
res/tab_up_background.9.png
|
res/tab_up_background.9.png
|
||||||
res/tab_up_background_dark.xml
|
res/tab_up_background_dark.xml
|
||||||
res/tab_up_background_focused.9.png
|
res/tab_up_background_focused.9.png
|
||||||
|
|