diff options
author | David Robillard <d@drobilla.net> | 2015-10-26 17:12:07 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-10-26 17:12:07 +0000 |
commit | 128bdd836148ad902470d45f4eb36cb0a2045f4f (patch) | |
tree | 0a1e57a383a99cd5e9a09150d16513f302b029a2 /src | |
parent | 3a9e931e06a6461d8ef40ca54a4c548063e97eea (diff) | |
download | ganv-128bdd836148ad902470d45f4eb36cb0a2045f4f.tar.gz ganv-128bdd836148ad902470d45f4eb36cb0a2045f4f.tar.bz2 ganv-128bdd836148ad902470d45f4eb36cb0a2045f4f.zip |
Resize value labels when font size changes
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5791 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/color.h | 2 | ||||
-rw-r--r-- | src/port.c | 5 |
2 files changed, 3 insertions, 4 deletions
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) @@ -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)); } |