diff --git a/src/client/spark/view/Utility/WPFHelper.cs b/src/client/spark/view/Utility/WPFHelper.cs index bbd38e9e5..3b22c74ef 100644 --- a/src/client/spark/view/Utility/WPFHelper.cs +++ b/src/client/spark/view/Utility/WPFHelper.cs @@ -1,4 +1,5 @@ using bts.utils; +using mbts.ui.dpi; using mbts.utils; using System; using System.Collections; @@ -434,12 +435,12 @@ namespace mbts.ui { } } if (use_layout_rounding) { - content_left = Math.Round(content_left); - content_top = Math.Round(content_top); - content_width = Math.Round(content_width); - content_height = Math.Round(content_height); - result_width = Math.Round(result_width); - result_height = Math.Round(result_height); + content_left = content_left.RoundLayoutValue(); + content_top = content_top.RoundLayoutValue(); + content_width = content_width.RoundLayoutValue(); + content_height = content_height.RoundLayoutValue(); + result_width = result_width.RoundLayoutValue(); + result_height = result_height.RoundLayoutValue(); } content_area = new Rect(content_left, content_top, content_width, content_height); resultant_size = new Size(result_width, result_height);