Iprove GUI encoding log to allow tooltip

This commit is contained in:
Desmis 2020-05-24 08:27:34 +02:00
parent 3cac370f17
commit 9f2f8411ac
2 changed files with 32 additions and 4 deletions

View File

@ -1154,6 +1154,7 @@ class LocallabLog:
{
private:
Gtk::ToggleButton* const autocompute;
Gtk::Frame* const logPFrame;
Adjuster* const blackEv;
Adjuster* const whiteEv;
Gtk::CheckButton* const fullimage;
@ -1170,6 +1171,7 @@ private:
public:
LocallabLog();
void updateAdviceTooltips(const bool showTooltips) override;
void disableListener();
void enableListener();

View File

@ -4276,6 +4276,7 @@ LocallabLog::LocallabLog():
// Log encoding specific widgets
autocompute(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_LOGAUTO")))),
logPFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOGPFRA")))),
blackEv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLACK_EV"), -16.0, 0.0, 0.1, -5.0))),
whiteEv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_WHITE_EV"), 0.0, 32.0, 0.1, 10.0))),
fullimage(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FULLIMAGE")))),
@ -4316,9 +4317,7 @@ LocallabLog::LocallabLog():
anglog->setAdjusterListener(this);
// Add Log encoding specific widgets to GUI
Gtk::Frame* const logPFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOGPFRA")));
logPFrame->set_label_align(0.025, 0.5);
logPFrame->set_tooltip_text(M("TP_LOCALLAB_LOGFRAME_TOOLTIP"));
ToolParamBlock* const logPBox = Gtk::manage(new ToolParamBlock());
logPBox->pack_start(*autocompute);
logPBox->pack_start(*blackEv);
@ -4346,6 +4345,33 @@ LocallabLog::LocallabLog():
pack_start(*gradlogFrame);
}
void LocallabLog::updateAdviceTooltips(const bool showTooltips)
{
if (showTooltips) {
exp->set_tooltip_text(M("TP_LOCALLAB_ENCODLOG_TOOLTIP"));
logPFrame->set_tooltip_text(M("TP_LOCALLAB_LOGFRAME_TOOLTIP"));
autocompute->set_tooltip_text(M("TP_LOCALLAB_AUTOLOG_TOOLTIP"));
blackEv->set_tooltip_text(M("TP_LOCALLAB_BLACKWHEV_TOOLTIP"));
whiteEv->set_tooltip_text(M("TP_LOCALLAB_BLACKWHEV_TOOLTIP"));
Autogray->set_tooltip_text(M("TP_LOCALLAB_AUTOGREY_TOOLTIP"));
sourceGray->set_tooltip_text(M("TP_LOCALLAB_SRCGREY_TOOLTIP"));
targetGray->set_tooltip_text(M("TP_LOCALLAB_TARGGREY_TOOLTIP"));
detail->set_tooltip_text(M("TP_LOCALLAB_DETLOG_TOOLTIP"));
baselog->set_tooltip_text(M("TP_LOCALLAB_BASELOG_TOOLTIP"));
} else {
exp->set_tooltip_text(M(""));
logPFrame->set_tooltip_text("");
autocompute->set_tooltip_text(M(""));
blackEv->set_tooltip_text(M(""));
whiteEv->set_tooltip_text(M(""));
Autogray->set_tooltip_text(M(""));
sourceGray->set_tooltip_text(M(""));
targetGray->set_tooltip_text(M(""));
detail->set_tooltip_text(M(""));
baselog->set_tooltip_text(M(""));
}
}
void LocallabLog::disableListener()
{
LocallabTool::disableListener();
@ -4610,11 +4636,11 @@ void LocallabLog::updateLogGUI()
blackEv->set_sensitive(false);
whiteEv->set_sensitive(false);
sourceGray->set_sensitive(false);
targetGray->set_sensitive(false);
// targetGray->set_sensitive(true);
} else {
blackEv->set_sensitive(true);
whiteEv->set_sensitive(true);
sourceGray->set_sensitive(true);
targetGray->set_sensitive(true);
// targetGray->set_sensitive(true);
}
}