fix default theme - better TAB control; disable main menu toggle by single Alt press for non-windows
|
@ -952,18 +952,21 @@ class MainMenu : MenuWidgetBase {
|
|||
}
|
||||
}
|
||||
|
||||
if (event.action == KeyAction.KeyDown && isAlt && noOtherModifiers) {
|
||||
_menuToggleState = 1;
|
||||
} else if (event.action == KeyAction.KeyUp && isAlt && noOtherModifiers) {
|
||||
if (_menuToggleState == 1)
|
||||
toggleMenu = true;
|
||||
_menuToggleState = 0;
|
||||
} else {
|
||||
_menuToggleState = 0;
|
||||
}
|
||||
if (toggleMenu) {
|
||||
toggle();
|
||||
return true;
|
||||
// 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) {
|
||||
if (_menuToggleState == 1)
|
||||
toggleMenu = true;
|
||||
_menuToggleState = 0;
|
||||
} else {
|
||||
_menuToggleState = 0;
|
||||
}
|
||||
if (toggleMenu) {
|
||||
toggle();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (!focused)
|
||||
return false;
|
||||
|
|
|
@ -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>
|
||||
|
|
Before Width: | Height: | Size: 266 B After Width: | Height: | Size: 472 B |
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 471 B |
Before Width: | Height: | Size: 263 B After Width: | Height: | 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"
|
||||
|
|