From b7dbcb00642b61c874ca124257948cbf9936bf3b Mon Sep 17 00:00:00 2001 From: Oliver Duis Date: Wed, 2 Mar 2011 21:11:22 +0100 Subject: [PATCH] Tooltip enhancement for clipped H/S buttons, on behalf of MaWe; see issue #553 --- rtgui/indclippedpanel.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rtgui/indclippedpanel.cc b/rtgui/indclippedpanel.cc index efd5b127f..609dfdb48 100644 --- a/rtgui/indclippedpanel.cc +++ b/rtgui/indclippedpanel.cc @@ -22,15 +22,21 @@ IndicateClippedPanel::IndicateClippedPanel (ImageArea* ia) : imageArea(ia) { + Glib::ustring tt; + indclippedh = Gtk::manage (new Gtk::ToggleButton ()); indclippedh->set_relief(Gtk::RELIEF_NONE); indclippedh->add (*Gtk::manage (new Gtk::Image (argv0+"/images/warnhl.png"))); - indclippedh->set_tooltip_text (M("MAIN_TOOLTIP_INDCLIPPEDH")); + tt = M("MAIN_TOOLTIP_INDCLIPPEDH"); + if (tt.find("<") == Glib::ustring::npos && tt.find(">") == Glib::ustring::npos) indclippedh->set_tooltip_text (tt); + else indclippedh->set_tooltip_markup (tt); indclippeds = Gtk::manage (new Gtk::ToggleButton ()); indclippeds->set_relief(Gtk::RELIEF_NONE); indclippeds->add (*Gtk::manage (new Gtk::Image (argv0+"/images/warnsh.png"))); - indclippeds->set_tooltip_text (M("MAIN_TOOLTIP_INDCLIPPEDS")); + tt = M("MAIN_TOOLTIP_INDCLIPPEDS"); + if (tt.find("<") == Glib::ustring::npos && tt.find(">") == Glib::ustring::npos) indclippeds->set_tooltip_text (tt); + else indclippeds->set_tooltip_markup (tt); indclippedh->set_active (options.showClippedHighlights); indclippeds->set_active (options.showClippedShadows);