File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -362,9 +362,12 @@ side_pane_size_allocate_callback (GtkWidget *widget,
362362 gpointer user_data )
363363{
364364 CajaNavigationWindow * window ;
365+ gint scale ;
365366
366367 window = CAJA_NAVIGATION_WINDOW (user_data );
368+ scale = gtk_widget_get_scale_factor (widget );
367369
370+ allocation -> width = allocation -> width / scale ;
368371 if (allocation -> width != window -> details -> side_pane_width )
369372 {
370373 window -> details -> side_pane_width = allocation -> width ;
@@ -377,11 +380,14 @@ side_pane_size_allocate_callback (GtkWidget *widget,
377380static void
378381setup_side_pane_width (CajaNavigationWindow * window )
379382{
383+ gint scale ;
384+
380385 g_return_if_fail (window -> sidebar != NULL );
381386
387+ scale = gtk_widget_get_scale_factor (GTK_WIDGET (window -> sidebar ));
382388 window -> details -> side_pane_width =
383389 g_settings_get_int (caja_window_state ,
384- CAJA_WINDOW_STATE_SIDEBAR_WIDTH );
390+ CAJA_WINDOW_STATE_SIDEBAR_WIDTH ) * scale ;
385391
386392 gtk_paned_set_position (GTK_PANED (window -> details -> content_paned ),
387393 window -> details -> side_pane_width );
Original file line number Diff line number Diff line change @@ -731,9 +731,11 @@ caja_sidebar_title_size_allocate (GtkWidget *widget,
731731 CajaSidebarTitle * sidebar_title ;
732732 guint16 old_width ;
733733 guint best_icon_size ;
734+ gint scale ;
734735 GtkAllocation old_allocation , new_allocation ;
735736
736737 sidebar_title = CAJA_SIDEBAR_TITLE (widget );
738+ scale = gtk_widget_get_scale_factor (widget );
737739
738740 gtk_widget_get_allocation (widget , & old_allocation );
739741 old_width = old_allocation .width ;
@@ -744,7 +746,7 @@ caja_sidebar_title_size_allocate (GtkWidget *widget,
744746
745747 if (old_width != new_allocation .width )
746748 {
747- best_icon_size = get_best_icon_size (sidebar_title );
749+ best_icon_size = get_best_icon_size (sidebar_title ) / scale ;
748750 if (best_icon_size != sidebar_title -> details -> best_icon_size )
749751 {
750752 sidebar_title -> details -> best_icon_size = best_icon_size ;
You can’t perform that action at this time.
0 commit comments