summaryrefslogtreecommitdiff
path: root/src/ui/metrics.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-07-21 15:06:52 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-07-21 15:07:38 +0300
commitd773b499e595a43b9b1ae449262dcf13cabf2d02 (patch)
treeb1baeb12025a04f8316636b5d0ab18e30ceedb2c /src/ui/metrics.c
Initial commit
Borrowing the app skeleton from Bitwise Harmony.
Diffstat (limited to 'src/ui/metrics.c')
-rw-r--r--src/ui/metrics.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ui/metrics.c b/src/ui/metrics.c
new file mode 100644
index 00000000..38ae5955
--- /dev/null
+++ b/src/ui/metrics.c
@@ -0,0 +1,16 @@
1#include "metrics.h"
2
3#include <the_Foundation/math.h>
4
5#define defaultFontSize_Metrics 16
6#define defaultGap_Metrics 4
7
8int gap_UI = defaultGap_Metrics;
9iInt2 gap2_UI = { defaultGap_Metrics, defaultGap_Metrics };
10int fontSize_UI = defaultFontSize_Metrics;
11
12void setPixelRatio_Metrics(float pixelRatio) {
13 gap_UI = iRound(defaultGap_Metrics * pixelRatio);
14 gap2_UI = init1_I2(gap_UI);
15 fontSize_UI = iRound(defaultFontSize_Metrics * pixelRatio);
16}