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)
|
, newFont(false)
|
||||||
, newCPFont(false)
|
, newCPFont(false)
|
||||||
, toolLocationPreference(nullptr)
|
, toolLocationPreference(nullptr)
|
||||||
|
, swFavorites(nullptr)
|
||||||
{
|
{
|
||||||
|
|
||||||
moptions.copyFrom(&options);
|
moptions.copyFrom(&options);
|
||||||
@ -500,7 +501,12 @@ Gtk::Widget *Preferences::getFavoritesPanel()
|
|||||||
if (!toolLocationPreference) {
|
if (!toolLocationPreference) {
|
||||||
toolLocationPreference = Gtk::manage(new ToolLocationPreference(moptions));
|
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()
|
Gtk::Widget *Preferences::getDynamicProfilePanel()
|
||||||
|
@ -272,6 +272,7 @@ class Preferences final :
|
|||||||
|
|
||||||
Gtk::ScrolledWindow *swGeneral;
|
Gtk::ScrolledWindow *swGeneral;
|
||||||
Gtk::ScrolledWindow *swImageProcessing;
|
Gtk::ScrolledWindow *swImageProcessing;
|
||||||
|
Gtk::ScrolledWindow *swFavorites;
|
||||||
Gtk::ScrolledWindow *swDynamicProfile;
|
Gtk::ScrolledWindow *swDynamicProfile;
|
||||||
Gtk::ScrolledWindow *swFileBrowser;
|
Gtk::ScrolledWindow *swFileBrowser;
|
||||||
Gtk::ScrolledWindow *swColorMan;
|
Gtk::ScrolledWindow *swColorMan;
|
||||||
|
@ -569,12 +569,10 @@ ToolLocationPreference::ToolLocationPreference(Options &options) :
|
|||||||
M("PREFERENCES_TOOLPANEL_AVAILABLETOOLS")));
|
M("PREFERENCES_TOOLPANEL_AVAILABLETOOLS")));
|
||||||
Gtk::ScrolledWindow *tool_list_scrolled_window =
|
Gtk::ScrolledWindow *tool_list_scrolled_window =
|
||||||
Gtk::manage(new Gtk::ScrolledWindow());
|
Gtk::manage(new Gtk::ScrolledWindow());
|
||||||
tool_list_scrolled_window->property_hscrollbar_policy() =
|
tool_list_scrolled_window->set_min_content_width(550);
|
||||||
Gtk::PolicyType::POLICY_NEVER;
|
|
||||||
layout_grid->attach_next_to(*tool_list_frame, Gtk::PositionType::POS_RIGHT, 1, 1);
|
layout_grid->attach_next_to(*tool_list_frame, Gtk::PositionType::POS_RIGHT, 1, 1);
|
||||||
tool_list_frame->add(*tool_list_scrolled_window);
|
tool_list_frame->add(*tool_list_scrolled_window);
|
||||||
tool_list_scrolled_window->add(*impl->toolListViewPtr);
|
tool_list_scrolled_window->add(*impl->toolListViewPtr);
|
||||||
impl->toolListViewPtr->set_hscroll_policy(Gtk::ScrollablePolicy::SCROLL_MINIMUM);
|
|
||||||
setExpandAlignProperties(
|
setExpandAlignProperties(
|
||||||
tool_list_frame, false, true, Gtk::ALIGN_START, Gtk::ALIGN_FILL);
|
tool_list_frame, false, true, Gtk::ALIGN_START, Gtk::ALIGN_FILL);
|
||||||
|
|
||||||
@ -583,15 +581,12 @@ ToolLocationPreference::ToolLocationPreference(Options &options) :
|
|||||||
M("PREFERENCES_TOOLPANEL_FAVORITESPANEL")));
|
M("PREFERENCES_TOOLPANEL_FAVORITESPANEL")));
|
||||||
Gtk::ScrolledWindow *favorites_list_scrolled_window =
|
Gtk::ScrolledWindow *favorites_list_scrolled_window =
|
||||||
Gtk::manage(new Gtk::ScrolledWindow());
|
Gtk::manage(new Gtk::ScrolledWindow());
|
||||||
favorites_list_scrolled_window->property_hscrollbar_policy() =
|
favorites_list_scrolled_window->set_min_content_width(400);
|
||||||
Gtk::PolicyType::POLICY_NEVER;
|
|
||||||
layout_grid->attach_next_to(*favorites_frame, Gtk::PositionType::POS_RIGHT, 1, 1);
|
layout_grid->attach_next_to(*favorites_frame, Gtk::PositionType::POS_RIGHT, 1, 1);
|
||||||
favorites_frame->add(*favorites_list_scrolled_window);
|
favorites_frame->add(*favorites_list_scrolled_window);
|
||||||
favorites_list_scrolled_window->add(*impl->favoritesViewPtr);
|
favorites_list_scrolled_window->add(*impl->favoritesViewPtr);
|
||||||
setExpandAlignProperties(
|
setExpandAlignProperties(
|
||||||
favorites_frame, false, true, Gtk::ALIGN_START, Gtk::ALIGN_FILL);
|
favorites_frame, false, true, Gtk::ALIGN_START, Gtk::ALIGN_FILL);
|
||||||
|
|
||||||
this->show_all();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolLocationPreference::updateOptions()
|
void ToolLocationPreference::updateOptions()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user