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.
This commit is contained in:
Morgan Hardwood
2017-12-08 23:24:42 +01:00
parent 7f33fe52b8
commit ec24784d10
2 changed files with 10 additions and 1 deletions

View File

@@ -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");
}

View File

@@ -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);