Re-add inspector tab as an option (#5867)

- add option "inspectorWindow" to switch from tab to fullscreen view
- add option "zoomOnScroll" to configure scroll device for zoom or pan
- add both options to preferences
- filepanel creates tab if not inspectorWindow
- inspector adapts to settings inspectorWindow and zoomOnScroll
- filebrowser shows context menu item for inspector only if inspectorWindow
This commit is contained in:
rfranke
2020-08-11 18:27:50 +02:00
parent a449a01690
commit e63b800864
9 changed files with 139 additions and 69 deletions

View File

@@ -950,16 +950,27 @@ Gtk::Widget* Preferences::getGeneralPanel()
workflowGrid->attach_next_to(*complexityL, *curveBBoxPosL, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*complexitylocal, *curveBBoxPosC, Gtk::POS_BOTTOM, 1, 1);
zoomOnScrollCB = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_ZOOMONSCROLL")));
setExpandAlignProperties(zoomOnScrollCB, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
workflowGrid->attach_next_to(*zoomOnScrollCB, *complexityL, Gtk::POS_BOTTOM, 1, 1);
inspectorWindowCB = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_INSPECTORWINDOW")));
setExpandAlignProperties(inspectorWindowCB, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
workflowGrid->attach_next_to(*inspectorWindowCB, *complexitylocal, Gtk::POS_BOTTOM, 1, 1);
Gtk::Label* inspectorNextStartL = Gtk::manage(new Gtk::Label(Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")"));
setExpandAlignProperties(inspectorNextStartL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
workflowGrid->attach_next_to(*inspectorNextStartL, *inspectorWindowCB, Gtk::POS_RIGHT, 1, 1);
ckbHistogramPositionLeft = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_HISTOGRAMPOSITIONLEFT")));
setExpandAlignProperties(ckbHistogramPositionLeft, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
workflowGrid->attach_next_to(*ckbHistogramPositionLeft, *complexityL, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*ckbHistogramPositionLeft, *zoomOnScrollCB, Gtk::POS_BOTTOM, 1, 1);
ckbFileBrowserToolbarSingleRow = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_FILEBROWSERTOOLBARSINGLEROW")));
setExpandAlignProperties(ckbFileBrowserToolbarSingleRow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START);
ckbShowFilmStripToolBar = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_SHOWFILMSTRIPTOOLBAR")));
setExpandAlignProperties(ckbShowFilmStripToolBar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START);
workflowGrid->attach_next_to(*ckbFileBrowserToolbarSingleRow, *ckbHistogramPositionLeft, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*ckbShowFilmStripToolBar, *complexitylocal, Gtk::POS_BOTTOM, 2, 1);
workflowGrid->attach_next_to(*ckbShowFilmStripToolBar, *inspectorWindowCB, Gtk::POS_BOTTOM, 2, 1);
Gtk::Label* hb4label = Gtk::manage(new Gtk::Label(M("PREFERENCES_TP_LABEL")));
setExpandAlignProperties(hb4label, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
@@ -1814,6 +1825,8 @@ void Preferences::storePreferences()
moptions.curvebboxpos = curveBBoxPosC->get_active_row_number();
moptions.complexity = complexitylocal->get_active_row_number();
moptions.inspectorWindow = inspectorWindowCB->get_active();
moptions.zoomOnScroll = zoomOnScrollCB->get_active();
moptions.histogramPosition = ckbHistogramPositionLeft->get_active() ? 1 : 2;
moptions.FileBrowserToolbarSingleRow = ckbFileBrowserToolbarSingleRow->get_active();
moptions.showFilmStripToolBar = ckbShowFilmStripToolBar->get_active();
@@ -2028,6 +2041,8 @@ void Preferences::fillPreferences()
curveBBoxPosC->set_active(moptions.curvebboxpos);
complexitylocal->set_active(moptions.complexity);
inspectorWindowCB->set_active(moptions.inspectorWindow);
zoomOnScrollCB->set_active(moptions.zoomOnScroll);
ckbHistogramPositionLeft->set_active(moptions.histogramPosition == 1);
ckbFileBrowserToolbarSingleRow->set_active(moptions.FileBrowserToolbarSingleRow);