doc: Add more progressbar shape examples
This commit is contained in:
parent
7b11f1c1b4
commit
549d68dcc5
|
@ -61,11 +61,17 @@ local progressbar = { mt = {} }
|
||||||
-- @tparam gears.color color The progressbar background color.
|
-- @tparam gears.color color The progressbar background color.
|
||||||
|
|
||||||
--- The progressbar inner shape.
|
--- The progressbar inner shape.
|
||||||
|
--
|
||||||
|
--@DOC_wibox_widget_progressbar_bar_shape_EXAMPLE@
|
||||||
|
--
|
||||||
-- @property bar_shape
|
-- @property bar_shape
|
||||||
-- @tparam[opt=gears.shape.rectangle] gears.shape shape
|
-- @tparam[opt=gears.shape.rectangle] gears.shape shape
|
||||||
-- @see gears.shape
|
-- @see gears.shape
|
||||||
|
|
||||||
--- The progressbar shape.
|
--- The progressbar shape.
|
||||||
|
--
|
||||||
|
--@DOC_wibox_widget_progressbar_shape_EXAMPLE@
|
||||||
|
--
|
||||||
-- @property shape
|
-- @property shape
|
||||||
-- @tparam[opt=gears.shape.rectangle] gears.shape shape
|
-- @tparam[opt=gears.shape.rectangle] gears.shape shape
|
||||||
-- @see gears.shape
|
-- @see gears.shape
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
local parent = ... --DOC_HIDE
|
||||||
|
local wibox = require("wibox") --DOC_HIDE
|
||||||
|
local gears = {shape = require("gears.shape") } --DOC_HIDE
|
||||||
|
local beautiful = require("beautiful") --DOC_HIDE
|
||||||
|
|
||||||
|
|
||||||
|
local l = wibox.layout { --DOC_HIDE
|
||||||
|
forced_height = 120, --DOC_HIDE
|
||||||
|
forced_width = 100, --DOC_HIDE
|
||||||
|
layout = wibox.layout.flex.vertical --DOC_HIDE
|
||||||
|
} --DOC_HIDE
|
||||||
|
|
||||||
|
for _, shape in ipairs {"rounded_bar", "octogon", "hexagon", "powerline" } do
|
||||||
|
l:add(wibox.widget {
|
||||||
|
value = 0.33,
|
||||||
|
bar_shape = gears.shape[shape],
|
||||||
|
bar_border_color = beautiful.border_color,
|
||||||
|
bar_border_width = 1,
|
||||||
|
border_width = 2,
|
||||||
|
border_color = beautiful.border_color,
|
||||||
|
margins = 5, --DOC_HIDE
|
||||||
|
paddings = 1,
|
||||||
|
widget = wibox.widget.progressbar,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
parent:add(l) --DOC_HIDE
|
|
@ -0,0 +1,24 @@
|
||||||
|
local parent = ... --DOC_HIDE
|
||||||
|
local wibox = require("wibox") --DOC_HIDE
|
||||||
|
local gears = {shape = require("gears.shape") } --DOC_HIDE
|
||||||
|
local beautiful = require("beautiful") --DOC_HIDE
|
||||||
|
|
||||||
|
|
||||||
|
local l = wibox.layout { --DOC_HIDE
|
||||||
|
forced_height = 100, --DOC_HIDE
|
||||||
|
forced_width = 100, --DOC_HIDE
|
||||||
|
layout = wibox.layout.flex.vertical --DOC_HIDE
|
||||||
|
} --DOC_HIDE
|
||||||
|
|
||||||
|
for _, shape in ipairs {"rounded_bar", "octogon", "hexagon", "powerline" } do
|
||||||
|
l:add(wibox.widget {
|
||||||
|
value = 0.33,
|
||||||
|
shape = gears.shape[shape],
|
||||||
|
border_width = 2,
|
||||||
|
border_color = beautiful.border_color,
|
||||||
|
margins = 5, --DOC_HIDE
|
||||||
|
widget = wibox.widget.progressbar,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
parent:add(l) --DOC_HIDE
|
Loading…
Reference in New Issue