[Plib-devel] [PATCH] puAux/{puAuxList.cxx,puAux.h}: several fixes
Brought to you by:
sjbaker
From: Melchior F. <mf...@us...> - 2006-03-24 18:12:45
|
Could someone please review the attached patch and consider to commit it? It fixes several problems with puaList. Here's a screenshot of the current behavior on the left, and the fixed one on the right side http://members.aon.at/mfranz/puaList.jpg [20 kB] (1) The size setting is completely wrong. This is because puObject::setSize() can't handle composite widgets: we can't just resize the outmost widget, we also have to reposition/resize the children! (2) the slider width isn't set, and puSlider() uses a value derived of the font, while buttons & scrollbar are set to a fixed (and rather clunky) width. (3) The color settings aren't propagated to the puListBox child, hence we get a really hard to read black font where we should have a white one. (4) The widget does only call the callback function on exit, which makes it barely usable. No actions can be fired on list selection. This patch: - adds a puaList::setSize() function that repositions all child widgets - adds puaList::setColour{,Scheme} that sets the puListBox colors - lets puListBox actions fire puaList callbacks - sets the slider size correctly, and to a sane size - makes the slider size settable via optional argument (like in puaLargeInput) - fixes a bug that returned a pointer to invalid memory in getListStringValue(), which caused crashes - removes an undefined method from the puaList class that breaks linking The last point will be topic of another message, together with another bug. :-) m. |