summaryrefslogtreecommitdiff
path: root/src/ui/metrics.c
blob: 3c4bfd753b3dbc404ad028fc76cff13f8f1c62b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "metrics.h"

#include <the_Foundation/math.h>

#define defaultFontSize_Metrics     18
#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);
}