linux build fixes

This commit is contained in:
Vadim Lopatin 2014-04-15 14:34:14 +04:00
parent f35b63ef95
commit 4ddccd9f6a
5 changed files with 383 additions and 377 deletions

View File

@ -179,6 +179,7 @@
<Compile Include="src\dlangui\widgets\tabs.d" />
<Compile Include="src\dlangui\graphics\resources.d" />
<Compile Include="src\dlangui\widgets\menu.d" />
<Compile Include="src\dlangui\widgets\popup.d" />
</ItemGroup>
<ItemGroup>
<Folder Include="src\dlangui\platforms\x11\" />

View File

@ -220,7 +220,7 @@ class Window {
private bool checkRemoveTracking(MouseEvent event) {
import std.algorithm;
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];
if (!isChild(w)) {
// std.algorithm.remove does not work for me

View File

@ -123,6 +123,11 @@ class MenuWidgetBase : ListWidget {
/// override to handle change of selection
override protected void selectionChanged(int index, int previouslySelectedItem = -1) {
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.item.isSubmenu()) {
if (_selectOnHover) {