-
Notifications
You must be signed in to change notification settings - Fork 1
/
PluginTitleWidget.cs
47 lines (38 loc) · 1.06 KB
/
PluginTitleWidget.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xwt;
namespace FPlug
{
public class PluginTitleWidget : Canvas, IHasPluginType, IHasCanvasBackend
{
public PluginType PluginType { get; set; }
Label label;
public PluginTitleWidget(PluginType type)
{
PluginType = type;
label = new Label()
{
Text = type.GetName(),
TextColor = type.GetColor(),
Font = Font.WithScaledSize(2d),
HeightRequest = 30,
WidthRequest = 400,
};
MarginTop = 8;
HeightRequest = 30;
WidthRequest = 400;
AddChild(label, 0, 0);
if (App.InitOpacityAnimation != null)
{
Opacity = 0;
App.InitOpacityAnimation(this);
}
}
public Xwt.Backends.ICanvasBackend GetBackend()
{
return (Xwt.Backends.ICanvasBackend)BackendHost.Backend;
}
}
}