diff options
Diffstat (limited to 'src/ui/metrics.c')
-rw-r--r-- | src/ui/metrics.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ui/metrics.c b/src/ui/metrics.c index 537aaf98..2405eae4 100644 --- a/src/ui/metrics.c +++ b/src/ui/metrics.c | |||
@@ -21,6 +21,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |||
21 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | 21 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ |
22 | 22 | ||
23 | #include "metrics.h" | 23 | #include "metrics.h" |
24 | #include "app.h" | ||
24 | 25 | ||
25 | #include <the_Foundation/math.h> | 26 | #include <the_Foundation/math.h> |
26 | 27 | ||
@@ -32,6 +33,12 @@ iInt2 gap2_UI = { defaultGap_Metrics, defaultGap_Metrics }; | |||
32 | int fontSize_UI = defaultFontSize_Metrics; | 33 | int fontSize_UI = defaultFontSize_Metrics; |
33 | 34 | ||
34 | void setPixelRatio_Metrics(float pixelRatio) { | 35 | void setPixelRatio_Metrics(float pixelRatio) { |
36 | #if defined (iPlatformAppleMobile) | ||
37 | /* iPad needs a bit larger UI elements as the viewing distance is generally longer.*/ | ||
38 | if (deviceType_App() == tablet_AppDeviceType) { | ||
39 | pixelRatio *= 1.1f; | ||
40 | } | ||
41 | #endif | ||
35 | gap_UI = iRound(defaultGap_Metrics * pixelRatio); | 42 | gap_UI = iRound(defaultGap_Metrics * pixelRatio); |
36 | gap2_UI = init1_I2(gap_UI); | 43 | gap2_UI = init1_I2(gap_UI); |
37 | fontSize_UI = iRound(defaultFontSize_Metrics * pixelRatio); | 44 | fontSize_UI = iRound(defaultFontSize_Metrics * pixelRatio); |