From 88c65a71ddd9ef5b6c18cef576580a4bf7c691dd Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sun, 4 Sep 2022 00:33:09 -0700 Subject: [PATCH] textbox: Rename `align` to `halign`. `halign` is used in multiple place in the API. Once upon a time, Awesome only supported horizontal widgets, but this era has long passed. Fix #3640 --- awesomerc.lua | 2 +- docs/03-declarative-layout.md | 2 +- lib/awful/widget/layoutlist.lua | 2 +- lib/awful/widget/tasklist.lua | 2 +- lib/wibox/widget/calendar.lua | 2 +- lib/wibox/widget/textbox.lua | 25 ++++++++++++++++--- spec/wibox/widget/textbox_spec.lua | 6 ++--- tests/_multi_screen.lua | 2 +- tests/examples/awful/client/border_color.lua | 2 +- tests/examples/awful/client/border_width.lua | 2 +- tests/examples/awful/client/opacity1.lua | 2 +- tests/examples/awful/client/shape1.lua | 2 +- .../examples/awful/client/skip_tasklist1.lua | 2 +- tests/examples/awful/client/urgent1.lua | 2 +- .../notificationlist/bottombar.lua | 2 +- tests/examples/awful/popup/defaultconfig.lua | 2 +- tests/examples/awful/popup/wiboxtypes.lua | 2 +- tests/examples/awful/template.lua | 2 +- tests/examples/awful/titlebar/constructor.lua | 2 +- tests/examples/awful/titlebar/default.lua | 2 +- .../awful/titlebar/defaulttitlebar.lua | 4 +-- .../examples/awful/wallpaper/add_screen1.lua | 4 +-- .../examples/awful/wallpaper/add_screen2.lua | 4 +-- .../examples/awful/wallpaper/add_screen3.lua | 4 +-- tests/examples/awful/wallpaper/dpi1.lua | 2 +- .../awful/wallpaper/panning_custom.lua | 4 +-- .../awful/wallpaper/panning_inner.lua | 4 +-- .../wallpaper/panning_inner_horizontal.lua | 4 +-- .../wallpaper/panning_inner_vertical.lua | 4 +-- .../awful/wallpaper/panning_outer.lua | 4 +-- .../awful/wallpaper/remove_screen1.lua | 2 +- .../awful/wallpaper/remove_screen2.lua | 2 +- tests/examples/awful/wallpaper/screens1.lua | 2 +- tests/examples/awful/wallpaper/widget2.lua | 2 +- tests/examples/awful/wallpaper/workarea1.lua | 2 +- tests/examples/awful/wibar/align.lua | 2 +- tests/examples/awful/wibar/defaultwibar.lua | 2 +- tests/examples/awful/wibar/margins.lua | 6 ++--- tests/examples/awful/wibar/position.lua | 2 +- tests/examples/awful/wibar/position2.lua | 2 +- tests/examples/awful/wibar/stretch.lua | 2 +- tests/examples/sequences/template.lua | 2 +- tests/examples/shims/_default_look.lua | 2 +- tests/examples/uml/template.lua | 2 +- .../examples/wibox/container/arcchart/bg.lua | 2 +- .../wibox/container/arcchart/border_width.lua | 2 +- .../wibox/container/arcchart/paddings.lua | 4 +-- .../wibox/container/arcchart/start_angle.lua | 2 +- .../wibox/container/arcchart/thickness.lua | 2 +- .../wibox/container/defaults/arcchart.lua | 4 +-- .../wibox/container/defaults/background.lua | 4 +-- .../wibox/container/defaults/constraint.lua | 4 +-- .../wibox/container/defaults/margin.lua | 4 +-- .../wibox/container/defaults/mirror.lua | 4 +-- .../container/defaults/only_on_screen.lua | 4 +-- .../wibox/container/defaults/place.lua | 4 +-- .../container/defaults/radialprogressbar.lua | 4 +-- .../wibox/container/defaults/rotate.lua | 4 +-- .../wibox/container/defaults/scroll.lua | 4 +-- .../wibox/container/defaults/tile.lua | 4 +-- .../radialprogressbar/border_color.lua | 2 +- .../radialprogressbar/border_width.lua | 2 +- .../container/radialprogressbar/color.lua | 2 +- .../container/radialprogressbar/padding.lua | 2 +- .../container/radialprogressbar/value.lua | 2 +- .../examples/wibox/container/rotate/angle.lua | 2 +- tests/examples/wibox/layout/template.lua | 2 +- tests/examples/wibox/nwidget/default.lua | 2 +- .../wibox/nwidget/rules/widget_template.lua | 4 +-- .../examples/wibox/widget/calendar/month.lua | 4 +-- .../wibox/widget/defaults/textbox.lua | 2 +- .../widget/progressbar/background_color.lua | 2 +- .../widget/progressbar/bar_border_color.lua | 2 +- .../widget/progressbar/bar_border_width.lua | 2 +- .../wibox/widget/progressbar/border_color.lua | 2 +- .../wibox/widget/progressbar/border_width.lua | 2 +- .../wibox/widget/progressbar/color.lua | 2 +- .../wibox/widget/progressbar/margins1.lua | 2 +- .../wibox/widget/progressbar/max_value.lua | 2 +- .../wibox/widget/progressbar/paddings1.lua | 2 +- .../wibox/widget/progressbar/text.lua | 2 +- .../wibox/widget/progressbar/ticks.lua | 2 +- .../wibox/widget/progressbar/ticks_gap.lua | 2 +- .../wibox/widget/progressbar/ticks_size.lua | 2 +- .../wibox/widget/progressbar/ticks_size2.lua | 8 +++--- .../wibox/widget/progressbar/value.lua | 2 +- .../examples/wibox/widget/textbox/align1.lua | 2 +- tests/test-leak-client.lua | 2 +- 88 files changed, 138 insertions(+), 121 deletions(-) diff --git a/awesomerc.lua b/awesomerc.lua index 2f22239f7..c598a3e08 100644 --- a/awesomerc.lua +++ b/awesomerc.lua @@ -541,7 +541,7 @@ client.connect_signal("request::titlebars", function(c) }, { -- Middle { -- Title - align = "center", + halign = "center", widget = awful.titlebar.widget.titlewidget(c) }, buttons = buttons, diff --git a/docs/03-declarative-layout.md b/docs/03-declarative-layout.md index cf093f76a..ccf93c97f 100644 --- a/docs/03-declarative-layout.md +++ b/docs/03-declarative-layout.md @@ -277,7 +277,7 @@ Code: { { markup = "Hello World!", - align = "center", + halign = "center", widget = wibox.widget.textbox }, bg = "#ff0000", diff --git a/lib/awful/widget/layoutlist.lua b/lib/awful/widget/layoutlist.lua index c3abbb618..e263cd6d6 100644 --- a/lib/awful/widget/layoutlist.lua +++ b/lib/awful/widget/layoutlist.lua @@ -79,7 +79,7 @@ local function wb_label(item, _, textbox) end if textbox and item.style.align or beautiful.layoutlist_align then - textbox:set_align(item.style.align or beautiful.layoutlist_align) + textbox:set_halign(item.style.align or beautiful.layoutlist_align) end local text = "" diff --git a/lib/awful/widget/tasklist.lua b/lib/awful/widget/tasklist.lua index a0b29688c..7d3c98700 100644 --- a/lib/awful/widget/tasklist.lua +++ b/lib/awful/widget/tasklist.lua @@ -464,7 +464,7 @@ local function tasklist_label(c, args, tb) local minimized = args.minimized or theme.tasklist_minimized or '_' if tb then - tb:set_align(align) + tb:set_halign(align) end if not theme.tasklist_plain_task_name then diff --git a/lib/wibox/widget/calendar.lua b/lib/wibox/widget/calendar.lua index c4b541032..886c93703 100644 --- a/lib/wibox/widget/calendar.lua +++ b/lib/wibox/widget/calendar.lua @@ -155,7 +155,7 @@ local properties = { "date" , "font" , "spacing" , "week_numbers" local function make_cell(text, font, center) local w = textbox() w:set_markup(text) - w:set_align(center and "center" or "right") + w:set_halign(center and "center" or "right") w:set_valign("center") w:set_font(font) return w diff --git a/lib/wibox/widget/textbox.lua b/lib/wibox/widget/textbox.lua index 2a62ed990..b678e5017 100644 --- a/lib/wibox/widget/textbox.lua +++ b/lib/wibox/widget/textbox.lua @@ -324,14 +324,22 @@ end -- --@DOC_wibox_widget_textbox_align1_EXAMPLE@ -- --- @property align --- @tparam[opt="left"] string align +-- @property halign +-- @tparam[opt="left"] string halign -- @propertyvalue "left" -- @propertyvalue "center" -- @propertyvalue "right" -- @propemits true false -function textbox:set_align(mode) +--- The horizontal text alignment. +-- +-- Renamed to `halign` for consistency with other APIs. +-- +-- @deprecatedproperty align +-- @tparam[opt="left"] string align +-- @propemits true false + +function textbox:set_halign(mode) local allowed = { left = "LEFT", center = "CENTER", right = "RIGHT" } if allowed[mode] then if self._private.layout:get_alignment() == allowed[mode] then @@ -341,9 +349,18 @@ function textbox:set_align(mode) self:emit_signal("widget::redraw_needed") self:emit_signal("widget::layout_changed") self:emit_signal("property::align", mode) + self:emit_signal("property::halign", mode) end end +function textbox:set_align(mode) + gdebug.deprecate( + "Use `textbox.halign` instead of `textbox.align`", + {deprecated_in=5, raw=true} + ) + self:set_halign(mode) +end + --- Set a textbox font. -- -- There is multiple valid font string representation. The most precise is @@ -500,7 +517,7 @@ local function new(text, ignore_markup) ret:set_ellipsize("end") ret:set_wrap("word_char") ret:set_valign("center") - ret:set_align("left") + ret:set_halign("left") if text then if ignore_markup then diff --git a/spec/wibox/widget/textbox_spec.lua b/spec/wibox/widget/textbox_spec.lua index 160c401b4..53f8b13d1 100644 --- a/spec/wibox/widget/textbox_spec.lua +++ b/spec/wibox/widget/textbox_spec.lua @@ -98,15 +98,15 @@ describe("wibox.widget.textbox", function() assert.is.equal(1, layout_changed) end) - it("set_align", function() + it("set_halign", function() assert.is.equal(0, redraw_needed) assert.is.equal(0, layout_changed) - widget:set_align("left") + widget:set_halign("left") assert.is.equal(0, redraw_needed) assert.is.equal(0, layout_changed) - widget:set_align("right") + widget:set_halign("right") assert.is.equal(1, redraw_needed) assert.is.equal(1, layout_changed) end) diff --git a/tests/_multi_screen.lua b/tests/_multi_screen.lua index fd10dfeaa..0008a8b8e 100644 --- a/tests/_multi_screen.lua +++ b/tests/_multi_screen.lua @@ -395,7 +395,7 @@ local function show_screens() "+",s.geometry.x,",",s.geometry.y }, valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, bg = colors[i], diff --git a/tests/examples/awful/client/border_color.lua b/tests/examples/awful/client/border_color.lua index 980c9e8c7..bba4f049a 100644 --- a/tests/examples/awful/client/border_color.lua +++ b/tests/examples/awful/client/border_color.lua @@ -29,7 +29,7 @@ client.connect_signal("request::titlebars", function(c)--DOC_HIDE },--DOC_HIDE { -- Middle--DOC_HIDE { -- Title--DOC_HIDE - align = "center",--DOC_HIDE + halign = "center",--DOC_HIDE widget = awful.titlebar.widget.titlewidget(c)--DOC_HIDE },--DOC_HIDE layout = wibox.layout.flex.horizontal--DOC_HIDE diff --git a/tests/examples/awful/client/border_width.lua b/tests/examples/awful/client/border_width.lua index a711d6d59..7abaa94c1 100644 --- a/tests/examples/awful/client/border_width.lua +++ b/tests/examples/awful/client/border_width.lua @@ -29,7 +29,7 @@ client.connect_signal("request::titlebars", function(c) }, { -- Middle { -- Title - align = "center", + halign = "center", widget = awful.titlebar.widget.titlewidget(c) }, layout = wibox.layout.flex.horizontal diff --git a/tests/examples/awful/client/opacity1.lua b/tests/examples/awful/client/opacity1.lua index 3ecdcb72d..9c85fedb6 100644 --- a/tests/examples/awful/client/opacity1.lua +++ b/tests/examples/awful/client/opacity1.lua @@ -29,7 +29,7 @@ client.connect_signal("request::titlebars", function(c) }, { -- Middle { -- Title - align = "center", + halign = "center", widget = awful.titlebar.widget.titlewidget(c) }, layout = wibox.layout.flex.horizontal diff --git a/tests/examples/awful/client/shape1.lua b/tests/examples/awful/client/shape1.lua index c8bf2e37d..b0d497d24 100644 --- a/tests/examples/awful/client/shape1.lua +++ b/tests/examples/awful/client/shape1.lua @@ -33,7 +33,7 @@ client.connect_signal("request::titlebars", function(c) }, { -- Middle { -- Title - align = "center", + halign = "center", widget = awful.titlebar.widget.titlewidget(c) }, layout = wibox.layout.flex.horizontal diff --git a/tests/examples/awful/client/skip_tasklist1.lua b/tests/examples/awful/client/skip_tasklist1.lua index 1b0911bd5..ae0a7a359 100644 --- a/tests/examples/awful/client/skip_tasklist1.lua +++ b/tests/examples/awful/client/skip_tasklist1.lua @@ -29,7 +29,7 @@ client.connect_signal("request::titlebars", function(c) }, { -- Middle { -- Title - align = "center", + halign = "center", widget = awful.titlebar.widget.titlewidget(c) }, layout = wibox.layout.flex.horizontal diff --git a/tests/examples/awful/client/urgent1.lua b/tests/examples/awful/client/urgent1.lua index 6527fb1ba..744203a39 100644 --- a/tests/examples/awful/client/urgent1.lua +++ b/tests/examples/awful/client/urgent1.lua @@ -29,7 +29,7 @@ client.connect_signal("request::titlebars", function(c) }, { -- Middle { -- Title - align = "center", + halign = "center", widget = awful.titlebar.widget.titlewidget(c) }, layout = wibox.layout.flex.horizontal diff --git a/tests/examples/awful/notification/notificationlist/bottombar.lua b/tests/examples/awful/notification/notificationlist/bottombar.lua index 7e16f78c0..6429abf72 100644 --- a/tests/examples/awful/notification/notificationlist/bottombar.lua +++ b/tests/examples/awful/notification/notificationlist/bottombar.lua @@ -79,7 +79,7 @@ beautiful.notification_action_label_only = true --DOC_HIDE { { text = "Dismiss all", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox }, diff --git a/tests/examples/awful/popup/defaultconfig.lua b/tests/examples/awful/popup/defaultconfig.lua index b6c7ba176..81d6f8827 100644 --- a/tests/examples/awful/popup/defaultconfig.lua +++ b/tests/examples/awful/popup/defaultconfig.lua @@ -52,7 +52,7 @@ local function create_info(text, x, y, width, height) { { text = text, - align = "center", + halign = "center", ellipsize = "none", wrap = "word", widget = wibox.widget.textbox diff --git a/tests/examples/awful/popup/wiboxtypes.lua b/tests/examples/awful/popup/wiboxtypes.lua index b36e1604e..4c0777b5f 100644 --- a/tests/examples/awful/popup/wiboxtypes.lua +++ b/tests/examples/awful/popup/wiboxtypes.lua @@ -210,7 +210,7 @@ local function create_info(text, x, y, width, height) { { text = text, - align = "center", + halign = "center", ellipsize = "none", wrap = "word", widget = wibox.widget.textbox diff --git a/tests/examples/awful/template.lua b/tests/examples/awful/template.lua index 5e01691f0..dd7ab4dbd 100644 --- a/tests/examples/awful/template.lua +++ b/tests/examples/awful/template.lua @@ -160,7 +160,7 @@ local function client_widget(c, col, label) l, { text = label or "", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox }, diff --git a/tests/examples/awful/titlebar/constructor.lua b/tests/examples/awful/titlebar/constructor.lua index 687bf97c2..47c67f78e 100644 --- a/tests/examples/awful/titlebar/constructor.lua +++ b/tests/examples/awful/titlebar/constructor.lua @@ -21,7 +21,7 @@ local function setup(bar) bar:setup { awful.titlebar.widget.iconwidget(c), { - align = "center", + halign = "center", widget = awful.titlebar.widget.titlewidget(c) }, { diff --git a/tests/examples/awful/titlebar/default.lua b/tests/examples/awful/titlebar/default.lua index 1ca78a857..cd9d76495 100644 --- a/tests/examples/awful/titlebar/default.lua +++ b/tests/examples/awful/titlebar/default.lua @@ -50,7 +50,7 @@ place.maximize(c, {honor_padding=true, honor_workarea=true}) }, { -- Middle { -- Title - align = "center", + halign = "center", widget = awful.titlebar.widget.titlewidget(c) }, buttons = buttons, diff --git a/tests/examples/awful/titlebar/defaulttitlebar.lua b/tests/examples/awful/titlebar/defaulttitlebar.lua index 2db72c9c4..dc856decb 100644 --- a/tests/examples/awful/titlebar/defaulttitlebar.lua +++ b/tests/examples/awful/titlebar/defaulttitlebar.lua @@ -52,7 +52,7 @@ local function create_info(text, x, y, width, height) { { text = text, - align = "center", + halign = "center", ellipsize = "none", wrap = "word", widget = wibox.widget.textbox @@ -93,7 +93,7 @@ local function create_section(x1, y, x2, text) canvas:add_at(wibox.widget { text = text, - align = "center", + halign = "center", ellipsize = "none", wrap = "word", forced_width = x2-x1, diff --git a/tests/examples/awful/wallpaper/add_screen1.lua b/tests/examples/awful/wallpaper/add_screen1.lua index 570884d9b..6e6ef3ecd 100644 --- a/tests/examples/awful/wallpaper/add_screen1.lua +++ b/tests/examples/awful/wallpaper/add_screen1.lua @@ -36,9 +36,9 @@ require("_default_look") widget = wibox.widget.base.make_widget() }, { - text = "Center", + text = "Center", valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, widget = wibox.layout.stack diff --git a/tests/examples/awful/wallpaper/add_screen2.lua b/tests/examples/awful/wallpaper/add_screen2.lua index b7fead0fe..e2391ec49 100644 --- a/tests/examples/awful/wallpaper/add_screen2.lua +++ b/tests/examples/awful/wallpaper/add_screen2.lua @@ -36,9 +36,9 @@ require("_default_look") widget = wibox.widget.base.make_widget() }, { - text = "Center", + text = "Center", valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, widget = wibox.layout.stack diff --git a/tests/examples/awful/wallpaper/add_screen3.lua b/tests/examples/awful/wallpaper/add_screen3.lua index b46b12ed8..214077fe0 100644 --- a/tests/examples/awful/wallpaper/add_screen3.lua +++ b/tests/examples/awful/wallpaper/add_screen3.lua @@ -37,9 +37,9 @@ require("_default_look") widget = wibox.widget.base.make_widget() }, { - text = "Center", + text = "Center", valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, widget = wibox.layout.stack diff --git a/tests/examples/awful/wallpaper/dpi1.lua b/tests/examples/awful/wallpaper/dpi1.lua index c3e129f3b..889727e38 100644 --- a/tests/examples/awful/wallpaper/dpi1.lua +++ b/tests/examples/awful/wallpaper/dpi1.lua @@ -45,7 +45,7 @@ require("_default_look") --DOC_HIDE_END text = "DPI: " .. dpi, valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, --DOC_HIDE widget = wibox.layout.stack --DOC_HIDE diff --git a/tests/examples/awful/wallpaper/panning_custom.lua b/tests/examples/awful/wallpaper/panning_custom.lua index 4ca2828d4..d136b494f 100644 --- a/tests/examples/awful/wallpaper/panning_custom.lua +++ b/tests/examples/awful/wallpaper/panning_custom.lua @@ -62,9 +62,9 @@ for i=0, 1 do widget = wibox.widget.base.make_widget() }, { - text = "Center", + text = "Center", valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, widget = wibox.layout.stack diff --git a/tests/examples/awful/wallpaper/panning_inner.lua b/tests/examples/awful/wallpaper/panning_inner.lua index f13b585a3..2b821f7e7 100644 --- a/tests/examples/awful/wallpaper/panning_inner.lua +++ b/tests/examples/awful/wallpaper/panning_inner.lua @@ -47,9 +47,9 @@ for i=0, 1 do widget = wibox.widget.base.make_widget() }, { - text = "Center", + text = "Center", valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, widget = wibox.layout.stack diff --git a/tests/examples/awful/wallpaper/panning_inner_horizontal.lua b/tests/examples/awful/wallpaper/panning_inner_horizontal.lua index 5afc86924..ad54c2563 100644 --- a/tests/examples/awful/wallpaper/panning_inner_horizontal.lua +++ b/tests/examples/awful/wallpaper/panning_inner_horizontal.lua @@ -47,9 +47,9 @@ for i=0, 1 do widget = wibox.widget.base.make_widget() }, { - text = "Center", + text = "Center", valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, widget = wibox.layout.stack diff --git a/tests/examples/awful/wallpaper/panning_inner_vertical.lua b/tests/examples/awful/wallpaper/panning_inner_vertical.lua index 75bb9abca..83cf824f0 100644 --- a/tests/examples/awful/wallpaper/panning_inner_vertical.lua +++ b/tests/examples/awful/wallpaper/panning_inner_vertical.lua @@ -47,9 +47,9 @@ for i=0, 1 do widget = wibox.widget.base.make_widget() }, { - text = "Center", + text = "Center", valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, widget = wibox.layout.stack diff --git a/tests/examples/awful/wallpaper/panning_outer.lua b/tests/examples/awful/wallpaper/panning_outer.lua index b1a39850d..ec549850a 100644 --- a/tests/examples/awful/wallpaper/panning_outer.lua +++ b/tests/examples/awful/wallpaper/panning_outer.lua @@ -45,9 +45,9 @@ for i=0, 1 do widget = wibox.widget.base.make_widget() }, { - text = "Center", + text = "Center", valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, widget = wibox.layout.stack diff --git a/tests/examples/awful/wallpaper/remove_screen1.lua b/tests/examples/awful/wallpaper/remove_screen1.lua index 18b97b3fe..bf1db3181 100644 --- a/tests/examples/awful/wallpaper/remove_screen1.lua +++ b/tests/examples/awful/wallpaper/remove_screen1.lua @@ -39,7 +39,7 @@ require("_default_look") { text = "Center", valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, widget = wibox.layout.stack diff --git a/tests/examples/awful/wallpaper/remove_screen2.lua b/tests/examples/awful/wallpaper/remove_screen2.lua index 7dab36b71..fccb00d6b 100644 --- a/tests/examples/awful/wallpaper/remove_screen2.lua +++ b/tests/examples/awful/wallpaper/remove_screen2.lua @@ -39,7 +39,7 @@ require("_default_look") { text = "Center", valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, widget = wibox.layout.stack diff --git a/tests/examples/awful/wallpaper/screens1.lua b/tests/examples/awful/wallpaper/screens1.lua index 6d3b535f5..7569f42d8 100644 --- a/tests/examples/awful/wallpaper/screens1.lua +++ b/tests/examples/awful/wallpaper/screens1.lua @@ -43,7 +43,7 @@ require("_default_look") { text = "Center", valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, widget = wibox.layout.stack diff --git a/tests/examples/awful/wallpaper/widget2.lua b/tests/examples/awful/wallpaper/widget2.lua index adef018ef..0213f0f42 100644 --- a/tests/examples/awful/wallpaper/widget2.lua +++ b/tests/examples/awful/wallpaper/widget2.lua @@ -30,7 +30,7 @@ screen[1]._resize {x = 0, y = 0, width = 320, height = 196} --DOC_HIDE { markup = "[SYSTEM FAILURE]", valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox }, fg = "#00ff00", diff --git a/tests/examples/awful/wallpaper/workarea1.lua b/tests/examples/awful/wallpaper/workarea1.lua index c8f7bd702..f10503498 100644 --- a/tests/examples/awful/wallpaper/workarea1.lua +++ b/tests/examples/awful/wallpaper/workarea1.lua @@ -39,7 +39,7 @@ require("_default_look") { text = "honor_workarea = " .. (s.index == 2 and "true" or "false"), valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, widget = wibox.layout.stack diff --git a/tests/examples/awful/wibar/align.lua b/tests/examples/awful/wibar/align.lua index 4381be485..1c2d6d674 100644 --- a/tests/examples/awful/wibar/align.lua +++ b/tests/examples/awful/wibar/align.lua @@ -22,7 +22,7 @@ for s, align in ipairs { "left", "centered", "right" } do align = align, widget = { text = align, - align = "center", + halign = "center", widget = wibox.widget.textbox }, } diff --git a/tests/examples/awful/wibar/defaultwibar.lua b/tests/examples/awful/wibar/defaultwibar.lua index b4a90af89..a3dd96e7f 100644 --- a/tests/examples/awful/wibar/defaultwibar.lua +++ b/tests/examples/awful/wibar/defaultwibar.lua @@ -43,7 +43,7 @@ local function create_info(text, x, y, width, height) { { text = text, - align = "center", + halign = "center", ellipsize = "none", wrap = "word", widget = wibox.widget.textbox diff --git a/tests/examples/awful/wibar/margins.lua b/tests/examples/awful/wibar/margins.lua index e49ca87b3..3f7cfe164 100644 --- a/tests/examples/awful/wibar/margins.lua +++ b/tests/examples/awful/wibar/margins.lua @@ -40,7 +40,7 @@ for _, c in ipairs {c1, c2} do }, { -- Middle { -- Title - align = "center", + halign = "center", widget = awful.titlebar.widget.titlewidget(c) }, layout = wibox.layout.flex.horizontal @@ -66,7 +66,7 @@ awful.wibar { width = 196, margins = 24, widget = { - align = "center", + halign = "center", text = "unform margins", widget = wibox.widget.textbox } @@ -84,7 +84,7 @@ awful.wibar { bottom = 5 }, widget = { - align = "center", + halign = "center", text = "non unform margins", widget = wibox.widget.textbox } diff --git a/tests/examples/awful/wibar/position.lua b/tests/examples/awful/wibar/position.lua index f017b463b..559d84b34 100644 --- a/tests/examples/awful/wibar/position.lua +++ b/tests/examples/awful/wibar/position.lua @@ -22,7 +22,7 @@ screen[1]._resize {width = 480, height = 196} widget = { { text = position, - align = "center", + halign = "center", widget = wibox.widget.textbox }, direction = (position == "left" or position == "right") and diff --git a/tests/examples/awful/wibar/position2.lua b/tests/examples/awful/wibar/position2.lua index 7ee8df342..47e425b80 100644 --- a/tests/examples/awful/wibar/position2.lua +++ b/tests/examples/awful/wibar/position2.lua @@ -24,7 +24,7 @@ screen[1]._resize {width = 480, height = 196} widget = { { text = position, - align = "center", + halign = "center", widget = wibox.widget.textbox }, direction = (position == "left" or position == "right") and diff --git a/tests/examples/awful/wibar/stretch.lua b/tests/examples/awful/wibar/stretch.lua index 35b5c5f88..b6f1b6f90 100644 --- a/tests/examples/awful/wibar/stretch.lua +++ b/tests/examples/awful/wibar/stretch.lua @@ -16,7 +16,7 @@ awful.wibar { width = 196, widget = { text = "stretched", - align = "center", + halign = "center", widget = wibox.widget.textbox }, } diff --git a/tests/examples/sequences/template.lua b/tests/examples/sequences/template.lua index 719c5f06f..ce2fd8bb1 100644 --- a/tests/examples/sequences/template.lua +++ b/tests/examples/sequences/template.lua @@ -780,7 +780,7 @@ local function wrap_with_arrows(widget) }, { markup = "Code for this sequence", - align = "center", + halign = "center", foced_width = w, widget = wibox.widget.textbox, }, diff --git a/tests/examples/shims/_default_look.lua b/tests/examples/shims/_default_look.lua index 3b0cee76f..b575adea6 100644 --- a/tests/examples/shims/_default_look.lua +++ b/tests/examples/shims/_default_look.lua @@ -67,7 +67,7 @@ for i = 1, screen.count() do }, { -- Middle { -- Title - align = "center", + halign = "center", widget = awful.titlebar.widget.titlewidget(c) }, layout = wibox.layout.flex.horizontal diff --git a/tests/examples/uml/template.lua b/tests/examples/uml/template.lua index 20a2750d5..333659362 100644 --- a/tests/examples/uml/template.lua +++ b/tests/examples/uml/template.lua @@ -21,7 +21,7 @@ local function gen_class(name) { { valign = "center", - align = "center", + halign = "center", markup = ""..name.."", widget = wibox.widget.textbox }, diff --git a/tests/examples/wibox/container/arcchart/bg.lua b/tests/examples/wibox/container/arcchart/bg.lua index bb3c46550..2b323b019 100644 --- a/tests/examples/wibox/container/arcchart/bg.lua +++ b/tests/examples/wibox/container/arcchart/bg.lua @@ -12,7 +12,7 @@ for _, v in ipairs {"", "#00ff00", "#0000ff"} do l:add(wibox.widget { { text = v~="" and v or "nil", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/arcchart/border_width.lua b/tests/examples/wibox/container/arcchart/border_width.lua index ffe863b4b..f94dca29a 100644 --- a/tests/examples/wibox/container/arcchart/border_width.lua +++ b/tests/examples/wibox/container/arcchart/border_width.lua @@ -16,7 +16,7 @@ for _, v in ipairs {0,1,3,6.5} do { { text = v, - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/arcchart/paddings.lua b/tests/examples/wibox/container/arcchart/paddings.lua index d8b704894..6a9ceddfd 100644 --- a/tests/examples/wibox/container/arcchart/paddings.lua +++ b/tests/examples/wibox/container/arcchart/paddings.lua @@ -13,7 +13,7 @@ for _, v in ipairs {0, 2, 4} do { { text = v, - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, @@ -45,7 +45,7 @@ l:add(wibox.widget { { { text = 6, - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/arcchart/start_angle.lua b/tests/examples/wibox/container/arcchart/start_angle.lua index 65c15dad7..e54859eb4 100644 --- a/tests/examples/wibox/container/arcchart/start_angle.lua +++ b/tests/examples/wibox/container/arcchart/start_angle.lua @@ -12,7 +12,7 @@ for _, v in ipairs {0, math.pi/2, math.pi} do l:add(wibox.widget { { text = v, - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/arcchart/thickness.lua b/tests/examples/wibox/container/arcchart/thickness.lua index 8d8ba0d58..e6c0013c5 100644 --- a/tests/examples/wibox/container/arcchart/thickness.lua +++ b/tests/examples/wibox/container/arcchart/thickness.lua @@ -12,7 +12,7 @@ for _, v in ipairs {1,3,7,10} do l:add(wibox.widget { { text = v, - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/defaults/arcchart.lua b/tests/examples/wibox/container/defaults/arcchart.lua index 93d82aa84..fdb3b37fa 100644 --- a/tests/examples/wibox/container/defaults/arcchart.lua +++ b/tests/examples/wibox/container/defaults/arcchart.lua @@ -5,7 +5,7 @@ local beautiful = require("beautiful") return { text = "Before", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, @@ -13,7 +13,7 @@ return { { { text = "After", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/defaults/background.lua b/tests/examples/wibox/container/defaults/background.lua index 75813b71c..744307cab 100644 --- a/tests/examples/wibox/container/defaults/background.lua +++ b/tests/examples/wibox/container/defaults/background.lua @@ -6,14 +6,14 @@ local beautiful = require("beautiful") return { text = "Before", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, { { text = "After", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/defaults/constraint.lua b/tests/examples/wibox/container/defaults/constraint.lua index 4eb13db32..24a1d8200 100644 --- a/tests/examples/wibox/container/defaults/constraint.lua +++ b/tests/examples/wibox/container/defaults/constraint.lua @@ -4,7 +4,7 @@ local wibox = require("wibox") return { text = "Some long text", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, @@ -13,7 +13,7 @@ return { { { text = "Some long text", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/defaults/margin.lua b/tests/examples/wibox/container/defaults/margin.lua index 80dd72c4c..0aac5f7a5 100644 --- a/tests/examples/wibox/container/defaults/margin.lua +++ b/tests/examples/wibox/container/defaults/margin.lua @@ -10,7 +10,7 @@ return { { { text = "Before", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, @@ -33,7 +33,7 @@ return { { { text = "After", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/defaults/mirror.lua b/tests/examples/wibox/container/defaults/mirror.lua index 63770b407..166d50c5c 100644 --- a/tests/examples/wibox/container/defaults/mirror.lua +++ b/tests/examples/wibox/container/defaults/mirror.lua @@ -4,14 +4,14 @@ local wibox = require("wibox") return { text = "Before", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, { { text = "After", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/defaults/only_on_screen.lua b/tests/examples/wibox/container/defaults/only_on_screen.lua index b7de15284..bdf256ffb 100644 --- a/tests/examples/wibox/container/defaults/only_on_screen.lua +++ b/tests/examples/wibox/container/defaults/only_on_screen.lua @@ -5,14 +5,14 @@ local awful = { widget = { only_on_screen = require("awful.widget.only_on_screen return { text = "Before", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, { { text = "After", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/defaults/place.lua b/tests/examples/wibox/container/defaults/place.lua index 2b1f4aa45..ee63fb31f 100644 --- a/tests/examples/wibox/container/defaults/place.lua +++ b/tests/examples/wibox/container/defaults/place.lua @@ -4,7 +4,7 @@ local wibox = require("wibox") return { text = "Before", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, @@ -12,7 +12,7 @@ return { { { text = "After", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/defaults/radialprogressbar.lua b/tests/examples/wibox/container/defaults/radialprogressbar.lua index a9f3c476d..56049db75 100644 --- a/tests/examples/wibox/container/defaults/radialprogressbar.lua +++ b/tests/examples/wibox/container/defaults/radialprogressbar.lua @@ -4,7 +4,7 @@ local wibox = require("wibox") return { text = "Before", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, @@ -13,7 +13,7 @@ return { { { text = "After", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/defaults/rotate.lua b/tests/examples/wibox/container/defaults/rotate.lua index b489ce659..7d7655f8e 100644 --- a/tests/examples/wibox/container/defaults/rotate.lua +++ b/tests/examples/wibox/container/defaults/rotate.lua @@ -4,14 +4,14 @@ local wibox = require("wibox") return { text = "Before", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, { { text = "After", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/defaults/scroll.lua b/tests/examples/wibox/container/defaults/scroll.lua index c191dd5d1..275aae6e8 100644 --- a/tests/examples/wibox/container/defaults/scroll.lua +++ b/tests/examples/wibox/container/defaults/scroll.lua @@ -4,14 +4,14 @@ local wibox = require("wibox") return { text = "Before", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, { { text = "After", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/defaults/tile.lua b/tests/examples/wibox/container/defaults/tile.lua index 9dba4506d..242ec6f0e 100644 --- a/tests/examples/wibox/container/defaults/tile.lua +++ b/tests/examples/wibox/container/defaults/tile.lua @@ -4,7 +4,7 @@ local wibox = require("wibox") return { text = "Before", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, @@ -12,7 +12,7 @@ return { { { text = "After", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/radialprogressbar/border_color.lua b/tests/examples/wibox/container/radialprogressbar/border_color.lua index 07dab0679..6a8bcc16c 100644 --- a/tests/examples/wibox/container/radialprogressbar/border_color.lua +++ b/tests/examples/wibox/container/radialprogressbar/border_color.lua @@ -7,7 +7,7 @@ local function gen(val) return wibox.widget { { text = "Value: "..val, - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/radialprogressbar/border_width.lua b/tests/examples/wibox/container/radialprogressbar/border_width.lua index b7db0b6e8..09947dcf1 100644 --- a/tests/examples/wibox/container/radialprogressbar/border_width.lua +++ b/tests/examples/wibox/container/radialprogressbar/border_width.lua @@ -7,7 +7,7 @@ local function gen(val) return wibox.widget { { text = "Value: "..val, - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/radialprogressbar/color.lua b/tests/examples/wibox/container/radialprogressbar/color.lua index a387d2d82..f58fe0f20 100644 --- a/tests/examples/wibox/container/radialprogressbar/color.lua +++ b/tests/examples/wibox/container/radialprogressbar/color.lua @@ -7,7 +7,7 @@ local function gen(val) return wibox.widget { { text = "Value: "..val, - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/radialprogressbar/padding.lua b/tests/examples/wibox/container/radialprogressbar/padding.lua index e120bdda1..122d16c7d 100644 --- a/tests/examples/wibox/container/radialprogressbar/padding.lua +++ b/tests/examples/wibox/container/radialprogressbar/padding.lua @@ -9,7 +9,7 @@ local function gen(val) { { text = "Value: "..val, - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/radialprogressbar/value.lua b/tests/examples/wibox/container/radialprogressbar/value.lua index 932ab0742..f1f70b215 100644 --- a/tests/examples/wibox/container/radialprogressbar/value.lua +++ b/tests/examples/wibox/container/radialprogressbar/value.lua @@ -7,7 +7,7 @@ local function gen(val) return wibox.widget { { text = "Value: "..(val*100).."%", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox, }, diff --git a/tests/examples/wibox/container/rotate/angle.lua b/tests/examples/wibox/container/rotate/angle.lua index 7deee84c7..3802a9c9c 100644 --- a/tests/examples/wibox/container/rotate/angle.lua +++ b/tests/examples/wibox/container/rotate/angle.lua @@ -9,7 +9,7 @@ local function create_arrow(text) --DOC_HIDE { --DOC_HIDE { --DOC_HIDE text = text, --DOC_HIDE - align = "center", --DOC_HIDE + halign = "center", --DOC_HIDE valign = "center", --DOC_HIDE widget = wibox.widget.textbox, --DOC_HIDE }, --DOC_HIDE diff --git a/tests/examples/wibox/layout/template.lua b/tests/examples/wibox/layout/template.lua index 61b8a00f5..6461bb070 100644 --- a/tests/examples/wibox/layout/template.lua +++ b/tests/examples/wibox/layout/template.lua @@ -23,7 +23,7 @@ local function generic_widget(text, col, margins) }, { id = "text", - align = "center", + halign = "center", valign = "center", text = text or "foobar", widget = wibox.widget.textbox diff --git a/tests/examples/wibox/nwidget/default.lua b/tests/examples/wibox/nwidget/default.lua index 71b807967..0d9d878be 100644 --- a/tests/examples/wibox/nwidget/default.lua +++ b/tests/examples/wibox/nwidget/default.lua @@ -50,7 +50,7 @@ local function create_info(text, x, y, width, height) { { text = text, - align = "center", + halign = "center", ellipsize = "none", wrap = "word", widget = wibox.widget.textbox diff --git a/tests/examples/wibox/nwidget/rules/widget_template.lua b/tests/examples/wibox/nwidget/rules/widget_template.lua index 44315ca91..d2d00d1f5 100644 --- a/tests/examples/wibox/nwidget/rules/widget_template.lua +++ b/tests/examples/wibox/nwidget/rules/widget_template.lua @@ -25,11 +25,11 @@ beautiful.notification_bg = beautiful.bg_normal --DOC_HIDE widget = wibox.container.place }, { - align = "center", + halign = "center", widget = naughty.widget.title, }, { - align = "center", + halign = "center", widget = naughty.widget.message, }, { diff --git a/tests/examples/wibox/widget/calendar/month.lua b/tests/examples/wibox/widget/calendar/month.lua index 60162b44a..5849c7efe 100644 --- a/tests/examples/wibox/widget/calendar/month.lua +++ b/tests/examples/wibox/widget/calendar/month.lua @@ -20,7 +20,7 @@ local date = os.date("*t") --DOC_HIDE { { text = '{day='..date.day..', month='..date.month..',\n year='..date.year..'}', - align = 'center', + halign = 'center', widget = wibox.widget.textbox }, border_width = 2, @@ -35,7 +35,7 @@ local date = os.date("*t") --DOC_HIDE { { text = '{month='..date.month..',\n year='..date.year..'}', - align = 'center', + halign = 'center', widget = wibox.widget.textbox }, border_width = 2, diff --git a/tests/examples/wibox/widget/defaults/textbox.lua b/tests/examples/wibox/widget/defaults/textbox.lua index 99311fa74..53dbfd7a8 100644 --- a/tests/examples/wibox/widget/defaults/textbox.lua +++ b/tests/examples/wibox/widget/defaults/textbox.lua @@ -6,7 +6,7 @@ parent:add( --DOC_HIDE wibox.widget{ markup = "This is a textbox!!!", - align = "center", + halign = "center", valign = "center", widget = wibox.widget.textbox } diff --git a/tests/examples/wibox/widget/progressbar/background_color.lua b/tests/examples/wibox/widget/progressbar/background_color.lua index a859a9021..60239cd0f 100644 --- a/tests/examples/wibox/widget/progressbar/background_color.lua +++ b/tests/examples/wibox/widget/progressbar/background_color.lua @@ -20,7 +20,7 @@ for _, color in ipairs { {nil}, {"#ff0000"}, {"#00ff00"}, {"#0000ff44"} } do pb, { text = color[1] and '"'..color[1]..'"' or "nil", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, diff --git a/tests/examples/wibox/widget/progressbar/bar_border_color.lua b/tests/examples/wibox/widget/progressbar/bar_border_color.lua index 8cd5d1836..3349bd29c 100644 --- a/tests/examples/wibox/widget/progressbar/bar_border_color.lua +++ b/tests/examples/wibox/widget/progressbar/bar_border_color.lua @@ -21,7 +21,7 @@ for _, color in ipairs { {nil}, {"#ff0000"}, {"#00ff00"}, {"#0000ff44"} } do pb, { text = color[1] and '"'..color[1]..'"' or "nil", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, diff --git a/tests/examples/wibox/widget/progressbar/bar_border_width.lua b/tests/examples/wibox/widget/progressbar/bar_border_width.lua index 4cd31ff77..0c6e01dd4 100644 --- a/tests/examples/wibox/widget/progressbar/bar_border_width.lua +++ b/tests/examples/wibox/widget/progressbar/bar_border_width.lua @@ -21,7 +21,7 @@ for _, width in ipairs { 0, 2, 4, 6 } do pb, { text = width, - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, diff --git a/tests/examples/wibox/widget/progressbar/border_color.lua b/tests/examples/wibox/widget/progressbar/border_color.lua index 8d9b22a07..82273c8f5 100644 --- a/tests/examples/wibox/widget/progressbar/border_color.lua +++ b/tests/examples/wibox/widget/progressbar/border_color.lua @@ -21,7 +21,7 @@ for _, color in ipairs { {nil}, {"#ff0000"}, {"#00ff00"}, {"#0000ff44"} } do pb, { text = color[1] and '"'..color[1]..'"' or "nil", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, diff --git a/tests/examples/wibox/widget/progressbar/border_width.lua b/tests/examples/wibox/widget/progressbar/border_width.lua index a31ae14e2..d735b0176 100644 --- a/tests/examples/wibox/widget/progressbar/border_width.lua +++ b/tests/examples/wibox/widget/progressbar/border_width.lua @@ -21,7 +21,7 @@ for _, width in ipairs { 0, 2, 4, 6 } do pb, { text = width, - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, diff --git a/tests/examples/wibox/widget/progressbar/color.lua b/tests/examples/wibox/widget/progressbar/color.lua index 624f5b1bc..45a44a092 100644 --- a/tests/examples/wibox/widget/progressbar/color.lua +++ b/tests/examples/wibox/widget/progressbar/color.lua @@ -20,7 +20,7 @@ for _, color in ipairs { {nil}, {"#ff0000"}, {"#00ff00"}, {"#0000ff44"} } do pb, { text = color[1] and '"'..color[1]..'"' or "nil", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, diff --git a/tests/examples/wibox/widget/progressbar/margins1.lua b/tests/examples/wibox/widget/progressbar/margins1.lua index e6b911461..4c72d2f8d 100644 --- a/tests/examples/wibox/widget/progressbar/margins1.lua +++ b/tests/examples/wibox/widget/progressbar/margins1.lua @@ -20,7 +20,7 @@ for _, margin in ipairs { 0, 2, 4, 6 } do pb, { text = margin, - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, diff --git a/tests/examples/wibox/widget/progressbar/max_value.lua b/tests/examples/wibox/widget/progressbar/max_value.lua index 09777e463..5a41ef5a6 100644 --- a/tests/examples/wibox/widget/progressbar/max_value.lua +++ b/tests/examples/wibox/widget/progressbar/max_value.lua @@ -20,7 +20,7 @@ for _, value in ipairs { 0, 10, 42, 999 } do pb, { text = value.."/42", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, diff --git a/tests/examples/wibox/widget/progressbar/paddings1.lua b/tests/examples/wibox/widget/progressbar/paddings1.lua index 1395598ec..aa2dd9ab3 100644 --- a/tests/examples/wibox/widget/progressbar/paddings1.lua +++ b/tests/examples/wibox/widget/progressbar/paddings1.lua @@ -20,7 +20,7 @@ for _, padding in ipairs { 0, 2, 4, 6 } do pb, { text = padding, - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, diff --git a/tests/examples/wibox/widget/progressbar/text.lua b/tests/examples/wibox/widget/progressbar/text.lua index 92b5c7a6a..f38577a45 100644 --- a/tests/examples/wibox/widget/progressbar/text.lua +++ b/tests/examples/wibox/widget/progressbar/text.lua @@ -19,7 +19,7 @@ parent:add( --DOC_HIDE { text = "50%", valign = "center", - align = "center", + halign = "center", widget = wibox.widget.textbox, }, layout = wibox.layout.stack diff --git a/tests/examples/wibox/widget/progressbar/ticks.lua b/tests/examples/wibox/widget/progressbar/ticks.lua index 2f86c40bb..4e6013776 100644 --- a/tests/examples/wibox/widget/progressbar/ticks.lua +++ b/tests/examples/wibox/widget/progressbar/ticks.lua @@ -21,7 +21,7 @@ for _, has_ticks in ipairs { true, false } do pb, { text = tostring(has_ticks), - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, diff --git a/tests/examples/wibox/widget/progressbar/ticks_gap.lua b/tests/examples/wibox/widget/progressbar/ticks_gap.lua index 5af4d5d5f..432f4d260 100644 --- a/tests/examples/wibox/widget/progressbar/ticks_gap.lua +++ b/tests/examples/wibox/widget/progressbar/ticks_gap.lua @@ -22,7 +22,7 @@ for _, gap in ipairs { 0, 2, 4, 6 } do pb, { text = gap, - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, diff --git a/tests/examples/wibox/widget/progressbar/ticks_size.lua b/tests/examples/wibox/widget/progressbar/ticks_size.lua index a290f9bbd..d4f48af5e 100644 --- a/tests/examples/wibox/widget/progressbar/ticks_size.lua +++ b/tests/examples/wibox/widget/progressbar/ticks_size.lua @@ -22,7 +22,7 @@ l.spacing = 5 pb, { text = size, - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, diff --git a/tests/examples/wibox/widget/progressbar/ticks_size2.lua b/tests/examples/wibox/widget/progressbar/ticks_size2.lua index a2c7ca999..d090593d3 100644 --- a/tests/examples/wibox/widget/progressbar/ticks_size2.lua +++ b/tests/examples/wibox/widget/progressbar/ticks_size2.lua @@ -74,7 +74,7 @@ l3.spacing = 5 pb, { text = size, - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, @@ -85,7 +85,7 @@ l3.spacing = 5 pb3, { text = size, - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, @@ -100,7 +100,7 @@ l3.spacing = 5 { { text = size, - align = "center", + halign = "center", widget = wibox.widget.textbox, }, margins = 4, @@ -110,7 +110,7 @@ l3.spacing = 5 shape = gears.shape.circle, widget = wibox.container.background, }, - align = "center", + halign = "center", valign = "center", widget = wibox.container.place, }, diff --git a/tests/examples/wibox/widget/progressbar/value.lua b/tests/examples/wibox/widget/progressbar/value.lua index aa9b3c157..57c3f5ac9 100644 --- a/tests/examples/wibox/widget/progressbar/value.lua +++ b/tests/examples/wibox/widget/progressbar/value.lua @@ -19,7 +19,7 @@ for _, value in ipairs { 0, 0.2, 0.5, 1 } do pb, { text = value, - align = "center", + halign = "center", widget = wibox.widget.textbox, }, forced_height = 30, diff --git a/tests/examples/wibox/widget/textbox/align1.lua b/tests/examples/wibox/widget/textbox/align1.lua index eed14099c..2822ca85c 100644 --- a/tests/examples/wibox/widget/textbox/align1.lua +++ b/tests/examples/wibox/widget/textbox/align1.lua @@ -8,7 +8,7 @@ local ret = wibox.layout.fixed.vertical() --DOC_HIDE_END for _, align in ipairs {"left", "center", "right"} do local w = wibox.widget { - align = align, + halign = align, text = "some text", widget = wibox.widget.textbox, } diff --git a/tests/test-leak-client.lua b/tests/test-leak-client.lua index 89e86558a..7305ea7f3 100644 --- a/tests/test-leak-client.lua +++ b/tests/test-leak-client.lua @@ -39,7 +39,7 @@ local function create_titlebar(c) -- The title goes in the middle parts.title = awful.titlebar.widget.titlewidget(c) - parts.title:set_align("center") + parts.title:set_halign("center") local middle_layout = wibox.layout.flex.horizontal(parts.title) middle_layout.buttons = buttons