From 30ff43ad367618bdee518c1411dd4553692cae51 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Fri, 8 Dec 2017 23:24:42 +0100 Subject: [PATCH] Tool panel vertical scrollbar bug in Linux #3413 When the vertical scrollbar is set to hidden, one cannot scroll the toolbox vertically using the mouse scrollwheel in Linux. This patch works around the problem by forcing the scrollbar to always be visible in Linux. --- rtgui/options.cc | 6 +++++- rtgui/preferences.cc | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/rtgui/options.cc b/rtgui/options.cc index d1b91c3ac..69e5c4bc9 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -1366,10 +1366,14 @@ void Options::readFromFile (Glib::ustring fname) FileBrowserToolbarSingleRow = keyFile.get_boolean ("GUI", "FileBrowserToolbarSingleRow"); } +#ifdef __linux__ + // Cannot scroll toolbox with mousewheel when HideTPVScrollbar=true #3413 + hideTPVScrollbar = false; +#else if (keyFile.has_key ("GUI", "HideTPVScrollbar")) { hideTPVScrollbar = keyFile.get_boolean ("GUI", "HideTPVScrollbar"); } - +#endif if (keyFile.has_key ("GUI", "UseIconNoText")) { UseIconNoText = keyFile.get_boolean ("GUI", "UseIconNoText"); } diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 7e6018ff0..ac3f4991c 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -1003,6 +1003,11 @@ Gtk::Widget* Preferences::getGeneralPanel () setExpandAlignProperties (hb4label, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); ckbHideTPVScrollbar = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_TP_VSCROLLBAR")) ); setExpandAlignProperties (ckbHideTPVScrollbar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); +#ifdef __linux__ + // Cannot scroll toolbox with mousewheel when HideTPVScrollbar=true #3413 + ckbHideTPVScrollbar->set_active(false); + ckbHideTPVScrollbar->set_sensitive(false); +#endif ckbUseIconNoText = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_TP_USEICONORTEXT")) ); setExpandAlignProperties (ckbUseIconNoText, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); workflowGrid->attach_next_to (*hb4label, *ckbFileBrowserToolbarSingleRow, Gtk::POS_BOTTOM, 1, 1);