Added thumbnail tooltips; see issue #395

This commit is contained in:
Oliver Duis
2010-12-12 11:32:13 +01:00
parent 7d1255cbac
commit 0563f8677f

View File

@@ -1,7 +1,6 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -416,9 +415,20 @@ bool ThumbBrowserEntryBase::releaseNotify (int button, int type, int bstate, int
return buttonSet ? buttonSet->releaseNotify (x, y) : false;
}
Glib::ustring ThumbBrowserEntryBase::getToolTip (int x, int y) {
return buttonSet ? buttonSet->getToolTip (x, y) : "";
Glib::ustring ThumbBrowserEntryBase::getToolTip (int x, int y) {
Glib::ustring tooltip = "";
if (buttonSet) tooltip = buttonSet->getToolTip (x, y);
// if the fileinfo is not shown anyway, make a tooltip with the info
if (!options.showFileNames && inside(x,y) && tooltip.empty()) {
tooltip = dispname;
if (options.fbShowDateTime && datetimeline!="") tooltip += Glib::ustring("\n") + datetimeline;
if (options.fbShowBasicExif && exifline!="") tooltip += Glib::ustring("\n") + exifline;
}
return tooltip;
}