From: Foster T. B. <fbr...@ad...> - 2006-01-03 19:25:50
|
This patch has been applied. Thanks for the fixes, Thomas. Keep 'em coming! Blessings, Foster On Dec 29, 2005, at 04:12p, Thomas Witt wrote: > > Hi, > > The attached patch fixes 2 issues with the widget implementation on > win32 that show up in begin. > > a) The text in an edit_text widget is truncated to 1023 char on > extraction. As a result loading any example in begin that is longer > than that (some are) and making a small modification will see the > update fail with a syntax error. > > b) The edit_text widget does not grow vertically. This makes > editing/viewing larger examples in Begin a pain. It works for begin > but this fix might need more review. > > Thomas > > -- > Thomas Witt > wi...@ac... > Index: ui_core_implementation.cpp > =================================================================== > RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/ > sources/win/ui_core_implementation.cpp,v > retrieving revision 1.5 > diff -u -3 -p -u -r1.5 ui_core_implementation.cpp > --- ui_core_implementation.cpp 2 Dec 2005 02:52:56 -0000 1.5 > +++ ui_core_implementation.cpp 30 Dec 2005 00:02:05 -0000 > @@ -245,11 +245,13 @@ std::string get_window_title(HWND window > { > assert(window); > > - std::vector<WCHAR> titlename; > + int const buffer_size = ::GetWindowTextLengthW(window) + 1; > > - titlename.resize(1024); > + std::vector<WCHAR> titlename(buffer_size, 0); > > - *(&titlename[::GetWindowTextW(window, &titlename[0], 1024)]) = 0; > + int const text_length = ::GetWindowTextW(window, &titlename[0], > buffer_size); > + > + assert(text_length < buffer_size); > > return std::string(hackery::convert_utf(&titlename[0])); > } > @@ -3143,7 +3145,10 @@ void edit_text_t::implementation_t::set_ > // alignment. > // > position.y_m += baseline - edit_baseline_m; > - geometry.height() = edit_height_m; > + > + // Do we need to adapt the height for baseline alignment? (thw) > + // Disabled as it disables vertical align_fill (thw) > + // geometry.height() = edit_height_m; > _super::set_bounds(position, geometry); > } > -- Foster T. Brereton <}}}>< Romans 3:21-26 A d o b e S o f t w a r e T e c h n o l o g y L a b "The fact is that the author of STL does not know how to write min, the author of C++ is not quite sure, and the standards committee is at a loss." -- Alexander Stepanov |