[yast-commit] r48107 - in /trunk/yast2: library/wizard/src/Progress.ycp package/yast2.changes

Author: locilka Date: Fri Jun 6 12:52:39 2008 New Revision: 48107 URL: http://svn.opensuse.org/viewcvs/yast?rev=48107&view=rev Log: - Fixed Progress stages layout, stage-mark has a reseved space now (bnc #395752). Modified: trunk/yast2/library/wizard/src/Progress.ycp trunk/yast2/package/yast2.changes Modified: trunk/yast2/library/wizard/src/Progress.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/wizard/src/Progress... ============================================================================== --- trunk/yast2/library/wizard/src/Progress.ycp (original) +++ trunk/yast2/library/wizard/src/Progress.ycp Fri Jun 6 12:52:39 2008 @@ -267,7 +267,7 @@ */ any Mark (symbol kind) { if (kind == `todo) - return "- "; + return "-"; if (kind == `current) return UI::Glyph (`BulletArrowRight); if (kind == `done) @@ -368,8 +368,16 @@ if (!visible) return ; - y2milestone("Progress::New(%1, %2, %3)", window_title, length, stg); + if (Mode::commandline ()) + return; + // a progress is already running, remember the current status + if (IsRunning()) + { + PushState(); + } + + y2milestone("Progress::New(%1, %2, %3)", window_title, length, stg); integer orig_current_step = current_step; @@ -379,15 +387,6 @@ current_step = -1; current_stage = -1; - if (Mode::commandline ()) - return; - - // a progress is already running, remember the current status - if (IsRunning()) - { - PushState(); - } - if (length < size(stg)) { y2warning("Number of stages (%1) is greater than number of steps (%2)", size(stg), length); @@ -439,17 +438,26 @@ bar = `VBox (`VSpacing (1)); integer i = 0; any label_heading = Mark (`todo); + + term items = `VBox (); foreach (string item, stg, ``{ - bar = add (bar, - `HBox ( - `HSpacing (1), - // check_ycp wants this text to be translatable. I do not know why. - `Heading (MarkId (i), label_heading), - `Label (`opt (`hstretch), item) - ) + items = add (items, + `HBox ( + `HSpacing (1), + // check_ycp wants this text to be translatable. I do not know why. + // HSquash + MinWidth(4) reserves a defined space for 'mark' plus 'emtpy space' + // see bnc #395752 + `HSquash (`MinWidth (4, `Heading (MarkId (i), label_heading))), + `Label (item), + `HStretch() + ) ); i = i+1; }); + bar = add (bar, `Left (`HBox ( + `HSquash (items) + ))); + if (0 != steps) { // stages and progress term progress_icons = `Empty (); Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=4... ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Fri Jun 6 12:52:39 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri Jun 6 12:50:02 CEST 2008 - locilka@suse.cz + +- Fixed Progress stages layout, stage-mark has a reseved space now + (bnc #395752). + +------------------------------------------------------------------- Wed Jun 4 16:32:13 CEST 2008 - lslezak@suse.cz - added PackageLock::Connect() - similar to PackageLock::Check() -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
locilka@svn.opensuse.org