Fixed tagindicator bugs

master
Mark 2022-07-16 18:00:46 -07:00
parent ea62dabfc1
commit 9548bfc9b2
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
4 changed files with 15 additions and 7 deletions

View File

@ -1,3 +1,5 @@
local layoutmanager = require("core.layouts.layoutmanager")
local make = function(screen) local make = function(screen)
local widget local widget

View File

@ -210,7 +210,7 @@ local function start()
desktop.widgets.launcher, desktop.widgets.launcher,
desktop.widgets.space(18), desktop.widgets.space(18),
s.tagger.widget, s.tagger.widget.widget,
make_layoutbox(s), make_layoutbox(s),
s.shortcuts, s.shortcuts,

View File

@ -1,9 +1,15 @@
-- Tag grid manager -- Tag grid manager
local widget = require("core.tagger.widget") local make_widget = require("core.tagger.widget")
local layoutmanager = require("core.layouts.layoutmanager")
local Tagger = { local Tagger = {
screen = nil, rows = 2, cols = 4 rows = 2,
cols = 4,
-- Defined per-instance
screen = nil,
widget = nil,
} }
Tagger.__index = Tagger Tagger.__index = Tagger
@ -29,7 +35,7 @@ function Tagger:new(screen)
end end
end end
t.widget = widget(t) t.widget = make_widget(t)
return t return t
end end

View File

@ -1,4 +1,4 @@
local make = function(tagger) local function make(tagger)
local widget = {} local widget = {}
-- Create tag tagindicators -- Create tag tagindicators
@ -53,11 +53,11 @@ local make = function(tagger)
-- Change background when mouse is over widget -- Change background when mouse is over widget
widget.widget:connect_signal("mouse::enter", function(result) widget.widget:connect_signal("mouse::enter", function(result)
widget.bg = beautiful.color.bar.hover_bg widget.widget.bg = beautiful.color.bar.hover_bg
end) end)
widget.widget:connect_signal("mouse::leave", function(result) widget.widget:connect_signal("mouse::leave", function(result)
widget.bg = beautiful.color.transparent widget.widget.bg = beautiful.color.transparent
end) end)
return widget return widget