From 6edb783d9abb91e569133d3516730493c3438e80 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 19 Jul 2020 00:02:09 +0200 Subject: Show tooltips under the mouse cursor instead of under the parent widget. --- src/ui/tooltip.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/ui/tooltip.cc') diff --git a/src/ui/tooltip.cc b/src/ui/tooltip.cc index 6a692ff..1777d33 100644 --- a/src/ui/tooltip.cc +++ b/src/ui/tooltip.cc @@ -29,8 +29,7 @@ Tooltip::~Tooltip() void Tooltip::resize() { - set_size(font()->width() * text().size() + UI::padding, font()->height() + + UI::padding); - set_location((parent()->width() - width()) * 0.5f, parent()->height()); + set_size(font()->width() * text().size() + UI::padding, font()->height() + UI::padding); } void Tooltip::draw_background() -- cgit v1.2.3