Author: gs Date: Tue Mar 31 11:42:29 2009 New Revision: 56481 URL: http://svn.opensuse.org/viewcvs/yast?rev=56481&view=rev Log: calculate starting point (vstart) to draw the value correctly (bug #488757) Modified: branches/SuSE-Code-11-Branch/ncurses/src/NCIntField.cc Modified: branches/SuSE-Code-11-Branch/ncurses/src/NCIntField.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/ncurses/src/NCIntField.cc?rev=56481&r1=56480&r2=56481&view=diff ============================================================================== --- branches/SuSE-Code-11-Branch/ncurses/src/NCIntField.cc (original) +++ branches/SuSE-Code-11-Branch/ncurses/src/NCIntField.cc Tue Mar 31 11:42:29 2009 @@ -124,7 +124,15 @@ trect.Pos.L, trect.Pos.C, 'r' ); - vstart = ( vlen + 2 < ( unsigned )trect.Sze.W ) ? label.width() - vlen - 2 : 0; + //vstart = ( vlen + 2 < ( unsigned )trect.Sze.W ) ? label.width() - vlen - 2 : 0; + vstart = 0; + // vstart is calculated from label width only if value length (+ tags) is smaller + // than window width AND smaller than label width, otherwise start with 0 + // (bug #488757) + if ( vlen + 2 < ( unsigned )trect.Sze.W && vlen + 2 < label.width() ) + { + vstart = label.width() - vlen - 2; + } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org