Browse Source
Merge branch 'master' into refactor/remove-isupportinitialize
pull/2305/head
Nikita Tsukanov
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
src/Avalonia.X11/X11Screens.cs
|
|
|
@ -218,6 +218,7 @@ namespace Avalonia.X11 |
|
|
|
|
|
|
|
class X11Screen |
|
|
|
{ |
|
|
|
private const int FullHDWidth = 1920; |
|
|
|
public bool Primary { get; } |
|
|
|
public string Name { get; set; } |
|
|
|
public PixelRect Bounds { get; set; } |
|
|
|
@ -247,6 +248,6 @@ namespace Avalonia.X11 |
|
|
|
} |
|
|
|
|
|
|
|
public static double GuessPixelDensity(double pixelWidth, double mmWidth) |
|
|
|
=> Math.Max(1, Math.Round(pixelWidth / mmWidth * 25.4 / 96)); |
|
|
|
=> pixelWidth <= FullHDWidth ? 1 : Math.Max(1, Math.Round(pixelWidth / mmWidth * 25.4 / 96)); |
|
|
|
} |
|
|
|
} |
|
|
|
|