Bar graphs and Percentages

You can configure the status bar to display various information values as percentages. For example, the percentage of disk space used on the current drive, or the total size of selected files expressed as a percentage of the free space in the destination folder. The percentage values can be displayed in two ways - as a number, or as a bar graph.

  • The {pf} and {pu} codes display the percentage of disk space used and free. These are described in detail on the Codes for disk space page.

  • The {cp} code can display a percentage calculated from any other status bar information code.

  • The {bg} code displays a bar graph representing a calculated percentage.

The {cp} code is used to display a percentage that is calculated from either two other status bar information codes, or one code and one absolute value. The template for the {cp} code is as follows:

{cp+V=<num>/<den>}

In the above template, <num> is the value to be divided and <den> is the value it will be divided by. The result is then multiplied by 100 to give the final percentage that will be displayed in the status bar. Both <num> and <den> can refer to any of the status bar codes that produce a number. They can also specify an absolute value, and this value can be given as bytes, kilobytes (with the kb suffix), megabytes (with the mb suffix) or gigabytes (with the gb suffix).

For example:

  • To display the percentage of the size of selected items ({sb}) relative to the free space in the destination file display ({dfDb}), you would specify {cp+V=sf/dfDb}.

  • To display the percentage of the size of selected files relative to 4.7 GB (the size of an empty DVD), you would specify {cp+V=sb/4.7gb}.

If {cp} is used by itself (without specifying +V=) the default behaviour is to indicate the amount of disk space used - this is equivalent to V=du/dt. The exception to this is if a {bg} code was used before the {cp} - in this case, the percentage reflected by the bar graph will be displayed.

The {bg} code is used to display a bar graph in status bars. The default graph shown is the percentage of disk space used on the current drive. You can configure the {bg} code with one or more parameters, to control:

  • The width of the graph

  • The text and fill colors

  • The type of gradient fill used (if any)

  • The type of frame used (if any)

  • Which line it should appear on (lets you position one bar graph above another)

  • Which status bar information codes are used in the calculation of the graph

The template for the {bg} code is as follows:

{bg+<param>,<param>,...}

The available parameters are:

CodeDescription

W=<width>

Sets the width of the graph, in pixels. Specify -1 to make the graph the same width as status bar section it is in. Positive numbers will scale with system DPI, so 50 will be 50 pixels wide at standard DPI and 100 pixels wide at 200% DPI. Negative values (other than -1) can be used to specify a width that does not scale with DPI.

C=#<rrggbb>

Sets the color of the bar. This is used when the bar is solid - use C1 and C2 when using a gradient bar. The color is given in hexadecimal notation, e.g. C=#ff8000.

C1=#<rrggbb>

Sets the left color of the bar when using a gradient fill.

C2=#<rrggbb>

Sets the right color of the bar when using a gradient fill.

C3=#<rrggbb>

Sets the color of the bar when the calculated percentage is greater than 100%. For example, you could have a graph that indicates the size of selected files compared with the space on a DVD - if the size was greater than 4.7GB the bar could turn red.

B=#<rrggbb>

Sets the background color of the graph. This is the color used to fill the space not occupied by the bar (i.e. to the right of the bar).

B=n

No background fill is used for the graph - the background of the status bar will show through to the right of the bar.

T=#<rrggbb>

Sets the text color for the percentage value that is drawn over the top of the graph. The color is given in hexadecimal notation, e.g. T**=#ffffff**.

T=n

The percentage value will not be shown.

G=<gradient>

F=<frame>

When the gradient is set to one of the Computer-style types (G=3 through to G=6), the frame type is ignored.

L=<line>

V=<num>/<den>

Specifies the two values that are used to calculate the bar graph percentage. This is equivalent to the format used in the {cp} code (described above) - <num> is the value to be divided and <den> is the value it will be divided by. The result is then multiplied by 100 to give the final percentage and this value is displayed by the graph. Both <num> and <den> can refer to any of the status bar codes that produce a number. They can also specify an absolute value, and this value can be given as bytes, kilobytes (with the kb suffix), megabytes (with the mb suffix) or gigabytes (with the gb suffix). For example, to produce a bar graph that indicates the size of selected items ({sb}) relative to the free space in the destination file display ({dfDb}), you would specify V=sf/dfDb. As another example, a bar graph that indicates the size of selected files relative to 4.7 GB (the size of an empty DVD), you would specify V=sb/4.7gb. The default behaviour of a bar graph is to indicate the amount of disk space used - this is equivalent to V=du/dt.

最后更新于