I traced this through the MCL to ListHeader::setColumnWidth -> d_segments[column]->setWidth(width);. This ends up calling Window::setWidth, which in turn calls Window::setArea_impl. Inside of setArea_impl, I noticed that the window size was being capped to some minimum and maximum values defined by the Renderer. The problem is that the ListboxTextItem is inside of a scrollable area, and so it makes little sense to limit the width/height to the renderable area. For now, I simply used a preprocessor directive to exclude the maximum-size limitation.
I also tried excluding the minimum-size, but then my list items disappeared because they are apparently reliant on the minimum-size given by the renderer (which also makes little sense to me). In any case, here is the diff for my changes:
Code: Select all
diff --git a/CEGUI/src/CEGUIWindow.cpp b/CEGUI/src/CEGUIWindow.cpp
--- a/CEGUI/src/CEGUIWindow.cpp
+++ b/CEGUI/src/CEGUIWindow.cpp
@@ -2056,19 +2056,24 @@
Size oldSize(d_pixelSize);
// calculate pixel sizes for everything, so we have a common format for comparisons.
- Vector2 absMax(d_maxSize.asAbsolute(System::getSingleton().getRenderer()->getSize()));
- Vector2 absMin(d_minSize.asAbsolute(System::getSingleton().getRenderer()->getSize()));
d_pixelSize = size.asAbsolute(getParentPixelSize()).asSize();
- // limit new pixel size to: minSize <= newSize <= maxSize
+ // limit new pixel size to: minSize <= newSize
+ Vector2 absMin(d_minSize.asAbsolute(System::getSingleton().getRenderer()->getSize()));
if (d_pixelSize.d_width < absMin.d_x)
d_pixelSize.d_width = absMin.d_x;
- else if (d_pixelSize.d_width > absMax.d_x)
- d_pixelSize.d_width = absMax.d_x;
if (d_pixelSize.d_height < absMin.d_y)
d_pixelSize.d_height = absMin.d_y;
- else if (d_pixelSize.d_height > absMax.d_y)
+
+#ifdef CEGUI_LIMIT_MAX_SIZE_TO_RENDERER_SIZE
+ // limit new pixel size to: newSize <= maxSize
+ Vector2 absMax(d_maxSize.asAbsolute(System::getSingleton().getRenderer()->getSize()));
+
+ if (d_pixelSize.d_width > absMax.d_x)
+ d_pixelSize.d_width = absMax.d_x;
+ if (d_pixelSize.d_height > absMax.d_y)
d_pixelSize.d_height = absMax.d_y;
+#endif
d_area.setSize(size);
sized = (d_pixelSize != oldSize);
I am not sure if this is a sufficient fix for this issue, but I post it in case it is helpful to you; and because it highlights the problem area. Perhaps if the code requested some relevant size (System::min/max window size, or....? ) instead of the renderable area, this might make some sense.
Also, while this fixed my problem, it seems that my frame windows are still being limited to the size of the renderable-area. However, as this is not a concern to me, I did not bother looking into that. I did look at the v0.7 code base and noticed this issue seems to be present; assuming that Renderer::getDisplaySize() returns the size of the renderable area.