mirror of https://github.com/buggins/dlangui.git
fix styles of popup window and file dialog places list
This commit is contained in:
parent
7e4f4ff019
commit
1554e52783
|
@ -242,6 +242,7 @@ class FileDialog : Dialog, CustomGridCellAdapter {
|
||||||
res.layoutWidth(WRAP_CONTENT).layoutHeight(FILL_PARENT).layoutWeight(0);
|
res.layoutWidth(WRAP_CONTENT).layoutHeight(FILL_PARENT).layoutWeight(0);
|
||||||
res.onItemClickListener = delegate(Widget source, int itemIndex) {
|
res.onItemClickListener = delegate(Widget source, int itemIndex) {
|
||||||
openDirectory(_roots[itemIndex].path, null);
|
openDirectory(_roots[itemIndex].path, null);
|
||||||
|
res.selectItem(-1);
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
res.focusable = true;
|
res.focusable = true;
|
||||||
|
|
|
@ -690,13 +690,17 @@ class Window {
|
||||||
bool insideOneOfPopups = false;
|
bool insideOneOfPopups = false;
|
||||||
for (int i = cast(int)_popups.length - 1; i >= 0; i--) {
|
for (int i = cast(int)_popups.length - 1; i >= 0; i--) {
|
||||||
auto p = _popups[i];
|
auto p = _popups[i];
|
||||||
if (p.isPointInside(event.x, event.y))
|
if (p.isPointInside(event.x, event.y)) {
|
||||||
insideOneOfPopups = true;
|
if (p !is modal)
|
||||||
|
insideOneOfPopups = true;
|
||||||
|
}
|
||||||
if (p is modal)
|
if (p is modal)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (int i = cast(int)_popups.length - 1; i >= 0; i--) {
|
for (int i = cast(int)_popups.length - 1; i >= 0; i--) {
|
||||||
auto p = _popups[i];
|
auto p = _popups[i];
|
||||||
|
if (p is modal)
|
||||||
|
break;
|
||||||
if (!insideOneOfPopups) {
|
if (!insideOneOfPopups) {
|
||||||
if (p.onMouseEventOutside(event)) // stop loop when true is returned, but allow other main widget to handle event
|
if (p.onMouseEventOutside(event)) // stop loop when true is returned, but allow other main widget to handle event
|
||||||
break;
|
break;
|
||||||
|
@ -704,11 +708,11 @@ class Window {
|
||||||
if (dispatchMouseEvent(p, event, cursorIsSet))
|
if (dispatchMouseEvent(p, event, cursorIsSet))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (p is modal)
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
if (!modal)
|
if (!modal)
|
||||||
res = dispatchMouseEvent(_mainWidget, event, cursorIsSet);
|
res = dispatchMouseEvent(_mainWidget, event, cursorIsSet);
|
||||||
|
else
|
||||||
|
res = dispatchMouseEvent(modal, event, cursorIsSet);
|
||||||
}
|
}
|
||||||
return res || processed || _mainWidget.needDraw;
|
return res || processed || _mainWidget.needDraw;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 503 B |
|
@ -194,7 +194,7 @@
|
||||||
<state state_enabled="false" textColor="#80404040"/>
|
<state state_enabled="false" textColor="#80404040"/>
|
||||||
</style>
|
</style>
|
||||||
<style id="TRANSPARENT_BUTTON_BACKGROUND"
|
<style id="TRANSPARENT_BUTTON_BACKGROUND"
|
||||||
backgroundImageId="transparent_button_background"
|
backgroundImageId="btn_background_transparent"
|
||||||
padding="4,2,4,2"
|
padding="4,2,4,2"
|
||||||
/>
|
/>
|
||||||
<style id="POPUP_MENU"
|
<style id="POPUP_MENU"
|
||||||
|
|
Loading…
Reference in New Issue