Bug 44279 - knode statusbar field too small to show progress
Summary: knode statusbar field too small to show progress
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kstyle (show other bugs)
Version: SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Karol Szwed
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-23 18:03 UTC by frank.dekervel
Modified: 2002-12-27 17:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description frank.dekervel 2002-06-23 17:56:50 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           knode
Version:           0.7.1 (using KDE 3.0.5 (CVS HEAD >= 20020427))
Severity:          normal
Installed from:    compiled sources
Compiler:          gcc version 2.95.4 20011002 (Debian prerelease)
OS:                Linux (i686) release 2.4.18-rc4
OS/Compiler notes: 

the label near the progressbar on the left of the statusbar in knode is to small (with light style) to show the progress in KB  so i only see the last digits..

greetings
frank


(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 Maksim Orlovich 2002-09-28 03:54:51 UTC
(Thanks to Affronter for letting me know of this).      
OK, we've got a problem here. QProgressBar can only have percentage displays,   
so the "number" area of the progressbar can be at widest "100%", or something   
like this.  But KProgress extends this to arbitrary-width strings, which are 
pretty much impossible to space out in advance. Further, even if we could get 
Light2/Light3 to work, it'd still break with Qt Platinum and Windows... And 
although KProgressbar can force a centered indicator, that would be horribly 
inconsistent :-( .. Ideas? 
Comment 2 Karol Szwed 2002-11-18 10:37:46 UTC
This really isn't a bug, but a limitation of QProgressBar as it is designed to
only show progress in percentage units.

I suggest you force the progress text to be centered over the progressbar.
Alternatively, use a QHBoxLayout with a QProgressBar that has "PercentageVisible
= false", and a QLabel showing any progress text in whatever units you like.

Hope this helps.

Comment 3 Maksim Orlovich 2002-12-27 17:47:55 UTC
Subject: kdelibs/kdeui

CVS commit by orlovich: 


As posted on core-devel quite a bit ago (and commented on by exactly one person): force centering of indicator
with custom strings, effectively fixes #44279
CCMAIL: 44279-done@bugs.kde.org


  M +2 -0      kprogress.cpp   1.41


--- kdelibs/kdeui/kprogress.cpp  #1.40:1.41
@@ -108,4 +108,6 @@ void KProgress::setFormat(const QString 
 {
     mFormat = format;
+    if (mFormat != "%p%")
+        setCenterIndicator(true);
 }