From e8f79dccee3db6b058463253197de9f2d1b74bea Mon Sep 17 00:00:00 2001 From: streetturtle Date: Thu, 12 Dec 2019 22:27:43 -0500 Subject: Comment which may improve widget position --- gerrit-widget/gerrit.lua | 8 ++++++++ jira-widget/jira.lua | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/gerrit-widget/gerrit.lua b/gerrit-widget/gerrit.lua index a404b4c..af3879b 100644 --- a/gerrit-widget/gerrit.lua +++ b/gerrit-widget/gerrit.lua @@ -204,6 +204,14 @@ local function worker(args) if popup.visible then popup.visible = not popup.visible else + --local geo = mouse.current_widget_geometry + --if theme.calendar_placement == 'center' then + -- local x = geo.x + (geo.width / 2) - (popup:geometry().width / 2) -- align two widgets + -- popup:move_next_to({x = x, y = geo.y + 22, width = 0, height = geo.height}) + --else + -- popup:move_next_to(geo) + --end + popup:move_next_to(mouse.current_widget_geometry) end end) diff --git a/jira-widget/jira.lua b/jira-widget/jira.lua index 2722355..158db7c 100644 --- a/jira-widget/jira.lua +++ b/jira-widget/jira.lua @@ -171,6 +171,14 @@ local function worker(args) if popup.visible then popup.visible = not popup.visible else + --local geo = mouse.current_widget_geometry + --if theme.calendar_placement == 'center' then + -- local x = geo.x + (geo.width / 2) - (popup:geometry().width / 2) -- align two widgets + -- popup:move_next_to({x = x, y = geo.y + 22, width = 0, height = geo.height}) + --else + -- popup:move_next_to(geo) + --end + popup:move_next_to(mouse.current_widget_geometry) end end) -- cgit v1.2.3