diff --git a/src/config.c b/src/config.c index d5ee571..901e8b1 100644 --- a/src/config.c +++ b/src/config.c @@ -244,7 +244,9 @@ void add_entry(char *key, char *value) char *value1 = 0, *value2 = 0, *value3 = 0; /* Background and border */ - if (strcmp(key, "rounded") == 0) { + if (strcmp(key, "scale_relative_to_dpi") == 0) { + ui_scale_dpi_ref = atof(value); + } else if (strcmp(key, "rounded") == 0) { // 'rounded' is the first parameter => alloc a new background if (backgrounds->len > 0) { Background *bg = &g_array_index(backgrounds, Background, backgrounds->len - 1); diff --git a/src/panel.c b/src/panel.c index a584ef9..63d6f3c 100644 --- a/src/panel.c +++ b/src/panel.c @@ -79,11 +79,14 @@ int num_panels; GArray *backgrounds; GArray *gradients; +double ui_scale_dpi_ref; + Imlib_Image default_icon; char *default_font = NULL; void default_panel() { + ui_scale_dpi_ref = 0; panels = NULL; num_panels = 0; default_icon = NULL; diff --git a/src/panel.h b/src/panel.h index 7fa0e13..11a468e 100644 --- a/src/panel.h +++ b/src/panel.h @@ -95,6 +95,7 @@ extern gboolean debug_fps; extern double tracing_fps_threshold; extern gboolean debug_frames; extern gboolean debug_thumbnails; +extern double ui_scale_dpi_ref; typedef struct Panel { Area area;