CtrlLib: StatusBar minor fix

git-svn-id: svn://ultimatepp.org/upp/trunk@10502 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-11-29 14:53:51 +00:00
parent 1fedd2cea8
commit 54f48f6d3f
3 changed files with 6 additions and 13 deletions

View file

@ -289,7 +289,7 @@ void ProgressInfo::Refresh()
if(!info) return;
String txt = Format(~text, pos);
info->Set(tabi, txt, tw ? tw : GetTextSize(txt, StdFont()).cx + 8);
info->Set(tabi + 1, PaintRect(ProgressDisplay(), 1000.0 * pos / total), cx);
info->Set(tabi + 1, PaintRect(ProgressDisplay(), 1000.0 * pos / (total ? total : 1000)), cx);
}
ProgressInfo& ProgressInfo::Set(int _pos, int _total)

View file

@ -4,7 +4,6 @@ public:
virtual void FrameLayout(Rect& r);
private:
struct Tab {
PaintRect info;
int width;

View file

@ -19,9 +19,7 @@ rameLR][@(0.0.255)3 <][_^Ctrl^3 Ctrl][@(0.0.255)3 >][3 _]&]
[s0; &]
[s2;
@@image:643&143
€<EFBFBD>€€€<EFBFBD><EFBFBD>€€€€<EFBFBD>€<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>€<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>€<EFBFBD><EFBFBD>
(A2cAFwAAAOn/AAAAAHic7dXNCYAwDAVgJ3YPR3ADD+I8riB0hwoeBJO2pjZtI7zwDhJKfz6pumN3CNIq6zIj6XjvOVr3F2c8QAMa0MwGaDXQhqtIhw8gzcLwOSUdI2h8S3znicGfxcizpGMELbaZ2mixteSdvmjBK9AGLXj1LIi9oklwYrZadNbEVNCqHuGe046YIpriEdKf/e5iaTSX8+vX3RVZZXhWsGMHDQEa0ID2r3A0jxIUuEpqnDYkNye2qVgt)
&]
[s0; &]
[s9; InfoCtrl is a simple static Ctrl that represents information
@ -53,7 +51,8 @@ t]_[*@3 tab], [@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 info],
[s2; Sets (creates if needed) the section of the InfoCtrl.&]
[s7; [%-*C@3 tab]-|Index of section.&]
[s7; [%-*C@3 info]-|Content of section. Value content is converted to
the text using AsString.&]
the text using AsString, unless it is Image, which is displayed
as is.&]
[s7; [%-*C@3 width]-|Width of section in pixels. Negative value indicates
that section should be placed given number of pixels from the
right border of the InfoCtrl.&]
@ -126,12 +125,7 @@ nfoCtrl]&]
[s0; &]
[s2;
@@image:1268&131
€€€<EFBFBD><EFBFBD>€€€€<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>€<EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>η<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
€<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ι漿ソ<EFBFBD>ソ<EFBFBD><EFBFBD>
(A8sAFQAAAOv/AAAAAHic7Zk9jsMgEEZ9/xtsGaXZYstEylG22CbpVuIOThHJIgzzEzAMWB96RWRbBr48YJSE/98AQBvWdXUfw1D8fH8BmY+cgWBUMPcxDA4EqwGCqUCwGiCYCgSrAYKpuAu2LIt7CMVAMJUawZaoFQ/gMIJlo0iu1MdlyZD20qhfC5WCcXMsDmcuNsGyUdDvvcWsqUvJ50b9GmkhmGUFJbufbwjFZI9IOiM5rnq4t8lj6INFsNvlfLuc6MPqsuUmONoqK4YKFueQLKvOgsmHdTesgl3zgslbE5e2YOZEdgUimNdRZd+pxtzBtse4Hcyya6lRzy6YWnF1E0x4+bCCZR82HpH2qOeyKzBFvj2Hvfh0gfeEE2yru4KtBgvvjgnnJnfFZfqVxIIJc6Q57DgGIVhhJN2QBLueXne5GmxfprMr4IdWA4Iz8a1sDbYvEOyQuP9VNDUQTCV2Jlt3Bb4GAxBMJRXsve7qWYPNyIpmaMYwH/c/75GiHb89Ac30xxw=)
&]
[s0; &]
[s9; StatusBar is a Frame Ctrl intended to be used as informational
@ -291,4 +285,4 @@ by Total method.&]
[s5;:ProgressInfo`:`:operator int`(`):%- [* operator_int]()&]
[s7; [*/ Return value]-|Get().&]
[s3; &]
[s0; ]
[s0; ]]