Mercurial > projects > mde
comparison mde/gui/WidgetManager.d @ 165:bb2f1a76346d
Fixed a few bugs; most notably changing the translation reloads the text on PopupMenuWidgets now.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sun, 07 Jun 2009 16:20:16 +0200 |
parents | 24d77c52243f |
children | 55667d048c31 |
comparison
equal
deleted
inserted
replaced
164:c13bded1bed3 | 165:bb2f1a76346d |
---|---|
249 position = MenuPosition.LEFT; | 249 position = MenuPosition.LEFT; |
250 } | 250 } |
251 } | 251 } |
252 } else { | 252 } else { |
253 wdim pw = parent.width; | 253 wdim pw = parent.width; |
254 if (w < pw && popup.minWidth <= pw) | 254 if (popup.minWidth <= pw) |
255 popup.setWidth (pw, -1); // neatness | 255 popup.setWidth (pw, -1); // neatness |
256 x = parent.xPos; // align on left edge | 256 x = parent.xPos; // align on left edge |
257 if (x+w > this.w) x += pw - w; // align on right edge | 257 if (x+w > this.w) x += pw - w; // align on right edge |
258 y = parent.yPos + parent.height; // place below | 258 y = parent.yPos + parent.height; // place below |
259 if (y+h > this.h) y = parent.yPos - h; // or above | 259 if (y+h > this.h) y = parent.yPos - h; // or above |