Improves Locallab tools advice tooltips management

Other:
- GUI widgets cleanup
This commit is contained in:
Pandagrapher
2020-05-08 12:34:10 +02:00
parent aa41870346
commit bb95dd7a1b
14 changed files with 448 additions and 802 deletions

View File

@@ -20,11 +20,15 @@
* 2019 Pierre Cabrera <pierre.cab@gmail.com>
*/
#include "locallab.h"
#include "options.h"
#include "../rtengine/procparams.h"
using namespace rtengine;
using namespace procparams;
extern Options options;
/* ==== LocallabToolList ==== */
LocallabToolList::LocallabToolList():
// Tool list GUI elements
@@ -209,6 +213,11 @@ Locallab::Locallab():
// Show all widgets
show_all();
// Update Locallab tools advice tooltips visibility based on saved option
for (auto tool : locallabTools) {
tool->updateAdviceTooltips(options.showtooltip);
}
// By default, if no photo is loaded, all Locallab tools are removed and it's not possible to add them
// (to be necessary called after "show_all" function)
setParamEditable(false);
@@ -1085,6 +1094,13 @@ void Locallab::openAllTools()
}
}
void Locallab::updateShowtooltipVisibility(bool showtooltip)
{
for (auto tool : locallabTools) {
tool->updateAdviceTooltips(showtooltip);
}
}
void Locallab::addTool(Gtk::Box* where, LocallabTool* tool)
{
tool->getExpander()->setLevel(3);