Change look of favorites preferences

Set column widths based on DPI and font size in pseudo-HiDPI mode. Move
favorites buttons to left side of list.
This commit is contained in:
Lawrence Lee 2021-12-10 22:24:18 -08:00
parent f8a1deb371
commit 80944d6c9b

View File

@ -22,6 +22,7 @@
#include "guiutils.h"
#include "options.h"
#include "rtimage.h"
#include "rtscalable.h"
#include "toollocationpref.h"
#include "toolpanelcoord.h"
@ -720,7 +721,8 @@ ToolLocationPreference::ToolLocationPreference(Options &options) :
M("PREFERENCES_TOOLPANEL_AVAILABLETOOLS")));
Gtk::ScrolledWindow *tool_list_scrolled_window =
Gtk::manage(new Gtk::ScrolledWindow());
tool_list_scrolled_window->set_min_content_width(550);
tool_list_scrolled_window->set_min_content_width(
400 * (RTScalable::getTweakedDPI() / RTScalable::baseDPI));
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);
@ -733,10 +735,11 @@ ToolLocationPreference::ToolLocationPreference(Options &options) :
Gtk::Box *favorites_box = Gtk::manage(new Gtk::Box());
Gtk::ScrolledWindow *favorites_list_scrolled_window =
Gtk::manage(new Gtk::ScrolledWindow());
favorites_list_scrolled_window->set_min_content_width(400);
favorites_list_scrolled_window->set_min_content_width(
300 * (RTScalable::getTweakedDPI() / RTScalable::baseDPI));
layout_grid->attach_next_to(*favorites_frame, Gtk::PositionType::POS_RIGHT, 1, 1);
favorites_box->pack_start(*favorites_list_scrolled_window, false, false);
favorites_box->pack_start(impl->favoritesListEditButtons, false, false);
favorites_box->pack_start(*favorites_list_scrolled_window, false, false);
favorites_frame->add(*favorites_box);
favorites_list_scrolled_window->add(*impl->favoritesViewPtr);
setExpandAlignProperties(