summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/persistent_tooltip.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-04-25 01:16:39 +0200
committerPaul Davis <paul@linuxaudiosystems.com>2015-06-29 14:18:13 -0400
commit96078650c9de7b6508eb65436328b31cbe49dfd7 (patch)
tree048975ff7918298bbbfe3b200dd061f106cede80 /libs/gtkmm2ext/persistent_tooltip.cc
parent016beaab9bf24740d796bdc43af152d1e3186d02 (diff)
API to set tooltip y-margin
Conflicts: libs/gtkmm2ext/gtkmm2ext/persistent_tooltip.h libs/gtkmm2ext/persistent_tooltip.cc
Diffstat (limited to 'libs/gtkmm2ext/persistent_tooltip.cc')
-rw-r--r--libs/gtkmm2ext/persistent_tooltip.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/gtkmm2ext/persistent_tooltip.cc b/libs/gtkmm2ext/persistent_tooltip.cc
index 44cb953588..367175f3dc 100644
--- a/libs/gtkmm2ext/persistent_tooltip.cc
+++ b/libs/gtkmm2ext/persistent_tooltip.cc
@@ -30,13 +30,14 @@ using namespace Gtk;
using namespace Gtkmm2ext;
/** @param target The widget to provide the tooltip for */
-PersistentTooltip::PersistentTooltip (Gtk::Widget* target, bool draggable)
+PersistentTooltip::PersistentTooltip (Gtk::Widget* target, bool draggable, int margin_y)
: _target (target)
, _window (0)
, _label (0)
, _draggable (draggable)
, _maybe_dragging (false)
, _align_to_center (true)
+ , _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);
@@ -157,7 +158,7 @@ PersistentTooltip::show ()
the screen, so don't show it in the usual place.
*/
rx = sw - _window->get_width();
- _window->move (rx, ry + _target->get_height());
+ _window->move (rx, ry + _target->get_height() + _margin_y);
} else {
if (_align_to_center) {
_window->move (rx + (_target->get_width () - _window->get_width ()) / 2, ry + _target->get_height());