mirror of https://github.com/buggins/dlangui.git
linux build fixes
This commit is contained in:
parent
f35b63ef95
commit
4ddccd9f6a
|
@ -179,6 +179,7 @@
|
||||||
<Compile Include="src\dlangui\widgets\tabs.d" />
|
<Compile Include="src\dlangui\widgets\tabs.d" />
|
||||||
<Compile Include="src\dlangui\graphics\resources.d" />
|
<Compile Include="src\dlangui\graphics\resources.d" />
|
||||||
<Compile Include="src\dlangui\widgets\menu.d" />
|
<Compile Include="src\dlangui\widgets\menu.d" />
|
||||||
|
<Compile Include="src\dlangui\widgets\popup.d" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="src\dlangui\platforms\x11\" />
|
<Folder Include="src\dlangui\platforms\x11\" />
|
||||||
|
|
|
@ -220,7 +220,7 @@ class Window {
|
||||||
private bool checkRemoveTracking(MouseEvent event) {
|
private bool checkRemoveTracking(MouseEvent event) {
|
||||||
import std.algorithm;
|
import std.algorithm;
|
||||||
bool res = false;
|
bool res = false;
|
||||||
for(int i = _mouseTrackingWidgets.length - 1; i >=0; i--) {
|
for(int i = cast(int)_mouseTrackingWidgets.length - 1; i >=0; i--) {
|
||||||
Widget w = _mouseTrackingWidgets[i];
|
Widget w = _mouseTrackingWidgets[i];
|
||||||
if (!isChild(w)) {
|
if (!isChild(w)) {
|
||||||
// std.algorithm.remove does not work for me
|
// std.algorithm.remove does not work for me
|
||||||
|
|
|
@ -123,6 +123,11 @@ class MenuWidgetBase : ListWidget {
|
||||||
/// override to handle change of selection
|
/// override to handle change of selection
|
||||||
override protected void selectionChanged(int index, int previouslySelectedItem = -1) {
|
override protected void selectionChanged(int index, int previouslySelectedItem = -1) {
|
||||||
MenuItemWidget itemWidget = index >= 0 ? cast(MenuItemWidget)_adapter.itemWidget(index) : null;
|
MenuItemWidget itemWidget = index >= 0 ? cast(MenuItemWidget)_adapter.itemWidget(index) : null;
|
||||||
|
MenuItemWidget prevWidget = previouslySelectedItem >= 0 ? cast(MenuItemWidget)_adapter.itemWidget(previouslySelectedItem) : null;
|
||||||
|
if (prevWidget !is null) {
|
||||||
|
if (_openedPopup !is null)
|
||||||
|
_openedPopup.close();
|
||||||
|
}
|
||||||
if (itemWidget !is null) {
|
if (itemWidget !is null) {
|
||||||
if (itemWidget.item.isSubmenu()) {
|
if (itemWidget.item.isSubmenu()) {
|
||||||
if (_selectOnHover) {
|
if (_selectOnHover) {
|
||||||
|
|
Loading…
Reference in New Issue