summaryrefslogtreecommitdiffstats
path: root/display-gtk.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-25 16:48:20 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-25 18:05:45 -0700
commit826401a39c3591d462b7766eb6ede15515839669 (patch)
tree3bafa48fb7db7bf4f80946734eb151ab3fde54b5 /display-gtk.h
parent12d5ab4ce31756999fc34a56c50f54dc585d8bbb (diff)
downloadsubsurface-826401a39c3591d462b7766eb6ede15515839669.tar.gz
Add macros for text sizes
This replaces the hardcoded sizes all over the sources. Make the size in the text_render_options_t a double - With this you can compile Subsurface with make CLCFLAGS=-DTEXT_SCALE=1.5 and the fonts in the profile are 50% bigger. Very nice on a high-pixel density display. Also remove the unused text_render_options for event text. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'display-gtk.h')
-rw-r--r--display-gtk.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/display-gtk.h b/display-gtk.h
index 5a8bd29eb..7c1bcad4a 100644
--- a/display-gtk.h
+++ b/display-gtk.h
@@ -98,6 +98,16 @@ typedef gint (*sort_func_t)(GtkTreeModel *model,
#define UNSORTABLE 8
#define EDITABLE 16
+#ifndef TEXT_SCALE
+#define TEXT_SCALE 1.0
+#endif
+
+#define DEPTH_TEXT_SIZE (10 * TEXT_SCALE)
+#define PRESSURE_TEXT_SIZE (10 * TEXT_SCALE)
+#define DC_TEXT_SIZE (10.5 * TEXT_SCALE)
+#define PP_TEXT_SIZE (11 * TEXT_SCALE)
+#define TEMP_TEXT_SIZE (12 * TEXT_SCALE)
+
extern GtkTreeViewColumn *tree_view_column(GtkWidget *tree_view, int index, const char *title,
data_func_t data_func, unsigned int flags);
extern GtkTreeViewColumn *tree_view_column_add_pixbuf(GtkWidget *tree_view, data_func_t data_func, GtkTreeViewColumn *col);