forked from codepotro/borno-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LayoutList_PopUp.vb
69 lines (46 loc) · 1.79 KB
/
LayoutList_PopUp.vb
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
62
63
64
65
66
67
68
69
'
'
' This program Is free software; you can redistribute it And/Or modify
' it under the terms Of the GNU General Public License As published by
' the Free Software Foundation; either version 3 Of the License, Or
' (at your option) any later version.
'
' Software distributed under the License Is distributed On an "AS IS"
' basis, WITHOUT WARRANTY Of ANY KIND, either express Or implied. See the
' License for the specific language governing rights And limitations
' under the License.
'
' The Initial Developer of this Code is Jayed Ahsan Saad
' Copyright© Jayed Ahsan Saad. All Rights Reserved
'
'
Public Class LayoutList_PopUp
Inherits ToolStripRenderer
Protected Overloads Overrides Sub OnRenderMenuItemBackground(e As ToolStripItemRenderEventArgs)
Dim xa = New Point(0, 0)
Dim rc As New Rectangle(xa, e.Item.Size)
Dim c As Color
If e.Item.Selected Then
c = Color.FromArgb(201, 222, 245)
e.Item.ForeColor = Color.FromArgb(20, 20, 20)
Else
c = Color.FromArgb(246, 246, 246)
e.Item.ForeColor = Color.FromArgb(20, 20, 20)
End If
Using brush As New SolidBrush(c)
e.Graphics.FillRectangle(brush, rc)
End Using
End Sub
Protected Overloads Overrides Sub OnRenderItemCheck(e As ToolStripItemImageRenderEventArgs)
Dim xa = New Point(0, 0)
Dim rc As New Rectangle(xa, e.Item.Size)
Dim c As Color
c = Color.FromArgb(253, 253, 253)
e.Item.ForeColor = Color.FromArgb(20, 20, 20)
Using brush As New SolidBrush(c)
e.Graphics.FillRectangle(brush, rc)
End Using
End Sub
Protected Overloads Overrides Sub OnRenderToolStripBorder(e As ToolStripRenderEventArgs)
End Sub
End Class