This repository was archived by the owner on Jun 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseButton.vb
More file actions
61 lines (51 loc) · 2.22 KB
/
Copy pathBaseButton.vb
File metadata and controls
61 lines (51 loc) · 2.22 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Imports System.Drawing.Drawing2D
Imports System.IO
Public Class BaseButton
Inherits Transparent.Button
Property SubButton As Boolean
Get
Return SubButton
End Get
Set(value As Boolean)
Me.ForeColor = Globals.Palette("Plain Light")
Me.BackColor = Globals.Palette("Plain Dark")
Me.FlatAppearance.MouseOverBackColor = Globals.Palette("Secondary")
Me.FlatAppearance.MouseDownBackColor = Globals.Palette("Secondary")
End Set
End Property
Public Sub New()
Me.Font = Globals.GetFont("Raleway", Globals.Unit(0.5), FontStyle.Bold)
Me.ForeColor = Globals.Palette("Plain Light")
Me.BackColor = Globals.Palette("Secondary")
Me.FlatStyle = FlatStyle.Flat
Me.FlatAppearance.BorderSize = 0
Me.FlatAppearance.BorderColor = Nothing
Me.FlatAppearance.MouseOverBackColor = Globals.Palette("Plain Dark")
Me.FlatAppearance.MouseDownBackColor = Globals.Palette("Plain Dark")
If SubButton Then
Me.ForeColor = Globals.Palette("Plain Light")
Me.BackColor = Globals.Palette("Plain Dark")
Me.FlatAppearance.MouseOverBackColor = Globals.Palette("Secondary")
Me.FlatAppearance.MouseDownBackColor = Globals.Palette("Secondary")
End If
Me.MinimumSize = New Size(0, Globals.Unit(1))
Me.MaximumSize = New Size(0, Globals.Unit(1))
Me.Padding = New Padding(Globals.Unit(0.5), 0, Globals.Unit(0.5), 0)
Me.Size = New Size(Globals.Unit(3), Globals.Unit(1))
Me.AutoSize = True
End Sub
Protected Sub BaseButton_GotFocus(sender As Object, e As EventArgs) Handles Me.GotFocus
Me.BackColor = Globals.Palette("Plain Dark")
If SubButton Then
Me.ForeColor = Globals.Palette("Plain Light")
Me.BackColor = Globals.Palette("Plain Dark")
End If
End Sub
Protected Sub BaseButton_LostFocus(sender As Object, e As EventArgs) Handles Me.LostFocus
Me.BackColor = Globals.Palette("Secondary")
If SubButton Then
Me.ForeColor = Globals.Palette("Plain Light")
Me.BackColor = Globals.Palette("Plain Dark")
End If
End Sub
End Class