background: Update all users so they don't use the deprecated name.

This is done before deprecating the API so no commit ever use the
deprecated name.
This commit is contained in:
Emmanuel Lepage Vallee 2019-04-05 16:52:01 -04:00
parent 81ff4d730c
commit eb1c45b656
11 changed files with 85 additions and 95 deletions

View File

@ -465,7 +465,7 @@ end
-- @param number -- @param number
function tooltip:set_border_width(val) function tooltip:set_border_width(val)
self.widget.shape_border_width = val self.widget.border_width = val
end end
--- The border color. --- The border color.
@ -476,7 +476,7 @@ end
-- @param gears.color -- @param gears.color
function tooltip:set_border_color(val) function tooltip:set_border_color(val)
self.widget.shape_border_color = val self.widget.border_color = val
end end
--- Set the margins around the left and right of the tooltip textbox --- Set the margins around the left and right of the tooltip textbox
@ -679,23 +679,23 @@ function tooltip.new(args)
self.widget = wibox.widget { self.widget = wibox.widget {
{ {
{ {
id = 'text_role', id = 'text_role',
font = font, font = font,
widget = wibox.widget.textbox, widget = wibox.widget.textbox,
}, },
id = 'margin_role', id = 'margin_role',
left = m_lr, left = m_lr,
right = m_lr, right = m_lr,
top = m_tb, top = m_tb,
bottom = m_tb, bottom = m_tb,
widget = wibox.container.margin, widget = wibox.container.margin,
}, },
id = 'background_role', id = 'background_role',
bg = bg, bg = bg,
shape = self._private.shape, shape = self._private.shape,
shape_border_width = border_width, border_width = border_width,
shape_border_color = border_color, border_color = border_color,
widget = wibox.container.background, widget = wibox.container.background,
} }
self.textbox = self.widget:get_children_by_id('text_role')[1] self.textbox = self.widget:get_children_by_id('text_role')[1]
self.marginbox = self.widget:get_children_by_id('margin_role')[1] self.marginbox = self.widget:get_children_by_id('margin_role')[1]

View File

@ -39,14 +39,12 @@ local calendar_popup = { offset = 0, mt = {} }
local properties = { "markup", "fg_color", "bg_color", "shape", "padding", "border_width", "border_color", "opacity" } local properties = { "markup", "fg_color", "bg_color", "shape", "padding", "border_width", "border_color", "opacity" }
local styles = { "year", "month", "yearheader", "monthheader", "header", "weekday", "weeknumber", "normal", "focus" } local styles = { "year", "month", "yearheader", "monthheader", "header", "weekday", "weeknumber", "normal", "focus" }
--- The generic calendar style table. --- The generic calendar style table.
-- --
-- Each table property can also be defined by `beautiful.calendar_[flag]_[property]=val`. -- Each table property can also be defined by `beautiful.calendar_[flag]_[property]=val`.
-- @beautiful beautiful.calendar_style -- @beautiful beautiful.calendar_style
-- @tparam cell_properties table Table of cell style properties -- @tparam cell_properties table Table of cell style properties
--- Cell properties. --- Cell properties.
-- @field markup Markup function or format string -- @field markup Markup function or format string
-- @field fg_color Text foreground color -- @field fg_color Text foreground color
@ -69,8 +67,6 @@ local styles = { "year", "month", "yearheader", "monthheader", "header", "weekda
-- @field focus Current day cell properties table -- @field focus Current day cell properties table
-- @table cell_flags -- @table cell_flags
--- Create a container for the grid layout --- Create a container for the grid layout
-- @tparam table tprops Table of calendar container properties. -- @tparam table tprops Table of calendar container properties.
-- @treturn function Embedding function widget,flag,date -> widget -- @treturn function Embedding function widget,flag,date -> widget
@ -98,20 +94,19 @@ local function embed(tprops)
margins = props.padding + props.border_width, margins = props.padding + props.border_width,
widget = wibox.container.margin widget = wibox.container.margin
}, },
shape = props.shape or gears.shape.rectangle, shape = props.shape or gears.shape.rectangle,
shape_border_color = props.border_color, border_color = props.border_color,
shape_border_width = props.border_width, border_width = props.border_width,
fg = props.fg_color, fg = props.fg_color,
bg = props.bg_color, bg = props.bg_color,
opacity = props.opacity, opacity = props.opacity,
widget = wibox.container.background widget = wibox.container.background
} }
return out return out
end end
return fn return fn
end end
--- Parse the properties of the cell type and set default values --- Parse the properties of the cell type and set default values
-- @tparam string cell The cell type -- @tparam string cell The cell type
-- @tparam table args Table of properties to enforce -- @tparam table args Table of properties to enforce
@ -165,7 +160,6 @@ local function parse_all_options(args)
return props return props
end end
--- Make the geometry of a wibox --- Make the geometry of a wibox
-- @tparam widget widget Calendar widget -- @tparam widget widget Calendar widget
-- @tparam object screen Screen where to display the calendar (default to focused) -- @tparam object screen Screen where to display the calendar (default to focused)
@ -236,14 +230,12 @@ function calendar_popup:call_calendar(offset, position, screen)
return self return self
end end
--- Toggle calendar visibility --- Toggle calendar visibility
function calendar_popup:toggle() function calendar_popup:toggle()
self:call_calendar(0) self:call_calendar(0)
self.visible = not self.visible self.visible = not self.visible
end end
--- Attach the calendar to a widget to display at a specific position. --- Attach the calendar to a widget to display at a specific position.
-- --
-- local mytextclock = wibox.widget.textclock() -- local mytextclock = wibox.widget.textclock()
@ -286,7 +278,6 @@ function calendar_popup:attach(widget, position, args)
return self return self
end end
--- Return a new calendar wibox by type. --- Return a new calendar wibox by type.
-- --
-- A calendar widget displaying a `month` or a `year` -- A calendar widget displaying a `month` or a `year`
@ -385,7 +376,6 @@ function calendar_popup.month(args)
return get_cal_wibox("month", args) return get_cal_wibox("month", args)
end end
--- A year calendar wibox. --- A year calendar wibox.
-- --
-- It is highly customizable using the same options as for the widgets. -- It is highly customizable using the same options as for the widgets.

