@@ -2280,15 +2280,17 @@ static void _handle_panel_widths(const dt_ui_panel_t p)
22802280 const int required_width = gtk_widget_get_allocated_width (darktable .gui -> ui -> panels [p ]);
22812281
22822282 // check if the center column is allowed to shrink by required_width
2283- const int min_center_width = dt_conf_get_int ("min_center_width" );
2283+ const int min_center_width =
2284+ darktable .gui -> dpi_factor * dt_conf_get_int ("min_center_width" );
22842285
22852286 if (center_col_w - required_width < min_center_width )
22862287 {
22872288 // the center column gives not enough room for the panel, so we need to shrink
22882289 // at least one of the side panels
22892290 int shrink_width = -1 * (center_col_w - required_width - min_center_width );
22902291
2291- const int min_panel_width = dt_conf_get_int ("min_panel_width" );
2292+ const int min_panel_width =
2293+ darktable .gui -> dpi_factor * dt_conf_get_int ("min_panel_width" );
22922294 const int other_panel_width = gtk_widget_get_allocated_width (darktable .gui -> ui -> panels [other_panel ]);
22932295
22942296 // first shrink the other panel, respecting the min_panel_width
@@ -2743,8 +2745,11 @@ static void _panel_set_side_panel_width(GtkWidget *widget, const dt_ui_panel_t p
27432745 GtkWidget * main_window = dt_ui_main_window (darktable .gui -> ui );
27442746 gtk_window_get_size (GTK_WINDOW (main_window ), & app_window_w , NULL );
27452747
2746- const int min_center_w = dt_conf_get_int ("min_center_width" );
2747- int max_w = dt_conf_get_int ("max_panel_width" );
2748+ const int min_center_w =
2749+ darktable .gui -> dpi_factor * dt_conf_get_int ("min_center_width" );
2750+
2751+ int max_w =
2752+ darktable .gui -> dpi_factor * dt_conf_get_int ("max_panel_width" );
27482753 int used_w = min_center_w ;
27492754
27502755 // Constraint: window width - center min - other side panel (if visible) - borders
@@ -2761,8 +2766,8 @@ static void _panel_set_side_panel_width(GtkWidget *widget, const dt_ui_panel_t p
27612766
27622767 int sx = panel_drag_start_size ;
27632768 sx = CLAMP ((int )(sx + delta_x ),
2764- dt_conf_get_int ("min_panel_width" ),
2765- max_w );
2769+ darktable . gui -> dpi_factor * dt_conf_get_int ("min_panel_width" ),
2770+ max_w );
27662771 dt_ui_panel_set_size (darktable .gui -> ui , panel , sx );
27672772}
27682773
@@ -2788,8 +2793,8 @@ static gboolean _panel_handle_motion_callback(GtkWidget *w,
27882793 const gint sy = gtk_widget_get_allocated_height (widget );
27892794 int sx = panel_drag_start_size ;
27902795 sx = CLAMP ((sy + darktable .gui -> widgets .panel_handle_y - e -> y ),
2791- dt_conf_get_int ("min_panel_height" ),
2792- dt_conf_get_int ("max_panel_height" ));
2796+ darktable . gui -> dpi_factor * dt_conf_get_int ("min_panel_height" ),
2797+ darktable . gui -> dpi_factor * dt_conf_get_int ("max_panel_height" ));
27932798 dt_ui_panel_set_size (darktable .gui -> ui , DT_UI_PANEL_BOTTOM , sx );
27942799 gtk_widget_set_size_request (widget , -1 , sx );
27952800 }
0 commit comments