Mercurial > projects > mde
comparison mde/gui/widget/AParentWidget.d @ 179:1f9d00f392bd default tip
Fixed a bug where (non-resizible) widgets wouldn't get shrunk when minimal size decreases, meaning optional context menus are hiden properly now.
Optimised when ServiceContentList.opCall is called, I think without breaking anything.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Tue, 15 Sep 2009 20:09:59 +0200 |
parents | af40e9679436 |
children |
comparison
equal
deleted
inserted
replaced
178:62aa8845edd2 | 179:1f9d00f392bd |
---|---|
87 } | 87 } |
88 | 88 |
89 // Most parent widgets need to implement these, although not all | 89 // Most parent widgets need to implement these, although not all |
90 // They must at a minimum make sure widget's size is at least nmw by nmh. | 90 // They must at a minimum make sure widget's size is at least nmw by nmh. |
91 public override void minWChange (IChildWidget widget, wdim nmw) { | 91 public override void minWChange (IChildWidget widget, wdim nmw) { |
92 if (widget.width < nmw) | 92 if (!widget.isWSizable || widget.width < nmw) |
93 widget.setWidth (nmw, -1); | 93 widget.setWidth (nmw, -1); |
94 } | 94 } |
95 public override void minHChange (IChildWidget widget, wdim nmh) { | 95 public override void minHChange (IChildWidget widget, wdim nmh) { |
96 if (widget.height < nmh) | 96 if (!widget.isHSizable || widget.height < nmh) |
97 widget.setHeight (nmh, -1); | 97 widget.setHeight (nmh, -1); |
98 } | 98 } |
99 | 99 |
100 override bool isDescendant (IChildWidget widget) { | 100 override bool isDescendant (IChildWidget widget) { |
101 foreach (w; subWidgets) | 101 foreach (w; subWidgets) |