From 3c214a788389bfcbee264054512ca7f0a5903c0e Mon Sep 17 00:00:00 2001 From: Thomas Croft Date: Sun, 2 Oct 2022 20:27:57 -0600 Subject: [PATCH] Examples --- .../wibox/widget/slider/bar_widget.lua | 23 +++++++++++++++++++ .../wibox/widget/slider/handle_widget.lua | 23 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 tests/examples/wibox/widget/slider/bar_widget.lua create mode 100644 tests/examples/wibox/widget/slider/handle_widget.lua diff --git a/tests/examples/wibox/widget/slider/bar_widget.lua b/tests/examples/wibox/widget/slider/bar_widget.lua new file mode 100644 index 000000000..96415c17f --- /dev/null +++ b/tests/examples/wibox/widget/slider/bar_widget.lua @@ -0,0 +1,23 @@ +--DOC_HIDE_ALL +--DOC_GEN_IMAGE +local parent = ... +local wibox = require("wibox") +local beautiful = require("beautiful") + +local function gen(val) + return wibox.widget { + bar_border_color = beautiful.border_color, + bar_border_width = 1, + bar_margins = {}, + bar_widget = wibox.widget { + widget = wibox.widget.textbox, + text = "Some text." + }, + handle_color = beautiful.bg_normal, + handle_border_color = beautiful.border_color, + handle_border_width = 1, + widget = wibox.widget.slider, + } +end + +--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/tests/examples/wibox/widget/slider/handle_widget.lua b/tests/examples/wibox/widget/slider/handle_widget.lua new file mode 100644 index 000000000..29928c1b7 --- /dev/null +++ b/tests/examples/wibox/widget/slider/handle_widget.lua @@ -0,0 +1,23 @@ +--DOC_HIDE_ALL +--DOC_GEN_IMAGE +local parent = ... +local wibox = require("wibox") +local beautiful = require("beautiful") + +local function gen(val) + return wibox.widget { + bar_border_color = beautiful.border_color, + bar_border_width = 1, + bar_margins = {}, + handle_widget = wibox.widget { + widget = wibox.widget.textbox, + text = "Some text." + }, + handle_color = beautiful.bg_normal, + handle_border_color = beautiful.border_color, + handle_border_width = 1, + widget = wibox.widget.slider, + } +end + +--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80