mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
This is more correct, as window insets are reported relative to the window/view area. Uses https://developer.android.com/reference/androidx/window/layout/WindowMetricsCalculator for compat on older platforms.
14 lines
437 B
C#
14 lines
437 B
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
using Android.Graphics;
|
|
using osu.Framework.Graphics.Primitives;
|
|
|
|
namespace osu.Framework.Android
|
|
{
|
|
public static class AndroidExtensions
|
|
{
|
|
public static RectangleI ToRectangleI(this Rect rect) => new RectangleI(rect.Left, rect.Top, rect.Width(), rect.Height());
|
|
}
|
|
}
|