aboutsummaryrefslogtreecommitdiff
path: root/src/gtkutils.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2014-11-06 08:52:25 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2014-11-06 08:52:25 +0000
commit1117e765db2eff0f3c0a37571540ac7c0301c075 (patch)
tree385c34dffa7619d34e0bacd853f8ddf37e38cf70 /src/gtkutils.c
parent74c037633fea44650154911e5128b1bd6661e115 (diff)
made the size of progress dialog and notificartion window DPI-aware.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3433 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/gtkutils.c')
-rw-r--r--src/gtkutils.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/gtkutils.c b/src/gtkutils.c
index 3675439a..de014305 100644
--- a/src/gtkutils.c
+++ b/src/gtkutils.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2011 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2014 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -159,6 +159,24 @@ gdouble gtkut_get_dpi(void)
return dpi;
}
+gdouble gtkut_get_dpi_multiplier(void)
+{
+ gdouble dpi;
+ gdouble mul;
+
+ dpi = gtkut_get_dpi();
+
+ /* 96 / 120 / 144 dpi */
+ if (dpi > 142)
+ mul = 1.5;
+ else if (dpi > 118)
+ mul = 1.25;
+ else
+ mul = 1.0;
+
+ return mul;
+}
+
void gtkut_convert_int_to_gdk_color(gint rgbvalue, GdkColor *color)
{
g_return_if_fail(color != NULL);