Skip to content

Commit

Permalink
color
Browse files Browse the repository at this point in the history
  • Loading branch information
soramimi committed Dec 1, 2022
1 parent 68bbc34 commit c228ce5
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions src/texteditor/TextEditorTheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,40 @@
#include "TextEditorTheme.h"
#include <memory>


#define COLOR(X) ((QRgb)0x##X)

TextEditorThemePtr TextEditorTheme::Light()
{
TextEditorThemePtr t = std::make_shared<TextEditorTheme>();
t->fg_default = QColor(0, 0, 0);
t->bg_default = QColor(240, 240, 240);
t->fg_line_number = QColor(96, 96, 96);
t->bg_line_number = QColor(208, 208, 208);
t->fg_cursor = QColor(0, 128, 255);
t->bg_current_line = QColor(192, 192, 192);
t->bg_current_line_number = QColor(176, 176, 176);
t->bg_diff_unknown = QColor(208, 208, 208);
t->bg_diff_line_del = QColor(240, 208, 208);
t->bg_diff_line_add = QColor(192, 240, 192);
t->bg_diff_char_del = QColor(240, 160, 160);
t->bg_diff_char_add = QColor(144, 208, 144);
t->fg_default = COLOR(000000);
t->bg_default = COLOR(f0f0f0);
t->fg_line_number = COLOR(606060);
t->bg_line_number = COLOR(d0d0d0);
t->fg_cursor = COLOR(0050ff);
t->bg_current_line = COLOR(c0c0c0);
t->bg_current_line_number = COLOR(b0b0b0);
t->bg_diff_unknown = COLOR(d0d0d0);
t->bg_diff_line_del = COLOR(f0d0d0);
t->bg_diff_line_add = COLOR(c0f0c0);
t->bg_diff_char_del = COLOR(f090c0);
t->bg_diff_char_add = COLOR(80d0c0);
return t;
}

TextEditorThemePtr TextEditorTheme::Dark()
{
TextEditorThemePtr t = std::make_shared<TextEditorTheme>();
t->fg_default = QColor(255, 255, 255);
t->bg_default = QColor(48, 48, 48); // t->bg_default = QColor(0, 0, 64);
t->fg_line_number = QColor(176, 176, 176);
t->bg_line_number = QColor(64, 64, 64);
t->fg_cursor = QColor(0, 128, 255);
t->bg_current_line_number = QColor(96, 96, 96);
t->bg_diff_unknown = QColor(0, 0, 0);
t->bg_diff_line_del = QColor(80, 0, 0);
t->bg_diff_line_add = QColor(0, 64, 0);
t->bg_diff_char_del = QColor(160, 0, 0);
t->bg_diff_char_add = QColor(0, 128, 0);
t->fg_default = COLOR(ffffff);
t->bg_default = COLOR(303030);
t->fg_line_number = COLOR(b0b0b0);
t->bg_line_number = COLOR(404040);
t->fg_cursor = COLOR(0050ff);
t->bg_current_line_number = COLOR(606060);
t->bg_diff_unknown = COLOR(000000);
t->bg_diff_line_del = COLOR(500000);
t->bg_diff_line_add = COLOR(004000);
t->bg_diff_char_del = COLOR(c03070);
t->bg_diff_char_add = COLOR(00a040);
return t;
}

0 comments on commit c228ce5

Please sign in to comment.