Improve look of favorites preferences
Set a fixed width for the lists, embed the preferences in a horizontally-scrollable window, and open the preferences window on the general tab.
This commit is contained in:
parent
c6a45ae765
commit
fde15eaebb
@ -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()
|
||||
|
@ -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;
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user