Added test popup
This commit is contained in:
		| @ -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 | ||||
|  | ||||
		Reference in New Issue
	
	Block a user