mettli / guichan

Automatically exported from code.google.com/p/guichan
Other
0 stars 0 forks source link

The dropdown of the gcn::DropDown widget is clipped by its parent #49

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Place a gcn::DropDown in a container widget (like a window)
2. Make sure the dropdown doesn't fit inside the window
3. Open the dropdown

Expected behaviour is that the complete dropdown is visible. But rather,
the dropdown is clipped by the parent of the dropdown widget (the window in
this case).

Original issue reported on code.google.com by b.lindeijer on 19 May 2008 at 4:31

GoogleCodeExporter commented 9 years ago
To solve this it seems Graphics needs the ability to discard clipping in some 
way.
Keeping the clip stack as it is, seems like a good idea as the clip stack 
contains
offset information. Perhaps we should introduce two methods to Graphics,
Graphics::discardClipping and Graphics::enableClipping. What do you think?

Original comment by olof.nae...@gmail.com on 6 Aug 2008 at 1:07

GoogleCodeExporter commented 9 years ago

Original comment by olof.nae...@gmail.com on 6 Aug 2008 at 2:37

GoogleCodeExporter commented 9 years ago
A boolean property setClippingEnabled()/isClippingEnabled() would be useful in 
any
case, but in this case it would be nice if the clipping rectangle would still 
be set
as appropriate for the dropdown.

I'm not sure what would be the best solution, but basically I think the listbox 
that
drops out of the dropdown should be a child of the top level Gui widget. I'm 
not sure
how other toolkits solve this issue, but in Qt this is done in a similar way 
(the
popup isn't a child of anything, as is thus a top-level widget).

Original comment by b.lindeijer on 20 Aug 2008 at 1:10

GoogleCodeExporter commented 9 years ago
So another solution is to add the ability for a widget to create a widget and 
add it
to the top widget container by adding something like Widget::getTopContainer

Original comment by olof.nae...@gmail.com on 20 Aug 2008 at 2:31

GoogleCodeExporter commented 9 years ago
If a widget should be able to add widgets to the top container, than the top 
widget 
needs to be a container. Should we force the top widget to be a derived class 
from 
Container?

Original comment by olof.nae...@gmail.com on 3 Sep 2008 at 2:51

GoogleCodeExporter commented 9 years ago
I find that reasonable. In fact, I don't quite see why the top widget isn't just
provided by Guichan.

Original comment by b.lindeijer on 4 Sep 2008 at 7:59