Re: [Plib-devel] [PATCH] puaLargeInput: don't move text to the rightwhen increasing width
Brought to you by:
sjbaker
From: Fay, J. F Dr C. U. A. 46 S. <joh...@eg...> - 2009-02-09 14:54:00
|
OK, that's into SVN John F. Fay Technical Fellow Jacobs Technology TEAS Group 850-883-1294 -----Original Message----- From: Melchior FRANZ [mailto:mf...@us...] Sent: Monday, February 09, 2009 6:54 AM To: pli...@li... Subject: [Plib-devel] [PATCH] puaLargeInput: don't move text to the rightwhen increasing width Hi, here's a fix for a bug that slipped through: if one increased the widget width beyond the width of the longest line, then the slider did (correctly) disappear, but from then on the text moved to the left. We have to reset the slider to the leftmost position then. m. diff --git a/src/puAux/puAuxLargeInput.cxx b/src/puAux/puAuxLargeInput.cxx index 34fef07..c39a6b9 100644 --- a/src/puAux/puAuxLargeInput.cxx +++ b/src/puAux/puAuxLargeInput.cxx @@ -170,11 +170,14 @@ void puaLargeInput::updateGeometry ( void ) // horizontal slider if ( bottom_slider ) { bottom_slider->setSize ( w - ( slider & VERTICAL ? slider_width : 0 ), slider_width ) ; - bottom_slider->setSliderFraction ( float(input_width) / max_width ) ; float page_step = 1.0f, line_step = 1.0f ; if ( max_width > input_width ) { page_step = float(input_width) / ( max_width - input_width ) ; line_step = legendFont.getFloatStringWidth( "M" ) / ( max_width - input_width ) ; + bottom_slider->setSliderFraction ( float(input_width) / max_width ) ; + } else { + bottom_slider->setSliderFraction ( 1.0f ) ; + bottom_slider->setValue ( 0.0f ); } bottom_slider->setPageStepSize ( page_step ) ; ------------------------------------------------------------------------ ------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ plib-devel mailing list pli...@li... https://lists.sourceforge.net/lists/listinfo/plib-devel |