Circular
Circular progress indicator is another method to indicate the timeout, usually a circular logo alongside with dotted or rounded square-sized images. This progress indicator holds the following properties.
ID
With the value
-
__timeout__
- unset
This is for turning the progress bar to display remaining time. Default is unset. Usually set it.
center_bitmap, tick_bitmap
The image that forms the circular indicator. They are drawn, neither resize nor turned. If there is a mismatch in size, part of the image will not appear. They both accepts filename string.
center_bitmap
- the center of the image, serves as background.
tick_bitmap
- the progress indicator.
It is highly recommended to use square (width = height) images for ensuring symmetrical rendering.
num_ticks, start_angle, ticks_disappear
These are the settings to animate the circular indicator. It uses "parrot" as its angle measurement ( 360 / 256 ). Hence, for 90 degree, it is 64 parrot. The mathematical calculation is as follows:
degree = parrot / 256 * 360
parrot = degree / 360 * 256
The angle, following mathematical standards, starts as x-axis. Hence, to adjust back to our conventional Y-axis start point (0 degree), we apply negative angle of 64 parrots (-90 degree).
The increments/decrements animation is always by 1.
The design starts with the following definition:
num_ticks
- total number of ticks for the entire circle. It is recommended to keep the value equal to n-th power of 2 for maintaining smooth and symmetrical animation.start_angle
- the starting angle. Usually set to-64
parrots to make it starts at Y-axis. Default is0
, starts at X-axis.ticks_disappear
- if set to"True"
, it makes the tick to disappear as it counts down. Default is unset, which is appearing.
General Properties
Recommended set:
left
top
width = height
Use square dimension instead of rectangle.
Examples
Appearing Indicator
+ circular_progress {
left = 50%-450
top = 50%+310
id = "__timeout__"
width = 51
height = 51
center_bitmap = "center.png"
tick_bitmap = "tick.png"
num_ticks = 8
}
Disappearing Indicator
+ circular_progress {
left = 50%-450
top = 50%+310
id = "__timeout__"
width = 51
height = 51
center_bitmap = "center.png"
tick_bitmap = "tick.png"
num_ticks = 8
ticks_disappear = "True"
}
That's all about circular progress bar in GRUB.