From d773b499e595a43b9b1ae449262dcf13cabf2d02 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 21 Jul 2020 15:06:52 +0300 Subject: Initial commit Borrowing the app skeleton from Bitwise Harmony. --- src/ui/metrics.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/ui/metrics.c (limited to 'src/ui/metrics.c') 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 @@ +#include "metrics.h" + +#include + +#define defaultFontSize_Metrics 16 +#define defaultGap_Metrics 4 + +int gap_UI = defaultGap_Metrics; +iInt2 gap2_UI = { defaultGap_Metrics, defaultGap_Metrics }; +int fontSize_UI = defaultFontSize_Metrics; + +void setPixelRatio_Metrics(float pixelRatio) { + gap_UI = iRound(defaultGap_Metrics * pixelRatio); + gap2_UI = init1_I2(gap_UI); + fontSize_UI = iRound(defaultFontSize_Metrics * pixelRatio); +} -- cgit v1.2.3