From 163748c7820963a959e98a6cda3d813de7e27669 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Wed, 25 May 2016 15:23:51 -0400 Subject: [PATCH] doc: Add a ratio layout default screenshot --- lib/wibox/layout/ratio.lua | 2 ++ tests/examples/wibox/layout/defaults/ratio.lua | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 tests/examples/wibox/layout/defaults/ratio.lua diff --git a/lib/wibox/layout/ratio.lua b/lib/wibox/layout/ratio.lua index 9cfee1c36..98c5132fe 100644 --- a/lib/wibox/layout/ratio.lua +++ b/lib/wibox/layout/ratio.lua @@ -2,6 +2,8 @@ --- A layout filling all the available space. Each widget is assigned a -- ratio (percentage) of the total space. Multiple methods are available to -- ajust this ratio. +-- +--@DOC_wibox_layout_defaults_ratio_EXAMPLE@ -- @author Emmanuel Lepage Vallee -- @copyright 2016 Emmanuel Lepage Vallee -- @release @AWESOME_VERSION@ diff --git a/tests/examples/wibox/layout/defaults/ratio.lua b/tests/examples/wibox/layout/defaults/ratio.lua new file mode 100644 index 000000000..149109a08 --- /dev/null +++ b/tests/examples/wibox/layout/defaults/ratio.lua @@ -0,0 +1,13 @@ +local generic_widget = ... --DOC_HIDE +local wibox = require("wibox") --DOC_HIDE + +local w = wibox.widget { + generic_widget( "first" ), + generic_widget( "second" ), + generic_widget( "third" ), + layout = wibox.layout.ratio.horizontal +} + +w:ajust_ratio(2, 0.44, 0.33, 0.22) + +return w --DOC_HIDE