Add config option (issue #656)
o9000 mrovi9000@gmail.com
3 files changed,
7 insertions(+),
1 deletions(-)
M
src/config.c
→
src/config.c
@@ -244,7 +244,9 @@ {
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);
M
src/panel.c
→
src/panel.c
@@ -79,11 +79,14 @@
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;
M
src/panel.h
→
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;