38 lines
925 B
Plaintext
38 lines
925 B
Plaintext
(defwidget osd_widg [osdtype osd_value]
|
|
(overlay
|
|
:class "osd_progbar_container ${osdtype}"
|
|
:active false
|
|
:halign "fill"
|
|
:height 50
|
|
:width 200
|
|
|
|
(box
|
|
:class "osd_prog_bg"
|
|
:halign "fill"
|
|
:valign "fill"
|
|
:height 50
|
|
:width 200
|
|
)
|
|
(box
|
|
:class "osd_prog_filled ${osd_value.status}"
|
|
:height 50
|
|
:width "${(200/100)*osd_value.level}"
|
|
:halign "start"
|
|
:valign "fill"
|
|
)
|
|
(label
|
|
:class "osd_value"
|
|
:height 35
|
|
:halign "end"
|
|
:valign "center"
|
|
:text "${osd_value.level}%"
|
|
)
|
|
(label
|
|
:class "osd_icon"
|
|
:height 35
|
|
:halign "start"
|
|
:valign "center"
|
|
:text "${osd_value.icon}"
|
|
)
|
|
)
|
|
) |