From: Chad A. <ae...@ae...> - 2002-07-15 01:46:37
|
> Modified files: > phui/phui Button.cpp FontRenderer.cpp > FontRenderer.h > Log: > Text spillage under the buttons no longer occurs; if you give a button text that cannot possible fit multilined within its height constraint, it will automatically resize to fit the text. Yay! But I would think that it would just clip the text and maybe set a preferred size so that a future layout manager could position it intelligently. (I am with Ben now on making phui match Swing) My instinct says that having setText() modify the size of the widget will make some really annoying and chaotic UIs. :) > Considerations to be made: > > - Does the user always want this to happen? > - If the button becomes larger than the window, the button will flow out of the window. Should the resizing escalate up to the root widget, so that it is resized as well? > - If we resize all of the windows, and still cannot map the text, what to do? > > Anyhow; for now, check out the window and event demos....No more text leakage! :P > > Revision Changes Path > 1.21 +5 -3 lib/phui/phui/Button.cpp > 1.6 +13 -17 lib/phui/phui/FontRenderer.cpp > 1.6 +7 -4 lib/phui/phui/FontRenderer.h > > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/isugamedev/lib/phui/phui/Button.cpp.diff?r1=1.20&r2=1.21&diff_format=h > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/isugamedev/lib/phui/phui/FontRenderer.cpp.diff?r1=1.5&r2=1.6&diff_format=h > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/isugamedev/lib/phui/phui/FontRenderer.h.diff?r1=1.5&r2=1.6&diff_format=h > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > ISUGameDev-commits mailing list > ISU...@li... > https://lists.sourceforge.net/lists/listinfo/isugamedev-commits |