From 128bdd836148ad902470d45f4eb36cb0a2045f4f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 26 Oct 2015 17:12:07 +0000 Subject: Resize value labels when font size changes git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5791 a436a847-0d15-0410-975c-d299462d15a1 --- src/color.h | 2 ++ src/port.c | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/color.h b/src/color.h index d96bb2a..0043dc7 100644 --- a/src/color.h +++ b/src/color.h @@ -21,6 +21,7 @@ #ifdef GANV_USE_LIGHT_THEME # define DEFAULT_BACKGROUND_COLOR 0xFFFFFFFF # define DEFAULT_TEXT_COLOR 0x000000FF +# define DIM_TEXT_COLOR 0x333333BB # define DEFAULT_FILL_COLOR 0xEEEEEEFF # define DEFAULT_BORDER_COLOR 0x000000FF # define PORT_BORDER_COLOR(fill) 0x000000FF @@ -28,6 +29,7 @@ #else # define DEFAULT_BACKGROUND_COLOR 0x000000FF # define DEFAULT_TEXT_COLOR 0xFFFFFFFF +# define DIM_TEXT_COLOR 0xCCCCCCBB # define DEFAULT_FILL_COLOR 0x1E2224FF # define DEFAULT_BORDER_COLOR 0x3E4244FF # define PORT_BORDER_COLOR(fill) highlight_color(fill, 0x20) diff --git a/src/port.c b/src/port.c index 99c3283..7cbff23 100644 --- a/src/port.c +++ b/src/port.c @@ -545,13 +545,10 @@ ganv_port_set_value_label(GanvPort* port, "text", str, NULL); } else { - GanvCanvas* canvas = GANV_ITEM(port)->impl->canvas; - const double points = lrint(ganv_canvas_get_font_size(canvas) * 0.8); impl->value_label = GANV_TEXT(ganv_item_new(GANV_ITEM(port), ganv_text_get_type(), "text", str, - "font-size", points, - "color", DEFAULT_TEXT_COLOR, + "color", DIM_TEXT_COLOR, "managed", TRUE, NULL)); } -- cgit v1.2.1