diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index de3553aee..39726c791 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -67,6 +67,7 @@ Preferences::Preferences(RTWindow *rtwindow) , newFont(false) , newCPFont(false) , toolLocationPreference(nullptr) + , swFavorites(nullptr) { moptions.copyFrom(&options); @@ -500,7 +501,12 @@ Gtk::Widget *Preferences::getFavoritesPanel() if (!toolLocationPreference) { toolLocationPreference = Gtk::manage(new ToolLocationPreference(moptions)); } - return toolLocationPreference; + if (!swFavorites) { + swFavorites = Gtk::manage(new Gtk::ScrolledWindow()); + swFavorites->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_NEVER); + swFavorites->add(*toolLocationPreference); + } + return swFavorites; } Gtk::Widget *Preferences::getDynamicProfilePanel() diff --git a/rtgui/preferences.h b/rtgui/preferences.h index 18d7a0581..33ca44eca 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -272,6 +272,7 @@ class Preferences final : Gtk::ScrolledWindow *swGeneral; Gtk::ScrolledWindow *swImageProcessing; + Gtk::ScrolledWindow *swFavorites; Gtk::ScrolledWindow *swDynamicProfile; Gtk::ScrolledWindow *swFileBrowser; Gtk::ScrolledWindow *swColorMan; diff --git a/rtgui/toollocationpref.cc b/rtgui/toollocationpref.cc index 3e874627c..d0a8cdf34 100644 --- a/rtgui/toollocationpref.cc +++ b/rtgui/toollocationpref.cc @@ -569,12 +569,10 @@ ToolLocationPreference::ToolLocationPreference(Options &options) : M("PREFERENCES_TOOLPANEL_AVAILABLETOOLS"))); Gtk::ScrolledWindow *tool_list_scrolled_window = Gtk::manage(new Gtk::ScrolledWindow()); - tool_list_scrolled_window->property_hscrollbar_policy() = - Gtk::PolicyType::POLICY_NEVER; + tool_list_scrolled_window->set_min_content_width(550); layout_grid->attach_next_to(*tool_list_frame, Gtk::PositionType::POS_RIGHT, 1, 1); tool_list_frame->add(*tool_list_scrolled_window); tool_list_scrolled_window->add(*impl->toolListViewPtr); - impl->toolListViewPtr->set_hscroll_policy(Gtk::ScrollablePolicy::SCROLL_MINIMUM); setExpandAlignProperties( tool_list_frame, false, true, Gtk::ALIGN_START, Gtk::ALIGN_FILL); @@ -583,15 +581,12 @@ ToolLocationPreference::ToolLocationPreference(Options &options) : M("PREFERENCES_TOOLPANEL_FAVORITESPANEL"))); Gtk::ScrolledWindow *favorites_list_scrolled_window = Gtk::manage(new Gtk::ScrolledWindow()); - favorites_list_scrolled_window->property_hscrollbar_policy() = - Gtk::PolicyType::POLICY_NEVER; + favorites_list_scrolled_window->set_min_content_width(400); layout_grid->attach_next_to(*favorites_frame, Gtk::PositionType::POS_RIGHT, 1, 1); favorites_frame->add(*favorites_list_scrolled_window); favorites_list_scrolled_window->add(*impl->favoritesViewPtr); setExpandAlignProperties( favorites_frame, false, true, Gtk::ALIGN_START, Gtk::ALIGN_FILL); - - this->show_all(); } void ToolLocationPreference::updateOptions()