diff options
author | Kangho Hur <kangho.hur@samsung.com> | 2017-04-25 17:36:30 +0900 |
---|---|---|
committer | Kangho Hur <kangho.hur@samsung.com> | 2017-04-25 17:36:30 +0900 |
commit | cc51b23ae850392e321167e4efde0ece1940e354 (patch) | |
tree | fb865e159ba3e9a886da3b4944ca351263ceab2b | |
parent | c14d0744e7d2edea2c1e7517311d1727b053fcc9 (diff) | |
download | xamarin-forms-cc51b23ae850392e321167e4efde0ece1940e354.tar.gz xamarin-forms-cc51b23ae850392e321167e4efde0ece1940e354.tar.bz2 xamarin-forms-cc51b23ae850392e321167e4efde0ece1940e354.zip |
use fixed DPI value (72) on TV profile
Change-Id: I84034fc407d9ea58d40cde24f5d0b52edea19491
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Forms.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Forms.cs b/Xamarin.Forms.Platform.Tizen/Forms.cs index d9b73bf4..555b149e 100644 --- a/Xamarin.Forms.Platform.Tizen/Forms.cs +++ b/Xamarin.Forms.Platform.Tizen/Forms.cs @@ -15,6 +15,12 @@ namespace Xamarin.Forms.Platform.Tizen static Lazy<int> s_dpi = new Lazy<int>(() => { int dpi = 0; + var info = Device.Info as TizenDeviceInfo; + if (info != null && info.Profile == "tv") + { + // Use fixed DPI value (72) if TV profile + return 72; + } TSystemInfo.TryGetValue<int>("http://tizen.org/feature/screen.dpi", out dpi); return dpi; }); @@ -69,6 +75,9 @@ namespace Xamarin.Forms.Platform.Tizen public TizenDeviceInfo(FormsApplication formsApplication) { + //TODO : Fix me if elm_config_profile_get() unavailable + profile = Elementary.GetProfile(); + int width = 0; int height = 0; @@ -83,9 +92,6 @@ namespace Xamarin.Forms.Platform.Tizen pixelScreenSize = new Size(width, height); scaledScreenSize = new Size(width / scalingFactor, height / scalingFactor); - - //TODO : Fix me if elm_config_profile_get() unavailable - profile = Elementary.GetProfile(); } } |