Fix tooltip.set_geometry: provide textbox context
Closes https://github.com/awesomeWM/awesome/pull/467.
This commit is contained in:
parent
f2e554de91
commit
7cbf3e8bee
|
@ -82,8 +82,9 @@ end
|
||||||
-- @tparam tooltip self A tooltip object.
|
-- @tparam tooltip self A tooltip object.
|
||||||
local function set_geometry(self)
|
local function set_geometry(self)
|
||||||
local my_geo = self.wibox:geometry()
|
local my_geo = self.wibox:geometry()
|
||||||
|
local textbox_context = {dpi=beautiful.xresources.get_dpi(mouse.screen)}
|
||||||
-- calculate width / height
|
-- calculate width / height
|
||||||
local n_w, n_h = self.textbox:fit(nil, -1, -1) -- Hack! :(
|
local n_w, n_h = self.textbox:fit(textbox_context, -1, -1) -- Hack! :(
|
||||||
n_w = n_w + self.marginbox.left + self.marginbox.right
|
n_w = n_w + self.marginbox.left + self.marginbox.right
|
||||||
n_h = n_h + self.marginbox.top + self.marginbox.bottom
|
n_h = n_h + self.marginbox.top + self.marginbox.bottom
|
||||||
if my_geo.width ~= n_w or my_geo.height ~= n_h then
|
if my_geo.width ~= n_w or my_geo.height ~= n_h then
|
||||||
|
|
Loading…
Reference in New Issue