wibar: Fix with width and height beautiful properties (#1826)
There was code that always set the values. The fallback was never executed. Fix #1824
This commit is contained in:
parent
35c3cb7ee0
commit
1a5d9d09fd
|
@ -379,7 +379,8 @@ function awfulwibar.new(arg)
|
||||||
|
|
||||||
-- Set default size
|
-- Set default size
|
||||||
if position == "left" or position == "right" then
|
if position == "left" or position == "right" then
|
||||||
arg.width = arg.width or math.ceil(beautiful.get_font_height(arg.font) * 1.5)
|
arg.width = arg.width or beautiful["wibar_width"]
|
||||||
|
or math.ceil(beautiful.get_font_height(arg.font) * 1.5)
|
||||||
if arg.height then
|
if arg.height then
|
||||||
has_to_stretch = false
|
has_to_stretch = false
|
||||||
if arg.screen then
|
if arg.screen then
|
||||||
|
@ -390,7 +391,8 @@ function awfulwibar.new(arg)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
arg.height = arg.height or math.ceil(beautiful.get_font_height(arg.font) * 1.5)
|
arg.height = arg.height or beautiful["wibar_height"]
|
||||||
|
or math.ceil(beautiful.get_font_height(arg.font) * 1.5)
|
||||||
if arg.width then
|
if arg.width then
|
||||||
has_to_stretch = false
|
has_to_stretch = false
|
||||||
if arg.screen then
|
if arg.screen then
|
||||||
|
@ -407,7 +409,7 @@ function awfulwibar.new(arg)
|
||||||
-- The C code scans the table directly, so metatable magic cannot be used.
|
-- The C code scans the table directly, so metatable magic cannot be used.
|
||||||
for _, prop in ipairs {
|
for _, prop in ipairs {
|
||||||
"border_width", "border_color", "font", "opacity", "ontop", "cursor",
|
"border_width", "border_color", "font", "opacity", "ontop", "cursor",
|
||||||
"height", "width", "bgimage", "bg", "fg", "type", "stretch", "shape"
|
"bgimage", "bg", "fg", "type", "stretch", "shape"
|
||||||
} do
|
} do
|
||||||
if (arg[prop] == nil) and beautiful["wibar_"..prop] ~= nil then
|
if (arg[prop] == nil) and beautiful["wibar_"..prop] ~= nil then
|
||||||
arg[prop] = beautiful["wibar_"..prop]
|
arg[prop] = beautiful["wibar_"..prop]
|
||||||
|
|
Loading…
Reference in New Issue