forked from lstratman/EasyTabs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChromeTabRenderer.cs
46 lines (43 loc) · 1.58 KB
/
ChromeTabRenderer.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
using System.Drawing;
namespace EasyTabs
{
/// <summary>Renderer that produces tabs that mimic the appearance of the Chrome browser.</summary>
public class ChromeTabRenderer : BaseTabRenderer
{
/// <summary>Constructor that initializes the various resources that we use in rendering.</summary>
/// <param name="parentWindow">Parent window that this renderer belongs to.</param>
public ChromeTabRenderer(TitleBarTabs parentWindow)
: base(parentWindow)
{
// Initialize the various images to use during rendering
_activeLeftSideImage = Resources.ChromeLeft;
_activeRightSideImage = Resources.ChromeRight;
_activeCenterImage = Resources.ChromeCenter;
_inactiveLeftSideImage = Resources.ChromeInactiveLeft;
_inactiveRightSideImage = Resources.ChromeInactiveRight;
_inactiveCenterImage = Resources.ChromeInactiveCenter;
_closeButtonImage = Resources.ChromeClose;
_closeButtonHoverImage = Resources.ChromeCloseHover;
_background = Resources.ChromeBackground;
_addButtonImage = new Bitmap(Resources.ChromeAdd);
_addButtonHoverImage = new Bitmap(Resources.ChromeAddHover);
// Set the various positioning properties
CloseButtonMarginTop = 6;
CloseButtonMarginLeft = 2;
AddButtonMarginTop = 5;
AddButtonMarginLeft = -3;
CaptionMarginTop = 5;
IconMarginTop = 6;
IconMarginRight = 5;
AddButtonMarginRight = 5;
}
/// <summary>Since Chrome tabs overlap, we set this property to the amount that they overlap by.</summary>
public override int OverlapWidth
{
get
{
return 16;
}
}
}
}