fix styles of popup window and file dialog places list

This commit is contained in:
Vadim Lopatin 2015-01-27 16:46:48 +03:00
parent 7e4f4ff019
commit 1554e52783
4 changed files with 10 additions and 5 deletions

View File

@ -242,6 +242,7 @@ class FileDialog : Dialog, CustomGridCellAdapter {
res.layoutWidth(WRAP_CONTENT).layoutHeight(FILL_PARENT).layoutWeight(0);
res.onItemClickListener = delegate(Widget source, int itemIndex) {
openDirectory(_roots[itemIndex].path, null);
res.selectItem(-1);
return true;
};
res.focusable = true;

View File

@ -690,13 +690,17 @@ class Window {
bool insideOneOfPopups = false;
for (int i = cast(int)_popups.length - 1; i >= 0; i--) {
auto p = _popups[i];
if (p.isPointInside(event.x, event.y))
insideOneOfPopups = true;
if (p.isPointInside(event.x, event.y)) {
if (p !is modal)
insideOneOfPopups = true;
}
if (p is modal)
break;
}
for (int i = cast(int)_popups.length - 1; i >= 0; i--) {
auto p = _popups[i];
if (p is modal)
break;
if (!insideOneOfPopups) {
if (p.onMouseEventOutside(event)) // stop loop when true is returned, but allow other main widget to handle event
break;
@ -704,11 +708,11 @@ class Window {
if (dispatchMouseEvent(p, event, cursorIsSet))
return true;
}
if (p is modal)
break;
}
if (!modal)
res = dispatchMouseEvent(_mainWidget, event, cursorIsSet);
else
res = dispatchMouseEvent(modal, event, cursorIsSet);
}
return res || processed || _mainWidget.needDraw;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 B

After

Width:  |  Height:  |  Size: 503 B

View File

@ -194,7 +194,7 @@
<state state_enabled="false" textColor="#80404040"/>
</style>
<style id="TRANSPARENT_BUTTON_BACKGROUND"
backgroundImageId="transparent_button_background"
backgroundImageId="btn_background_transparent"
padding="4,2,4,2"
/>
<style id="POPUP_MENU"