diff options
author | Robin Gareus <robin@gareus.org> | 2015-04-25 01:16:39 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-04-25 01:16:39 +0200 |
commit | 7565ebd4ede96a001c271dc2e139d404526c116b (patch) | |
tree | 01ee5c2a282c8601195c03c0e545289010caa7c9 /libs/gtkmm2ext/persistent_tooltip.cc | |
parent | e22d7c2e2890f0bcedea7615d254f797b956c387 (diff) |
API to set tooltip y-margin
Diffstat (limited to 'libs/gtkmm2ext/persistent_tooltip.cc')
-rw-r--r-- | libs/gtkmm2ext/persistent_tooltip.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/gtkmm2ext/persistent_tooltip.cc b/libs/gtkmm2ext/persistent_tooltip.cc index 731ede52d9..ae4c2e45c6 100644 --- a/libs/gtkmm2ext/persistent_tooltip.cc +++ b/libs/gtkmm2ext/persistent_tooltip.cc @@ -28,11 +28,12 @@ using namespace Gtk; using namespace Gtkmm2ext; /** @param target The widget to provide the tooltip for */ -PersistentTooltip::PersistentTooltip (Gtk::Widget* target) +PersistentTooltip::PersistentTooltip (Gtk::Widget* target, int margin_y) : _target (target) , _window (0) , _label (0) , _maybe_dragging (false) + , _margin_y (margin_y) { target->signal_enter_notify_event().connect (sigc::mem_fun (*this, &PersistentTooltip::enter), false); target->signal_leave_notify_event().connect (sigc::mem_fun (*this, &PersistentTooltip::leave), false); @@ -138,7 +139,7 @@ PersistentTooltip::show () int rx, ry, sw; sw= gdk_screen_width(); _target->get_window()->get_origin (rx, ry); - _window->move (rx, ry + _target->get_height()); + _window->move (rx, ry + _target->get_height() + _margin_y); _window->present (); /* the window needs to be realized first |