-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUIDecoration.cpp
More file actions
98 lines (76 loc) · 2.8 KB
/
UIDecoration.cpp
File metadata and controls
98 lines (76 loc) · 2.8 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#include "StdAfx.h"
#include "UIDecoration.h"
/////////////////////////////////////////////////////////////////////////////////////
//
//
LPCTSTR CTitleShadowUI::GetClass() const
{
return _T("TitleShadowUI");
}
SIZE CTitleShadowUI::EstimateSize(SIZE /*szAvailable*/)
{
return CSize(0, 3);
}
void CTitleShadowUI::DoPaint(HDC hDC, const RECT& /*rcPaint*/)
{
COLORREF clrBack1 = m_pManager->GetThemeColor(UICOLOR_TITLE_BACKGROUND);
COLORREF clrBack2 = m_pManager->GetThemeColor(UICOLOR_DIALOG_BACKGROUND);
RECT rcTop = { m_rcItem.left, m_rcItem.top, m_rcItem.right, m_rcItem.top + 4 };
CBlueRenderEngineUI::DoPaintGradient(hDC, m_pManager, rcTop, clrBack1, clrBack2, true, 4);
}
/////////////////////////////////////////////////////////////////////////////////////
//
//
LPCTSTR CListHeaderShadowUI::GetClass() const
{
return _T("ListHeaderShadowUI");
}
SIZE CListHeaderShadowUI::EstimateSize(SIZE /*szAvailable*/)
{
return CSize(0, 3);
}
void CListHeaderShadowUI::DoPaint(HDC hDC, const RECT& /*rcPaint*/)
{
COLORREF clrBack1, clrBack2;
m_pManager->GetThemeColorPair(UICOLOR_HEADER_BACKGROUND, clrBack1, clrBack2);
RECT rcTop = { m_rcItem.left + 1, m_rcItem.top, m_rcItem.right - 1, m_rcItem.top + 4 };
CBlueRenderEngineUI::DoPaintGradient(hDC, m_pManager, rcTop, clrBack2, clrBack1, true, 8);
}
/////////////////////////////////////////////////////////////////////////////////////
//
//
LPCTSTR CFadedLineUI::GetClass() const
{
return _T("FadedLineUI");
}
SIZE CFadedLineUI::EstimateSize(SIZE /*szAvailable*/)
{
return CSize(0, 10);
}
void CFadedLineUI::DoPaint(HDC hDC, const RECT& /*rcPaint*/)
{
COLORREF clrLine = m_pManager->GetThemeColor(UICOLOR_NAVIGATOR_BORDER_NORMAL);
COLORREF clrDialog = m_pManager->GetThemeColor(UICOLOR_DIALOG_BACKGROUND);
RECT rc1 = { m_rcItem.left, m_rcItem.top + 3, m_rcItem.right - 120, m_rcItem.top + 3 };
CBlueRenderEngineUI::DoPaintLine(hDC, m_pManager, rc1, UICOLOR_NAVIGATOR_BORDER_NORMAL);
RECT rc2 = { m_rcItem.right - 120, m_rcItem.top + 3, m_rcItem.right - 40, m_rcItem.top + 4 };
CBlueRenderEngineUI::DoPaintGradient(hDC, m_pManager, rc2, clrLine, clrDialog, false, 16);
}
/////////////////////////////////////////////////////////////////////////////////////
//
//
LPCTSTR CSeparatorLineUI::GetClass() const
{
return _T("SeparatorLineUI");
}
SIZE CSeparatorLineUI::EstimateSize(SIZE /*szAvailable*/)
{
return CSize(0, 12);
}
void CSeparatorLineUI::DoPaint(HDC hDC, const RECT& /*rcPaint*/)
{
RECT rc1 = { m_rcItem.left, m_rcItem.top + 3, m_rcItem.right - 1, m_rcItem.top + 3 };
CBlueRenderEngineUI::DoPaintLine(hDC, m_pManager, rc1, UICOLOR_EDIT_TEXT_DISABLED);
RECT rc2 = { m_rcItem.left, m_rcItem.top + 4, m_rcItem.right, m_rcItem.top + 4 };
CBlueRenderEngineUI::DoPaintLine(hDC, m_pManager, rc1, UICOLOR_EDIT_TEXT_DISABLED);
}