diff options
Diffstat (limited to 'src/ui/metrics.c')
-rw-r--r-- | src/ui/metrics.c | 16 |
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 | |||
8 | int gap_UI = defaultGap_Metrics; | ||
9 | iInt2 gap2_UI = { defaultGap_Metrics, defaultGap_Metrics }; | ||
10 | int fontSize_UI = defaultFontSize_Metrics; | ||
11 | |||
12 | void 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 | } | ||