summaryrefslogtreecommitdiff
path: root/src/caja-navigation-window.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2018-04-04 07:27:14 -0400
committerlukefromdc <[email protected]>2018-04-04 21:53:21 -0400
commit9ea3b711a6a24d4b68231711129982a34938479b (patch)
tree3b76f57eabe62b2d8e001506b225511cf09a9984 /src/caja-navigation-window.c
parent554a036710b18d2573810265c69be6e83033af63 (diff)
downloadcaja-9ea3b711a6a24d4b68231711129982a34938479b.tar.bz2
caja-9ea3b711a6a24d4b68231711129982a34938479b.tar.xz
sidebar: Respect sidebar dimensions on HiDPI
Diffstat (limited to 'src/caja-navigation-window.c')
-rw-r--r--src/caja-navigation-window.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/caja-navigation-window.c b/src/caja-navigation-window.c
index 531c9ae0..a21e1595 100644
--- a/src/caja-navigation-window.c
+++ b/src/caja-navigation-window.c
@@ -362,9 +362,12 @@ side_pane_size_allocate_callback (GtkWidget *widget,
gpointer user_data)
{
CajaNavigationWindow *window;
+ gint scale;
window = CAJA_NAVIGATION_WINDOW (user_data);
+ scale = gtk_widget_get_scale_factor (widget);
+ allocation->width = allocation->width / scale;
if (allocation->width != window->details->side_pane_width)
{
window->details->side_pane_width = allocation->width;
@@ -377,11 +380,14 @@ side_pane_size_allocate_callback (GtkWidget *widget,
static void
setup_side_pane_width (CajaNavigationWindow *window)
{
+ gint scale;
+
g_return_if_fail (window->sidebar != NULL);
+ scale = gtk_widget_get_scale_factor (GTK_WIDGET (window->sidebar));
window->details->side_pane_width =
g_settings_get_int (caja_window_state,
- CAJA_WINDOW_STATE_SIDEBAR_WIDTH);
+ CAJA_WINDOW_STATE_SIDEBAR_WIDTH) * scale;
gtk_paned_set_position (GTK_PANED (window->details->content_paned),
window->details->side_pane_width);