View File

@ -148,9 +148,9 @@ function common.list_update(w, buttons, label, data, objects, args)
}) })
end end
cache.bgb.shape = item_args.shape cache.bgb.shape = item_args.shape
cache.bgb.shape_border_width = item_args.shape_border_width cache.bgb.border_width = item_args.shape_border_width
cache.bgb.shape_border_color = item_args.shape_border_color cache.bgb.border_color = item_args.shape_border_color
end end

View File

@ -198,8 +198,8 @@ local function create_info(text, x, y, width, height)
forced_width = width, forced_width = width,
forced_height = height, forced_height = height,
shape = gears.shape.rectangle, shape = gears.shape.rectangle,
shape_border_width = 1, border_width = 1,
shape_border_color = beautiful.border_color, border_color = beautiful.border_color,
bg = "#ffff0055", bg = "#ffff0055",
widget = wibox.container.background widget = wibox.container.background
}, {x = x, y = y}) }, {x = x, y = y})

View File

@ -141,12 +141,12 @@ local function client_widget(c, col, label)
}, },
layout = wibox.layout.stack layout = wibox.layout.stack
}, },
shape_border_width = bw, border_width = bw,
shape_border_color = beautiful.border_color, border_color = beautiful.border_color,
shape_clip = true, shape_clip = true,
fg = beautiful.fg_normal or "#000000", fg = beautiful.fg_normal or "#000000",
bg = col, bg = col,
shape = function(cr2, w, h) shape = function(cr2, w, h)
return shape.rounded_rect(cr2, w, h, args.radius or 5) return shape.rounded_rect(cr2, w, h, args.radius or 5)
end, end,

View File

@ -26,9 +26,9 @@ end --DOC_HIDE
filter = awful.widget.tasklist.filter.currenttags, filter = awful.widget.tasklist.filter.currenttags,
buttons = tasklist_buttons, buttons = tasklist_buttons,
style = { style = {
shape_border_width = 1, border_width = 1,
shape_border_color = "#777777", border_color = "#777777",
shape = gears.shape.rounded_bar, shape = gears.shape.rounded_bar,
}, },
layout = { layout = {
spacing = 10, spacing = 10,

View File

@ -30,11 +30,11 @@ parent : setup {
bottom = 3, bottom = 3,
widget = wibox.container.margin widget = wibox.container.margin
}, },
shape = gears.shape.hexagon, shape = gears.shape.hexagon,
bg = beautiful.bg_normal, bg = beautiful.bg_normal,
shape_border_color = beautiful.border_color, border_color = beautiful.border_color,
shape_border_width = beautiful.border_width, border_width = beautiful.border_width,
widget = wibox.container.background widget = wibox.container.background
}, },
spacing = 10, spacing = 10,
layout = wibox.layout.fixed.vertical layout = wibox.layout.fixed.vertical

View File

