From 8e151e97c82826bf51dd84d4e23ac66b2a21f0be Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sun, 17 Dec 2017 03:52:07 +0100 Subject: [PATCH] Linux GTK+ >=3.19 only. Force the toolbox vertical scrollbar to be visible only if using Linux and GTK+ >=3.19. #3413 --- rtgui/options.cc | 2 +- rtgui/preferences.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rtgui/options.cc b/rtgui/options.cc index 69e5c4bc9..031678ddd 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -1366,7 +1366,7 @@ void Options::readFromFile (Glib::ustring fname) FileBrowserToolbarSingleRow = keyFile.get_boolean ("GUI", "FileBrowserToolbarSingleRow"); } -#ifdef __linux__ +#if defined(__linux__) && ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION > 18) || GTK_MAJOR_VERSION > 3) // Cannot scroll toolbox with mousewheel when HideTPVScrollbar=true #3413 hideTPVScrollbar = false; #else diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index ac3f4991c..cfa10265b 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -1003,7 +1003,7 @@ 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__ +#if defined(__linux__) && ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION > 18) || GTK_MAJOR_VERSION > 3) // Cannot scroll toolbox with mousewheel when HideTPVScrollbar=true #3413 ckbHideTPVScrollbar->set_active(false); ckbHideTPVScrollbar->set_sensitive(false);