Skip to content

Commit f7b6200

Browse files
committed
[Tizen] Apply graphics related code review feedback
1 parent 0050f5d commit f7b6200

File tree

8 files changed

+5
-86
lines changed

8 files changed

+5
-86
lines changed

src/Core/src/Graphics/PaintExtensions.Tizen.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,6 @@ class BackgroundDrawable : IDrawable
1212
Paint _paint;
1313
public BackgroundDrawable(Paint paint)
1414
{
15-
// Workaround.
16-
// I think, SolidPaint violate LSP
17-
// When Paint was used on Canvas.SetFillPaint, BackgroundColor was referred
18-
// But SolidPaint do not update BackgroundColor when Color was updated even though it has same meaning.
19-
if (paint is SolidPaint solidPaint)
20-
{
21-
solidPaint.BackgroundColor = solidPaint.Color;
22-
}
23-
2415
_paint = paint;
2516
}
2617

src/Core/src/Handlers/Border/BorderHandler.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
using NativeView = Microsoft.Maui.Handlers.ContentViewGroup;
66
#elif WINDOWS
77
using NativeView = Microsoft.Maui.Handlers.ContentPanel;
8+
#elif TIZEN
9+
using NativeView = Microsoft.Maui.ContentCanvas;
810
#elif NETSTANDARD
911
using NativeView = System.Object;
1012
#endif

src/Core/src/Handlers/GraphicsView/GraphicsViewHandler.Tizen.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
using Microsoft.Maui.Graphics.Skia.Views;
2-
using SkiaGraphicsView = Microsoft.Maui.Platform.Tizen.SkiaGraphicsView;
32

43
namespace Microsoft.Maui.Handlers
54
{
65
public partial class GraphicsViewHandler : ViewHandler<IGraphicsView, SkiaGraphicsView>
76
{
87
protected override SkiaGraphicsView CreateNativeView()
98
{
10-
return new SkiaGraphicsView(NativeParent)
11-
{
12-
DeviceScalingFactor = (float)Tizen.UIExtensions.Common.DeviceInfo.ScalingFactor
13-
};
9+
return new SkiaGraphicsView(NativeParent);
1410
}
1511

1612
public static void MapDrawable(GraphicsViewHandler handler, IGraphicsView graphicsView)

src/Core/src/Platform/Tizen/GraphicsViewExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Microsoft.Maui.Graphics.Skia.Views;
2-
using SkiaGraphicsView = Microsoft.Maui.Platform.Tizen.SkiaGraphicsView;
32

43
namespace Microsoft.Maui
54
{
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
using ElmSharp;
2-
using SkiaGraphicsView = Microsoft.Maui.Platform.Tizen.SkiaGraphicsView;
2+
using Microsoft.Maui.Graphics.Skia.Views;
33

44
namespace Microsoft.Maui
55
{
66
public class MauiBoxView : SkiaGraphicsView
77
{
88
public MauiBoxView(EvasObject parent) : base(parent)
99
{
10-
DeviceScalingFactor = (float)Tizen.UIExtensions.Common.DeviceInfo.ScalingFactor;
1110
}
1211
}
1312
}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
using ElmSharp;
22
using Microsoft.Maui.Graphics.Skia.Views;
3-
using SkiaGraphicsView = Microsoft.Maui.Platform.Tizen.SkiaGraphicsView;
43

54
namespace Microsoft.Maui
65
{
76
public class MauiShapeView : SkiaGraphicsView
87
{
98
public MauiShapeView(EvasObject parent) : base(parent)
109
{
11-
DeviceScalingFactor = (float)Tizen.UIExtensions.Common.DeviceInfo.ScalingFactor;
1210
}
1311
}
1412
}

src/Core/src/Platform/Tizen/SkiaGraphicsView.Tizen.cs

Lines changed: 0 additions & 62 deletions
This file was deleted.

src/Core/src/Platform/Tizen/WrapperView.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using SkiaSharp.Views.Tizen;
88
using Tizen.UIExtensions.Common;
99
using Tizen.UIExtensions.ElmSharp;
10-
using SkiaGraphicsView = Microsoft.Maui.Platform.Tizen.SkiaGraphicsView;
1110

1211
namespace Microsoft.Maui
1312
{
@@ -26,10 +25,7 @@ public WrapperView(EvasObject parent) : base(parent)
2625
{
2726
_backgroundCanvas = new Lazy<SkiaGraphicsView>(() =>
2827
{
29-
var view = new SkiaGraphicsView(parent)
30-
{
31-
DeviceScalingFactor = (float)DeviceInfo.ScalingFactor
32-
};
28+
var view = new SkiaGraphicsView(parent);
3329
view.Show();
3430
Children.Add(view);
3531
view.Lower();

0 commit comments

Comments
 (0)