forked from RedGl0w/atomic
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtable_lines_view.cpp
39 lines (28 loc) · 1.16 KB
/
table_lines_view.cpp
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
#include "table_lines_view.h"
#include <escher/palette.h>
namespace Atomic {
tableLinesView::tableLinesView() :
View()
{
}
void tableLinesView::drawRect(KDContext * ctx, KDRect rect) const {
KDColor color = Palette::AtomTableLines;
// Draw the lines that goes from the Barium to the Lanthanum
// Vertical line:
ctx->fillRect(KDRect(KDPoint(bounds().left() + 10, bounds().top()), KDSize(2, 50)), color);
// Top horizontal line:
ctx->fillRect(KDRect(KDPoint(bounds().left(), bounds().top()), KDSize(10, 2)), color);
// Bottom horizontal line:
ctx->fillRect(KDRect(KDPoint(bounds().left() + 10, bounds().top() + 48), KDSize(10, 2)), color);
// Draw the lines that goes from the Radium to the Actinium
// Vertical line:
ctx->fillRect(KDRect(KDPoint(bounds().left() + 5, bounds().top() + 17), KDSize(2, 50)), color);
// Top horizontal line:
ctx->fillRect(KDRect(KDPoint(bounds().left(), bounds().top() + 17), KDSize(5, 2)), color);
// Bottom horizontal line:
ctx->fillRect(KDRect(KDPoint(bounds().left() + 5, bounds().top() + 65), KDSize(12, 2)), color);
}
KDSize tableLinesView::minimalSizeForOptimalDisplay() const {
return KDSize(17, 69);
}
}