Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ui/tooltip.cc3
-rw-r--r--src/ui/ui.cc3
2 files changed, 3 insertions, 3 deletions
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()
diff --git a/src/ui/ui.cc b/src/ui/ui.cc
index c1558b1..976ddab 100644
--- a/src/ui/ui.cc
+++ b/src/ui/ui.cc
@@ -295,7 +295,8 @@ void UI::frame()
ui_mouse_focus->tooltip()->parent()->to_local_coords(mouse_cursor) :
mouse_cursor);
- ui_mouse_focus->tooltip()->set_location(p.x() - ui_mouse_focus->tooltip()->width() * 0.5f, p.y() + pointer_size * 0.5f);
+ ui_mouse_focus->tooltip()->set_location(p.x() - ui_mouse_focus->tooltip()->width() * 0.5f, p.y() + pointer_size);
+ ui_mouse_focus->tooltip()->resize();
ui_mouse_focus->tooltip()->show();
}
}