mirror of https://github.com/buggins/dlangui.git
fix default theme - better TAB control; disable main menu toggle by single Alt press for non-windows
This commit is contained in:
parent
a210978161
commit
2c909b2c83
|
@ -952,6 +952,8 @@ class MainMenu : MenuWidgetBase {
|
|||
}
|
||||
}
|
||||
|
||||
// toggle menu by single Alt press - for Windows only!
|
||||
version (Windows) {
|
||||
if (event.action == KeyAction.KeyDown && isAlt && noOtherModifiers) {
|
||||
_menuToggleState = 1;
|
||||
} else if (event.action == KeyAction.KeyUp && isAlt && noOtherModifiers) {
|
||||
|
@ -965,6 +967,7 @@ class MainMenu : MenuWidgetBase {
|
|||
toggle();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (!focused)
|
||||
return false;
|
||||
if (_selectedItemIndex >= 0 && event.action == KeyAction.KeyDown && ((event.keyCode == KeyCode.DOWN) || (event.keyCode == KeyCode.SPACE) || (event.keyCode == KeyCode.RETURN))) {
|
||||
|
|
|
@ -126,6 +126,10 @@ class TabItemWidget : HorizontalLayout {
|
|||
styleId = tabButtonStyle;
|
||||
_label.styleId = tabButtonTextStyle;
|
||||
}
|
||||
override void onDraw(DrawBuf buf) {
|
||||
//debug Log.d("TabWidget.onDraw ", id);
|
||||
super.onDraw(buf);
|
||||
}
|
||||
protected bool onClick(Widget source) {
|
||||
if (source.compareId("CLOSE")) {
|
||||
Log.d("tab close button pressed");
|
||||
|
@ -522,6 +526,7 @@ class TabControl : WidgetGroupDefaultDrawing {
|
|||
override void onDraw(DrawBuf buf) {
|
||||
if (visibility != Visibility.Visible)
|
||||
return;
|
||||
//debug Log.d("TabControl.onDraw enter");
|
||||
super.Widget.onDraw(buf);
|
||||
Rect rc = _pos;
|
||||
applyMargins(rc);
|
||||
|
@ -545,6 +550,7 @@ class TabControl : WidgetGroupDefaultDrawing {
|
|||
continue;
|
||||
item.onDraw(buf);
|
||||
}
|
||||
//debug Log.d("TabControl.onDraw exit");
|
||||
}
|
||||
|
||||
protected string _selectedTabId;
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
android:constantSize="true"
|
||||
android:dither="false"
|
||||
android:variablePadding="false" >
|
||||
<item
|
||||
android:drawable="tab_btn_up_hover"
|
||||
android:state_hovered="true" />
|
||||
<item
|
||||
android:drawable="tab_btn_up_selected"
|
||||
android:state_selected="true" />
|
||||
<item
|
||||
android:drawable="tab_btn_up_hover"
|
||||
android:state_hovered="true" />
|
||||
<item
|
||||
android:drawable="tab_btn_up_normal" />
|
||||
</selector>
|
||||
|
|
Binary file not shown.
Before ![]() (image error) Size: 266 B After ![]() (image error) Size: 472 B ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 286 B After ![]() (image error) Size: 483 B ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 267 B After ![]() (image error) Size: 471 B ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 263 B After ![]() (image error) Size: 238 B ![]() ![]() |
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<theme id="theme_default"
|
||||
fontSize="10pt"
|
||||
fontSize="11pt"
|
||||
fontFace="Helvetica Neue,Verdana,Arial,DejaVu Sans,Liberation Sans,Helvetica,Roboto,Droid Sans"
|
||||
fontFamily="SansSerif"
|
||||
>
|
||||
|
@ -202,7 +202,7 @@
|
|||
<state state_selected="true" state_focused="true" textColor="#000000"/>
|
||||
<state state_selected="true" textColor="#000000"/>
|
||||
<state state_focused="true" textColor="#000000"/>
|
||||
<state state_hovered="true" textColor="#808000"/>
|
||||
<state state_hovered="true" textColor="#0000C0"/>
|
||||
</style>
|
||||
<style id="TAB_UP_BUTTON"
|
||||
backgroundImageId="tab_btn_up"
|
||||
|
|
Loading…
Reference in New Issue