Skip to content

Commit c228ce5

Browse files
committed
color
1 parent 68bbc34 commit c228ce5

1 file changed

Lines changed: 24 additions & 24 deletions

File tree

src/texteditor/TextEditorTheme.cpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,40 @@
22
#include "TextEditorTheme.h"
33
#include <memory>
44

5-
5+
#define COLOR(X) ((QRgb)0x##X)
66

77
TextEditorThemePtr TextEditorTheme::Light()
88
{
99
TextEditorThemePtr t = std::make_shared<TextEditorTheme>();
10-
t->fg_default = QColor(0, 0, 0);
11-
t->bg_default = QColor(240, 240, 240);
12-
t->fg_line_number = QColor(96, 96, 96);
13-
t->bg_line_number = QColor(208, 208, 208);
14-
t->fg_cursor = QColor(0, 128, 255);
15-
t->bg_current_line = QColor(192, 192, 192);
16-
t->bg_current_line_number = QColor(176, 176, 176);
17-
t->bg_diff_unknown = QColor(208, 208, 208);
18-
t->bg_diff_line_del = QColor(240, 208, 208);
19-
t->bg_diff_line_add = QColor(192, 240, 192);
20-
t->bg_diff_char_del = QColor(240, 160, 160);
21-
t->bg_diff_char_add = QColor(144, 208, 144);
10+
t->fg_default = COLOR(000000);
11+
t->bg_default = COLOR(f0f0f0);
12+
t->fg_line_number = COLOR(606060);
13+
t->bg_line_number = COLOR(d0d0d0);
14+
t->fg_cursor = COLOR(0050ff);
15+
t->bg_current_line = COLOR(c0c0c0);
16+
t->bg_current_line_number = COLOR(b0b0b0);
17+
t->bg_diff_unknown = COLOR(d0d0d0);
18+
t->bg_diff_line_del = COLOR(f0d0d0);
19+
t->bg_diff_line_add = COLOR(c0f0c0);
20+
t->bg_diff_char_del = COLOR(f090c0);
21+
t->bg_diff_char_add = COLOR(80d0c0);
2222
return t;
2323
}
2424

2525
TextEditorThemePtr TextEditorTheme::Dark()
2626
{
2727
TextEditorThemePtr t = std::make_shared<TextEditorTheme>();
28-
t->fg_default = QColor(255, 255, 255);
29-
t->bg_default = QColor(48, 48, 48); // t->bg_default = QColor(0, 0, 64);
30-
t->fg_line_number = QColor(176, 176, 176);
31-
t->bg_line_number = QColor(64, 64, 64);
32-
t->fg_cursor = QColor(0, 128, 255);
33-
t->bg_current_line_number = QColor(96, 96, 96);
34-
t->bg_diff_unknown = QColor(0, 0, 0);
35-
t->bg_diff_line_del = QColor(80, 0, 0);
36-
t->bg_diff_line_add = QColor(0, 64, 0);
37-
t->bg_diff_char_del = QColor(160, 0, 0);
38-
t->bg_diff_char_add = QColor(0, 128, 0);
28+
t->fg_default = COLOR(ffffff);
29+
t->bg_default = COLOR(303030);
30+
t->fg_line_number = COLOR(b0b0b0);
31+
t->bg_line_number = COLOR(404040);
32+
t->fg_cursor = COLOR(0050ff);
33+
t->bg_current_line_number = COLOR(606060);
34+
t->bg_diff_unknown = COLOR(000000);
35+
t->bg_diff_line_del = COLOR(500000);
36+
t->bg_diff_line_add = COLOR(004000);
37+
t->bg_diff_char_del = COLOR(c03070);
38+
t->bg_diff_char_add = COLOR(00a040);
3939
return t;
4040
}
4141

0 commit comments

Comments
 (0)