Added test popup
parent
6c2443a79c
commit
3c3d12f7d1
|
@ -114,12 +114,39 @@ function P:new()
|
|||
}
|
||||
|
||||
|
||||
widget.popup_widget = wibox.widget {
|
||||
text = "A popup",
|
||||
--forced_height = 100,
|
||||
widget = wibox.widget.textbox
|
||||
}
|
||||
|
||||
widget.popup = awful.popup {
|
||||
widget = widget.popup_widget,
|
||||
border_color = "#00ff00",
|
||||
border_width = 0,
|
||||
placement = function(client)
|
||||
return awful.placement.next_to(client, {
|
||||
honor_workarea = true,
|
||||
preferred_positions = "top",
|
||||
preferred_anchors = "front",
|
||||
})
|
||||
end,
|
||||
shape = gears.shape.rounded_rect,
|
||||
visible = false,
|
||||
ontop = true
|
||||
}
|
||||
|
||||
widget.widget:connect_signal("mouse::enter", function(result)
|
||||
widget.widget.bg = beautiful.color.bar.hover_bg
|
||||
--widget.popup.visible = true
|
||||
widget.popup:move_next_to(result)
|
||||
widget.popup_widget.text = "t"
|
||||
--debug_message(result)
|
||||
end)
|
||||
|
||||
widget.widget:connect_signal("mouse::leave", function(result)
|
||||
widget.widget.bg = beautiful.color.transparent
|
||||
widget.popup.visible = false
|
||||
end)
|
||||
|
||||
return widget
|
||||
|
|
Loading…
Reference in New Issue