@ -17,11 +17,11 @@ return {
valign = "center", valign = "center",
widget = wibox.widget.textbox, widget = wibox.widget.textbox,
}, },
shape = gears.shape.circle, shape = gears.shape.circle,
shape_border_width = 5, border_width = 5,
shape_border_color = "#ff0000", border_color = "#ff0000",
bg = beautiful.bg_highlight, bg = beautiful.bg_highlight,
widget = wibox.container.background widget = wibox.container.background
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 --DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -13,10 +13,10 @@ local container = wibox.widget {
{ {
{ {
before, before,
shape_border_color = beautiful.border_color, border_color = beautiful.border_color,
shape_border_width = beautiful.border_width, border_width = beautiful.border_width,
shape = shape.rounded_rect, shape = shape.rounded_rect,
widget = wibox.container.background, widget = wibox.container.background,
}, },
strategy = 'exact', strategy = 'exact',
width = 70, width = 70,
@ -29,11 +29,11 @@ local container = wibox.widget {
text = " ", text = " ",
widget = wibox.widget.textbox, widget = wibox.widget.textbox,
}, },
bg = beautiful.bg_normal, bg = beautiful.bg_normal,
shape_border_color = beautiful.border_color, border_color = beautiful.border_color,
shape_border_width = beautiful.border_width, border_width = beautiful.border_width,
widget = wibox.container.background, widget = wibox.container.background,
shape = shape.transform(shape.arrow) shape = shape.transform(shape.arrow)
: rotate_at(15,15,math.pi/2) : rotate_at(15,15,math.pi/2)
: translate(0,-8) : translate(0,-8)
: scale(0.9, 0.9), : scale(0.9, 0.9),
@ -46,10 +46,10 @@ local container = wibox.widget {
{ {
{ {
after, after,
shape_border_color = beautiful.border_color, border_color = beautiful.border_color,
shape_border_width = beautiful.border_width, border_width = beautiful.border_width,
shape = shape.rounded_rect, shape = shape.rounded_rect,
widget = wibox.container.background, widget = wibox.container.background,
}, },
strategy = 'exact', strategy = 'exact',
width = 70, width = 70,

View File

@ -4,27 +4,27 @@ local wibox = require("wibox") --DOC_HIDE
local gears = {shape = require("gears.shape")} --DOC_HIDE local gears = {shape = require("gears.shape")} --DOC_HIDE
local beautiful = require("beautiful") --DOC_HIDE local beautiful = require("beautiful") --DOC_HIDE
local function create_arrow(text) --DOC_HIDE local function create_arrow(text) --DOC_HIDE
return { --DOC_HIDE return { --DOC_HIDE
{ --DOC_HIDE { --DOC_HIDE
{ --DOC_HIDE { --DOC_HIDE
text = text, --DOC_HIDE text = text, --DOC_HIDE
align = "center", --DOC_HIDE align = "center", --DOC_HIDE
valign = "center", --DOC_HIDE valign = "center", --DOC_HIDE
widget = wibox.widget.textbox, --DOC_HIDE widget = wibox.widget.textbox, --DOC_HIDE
}, --DOC_HIDE }, --DOC_HIDE
shape = gears.shape.arrow, --DOC_HIDE shape = gears.shape.arrow, --DOC_HIDE
bg = beautiful.bg_normal, --DOC_HIDE bg = beautiful.bg_normal, --DOC_HIDE
shape_border_color = beautiful.border_color, --DOC_HIDE border_color = beautiful.border_color, --DOC_HIDE
shape_border_width = beautiful.border_width, --DOC_HIDE border_width = beautiful.border_width, --DOC_HIDE
widget = wibox.container.background --DOC_HIDE widget = wibox.container.background --DOC_HIDE
}, --DOC_HIDE }, --DOC_HIDE
strategy = 'exact', --DOC_HIDE strategy = 'exact', --DOC_HIDE
width = 70, --DOC_HIDE width = 70, --DOC_HIDE
height = 70, --DOC_HIDE height = 70, --DOC_HIDE
widget = wibox.container.constraint --DOC_HIDE widget = wibox.container.constraint --DOC_HIDE
} --DOC_HIDE } --DOC_HIDE
end --DOC_HIDE end --DOC_HIDE
local normal = create_arrow("Normal") local normal = create_arrow("Normal")

View File

@ -67,12 +67,12 @@ beautiful.bg_focus = "#b9214f" --DOC_HIDE
margins = (props.padding or 2) + (props.border_width or 0), margins = (props.padding or 2) + (props.border_width or 0),
widget = wibox.container.margin widget = wibox.container.margin
}, },
shape = props.shape, shape = props.shape,
shape_border_color = props.border_color or "#b9214f", border_color = props.border_color or "#b9214f",
shape_border_width = props.border_width or 0, border_width = props.border_width or 0,
fg = props.fg_color or "#999999", fg = props.fg_color or "#999999",
bg = props.bg_color or default_bg, bg = props.bg_color or default_bg,
widget = wibox.container.background widget = wibox.container.background
} }
return ret return ret
end end