Skip to content

Commit c1a6e37

Browse files
committed
Dark and light color theme support
1 parent b89a338 commit c1a6e37

28 files changed

Lines changed: 1729 additions & 1320 deletions

‎codeeditor.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ CodeEditor::CodeEditor(QWidget *parent, bool withBeakpoints) :
5757
setWordWrapMode(QTextOption::NoWrap);
5858
firstTopMargin = contentOffset().y();
5959
lineNumberArea = new LineNumberArea(this);
60+
lineNumberPanelColor = settings.value("linenumberpanelcolor", palette().color(QPalette::Window)).value<QColor>();
6061

6162
connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(updateLineNumberAreaWidth(int)));
6263
connect(this, SIGNAL(updateRequest(QRect,int)), this, SLOT(updateLineNumberArea(QRect,int)));
@@ -112,7 +113,7 @@ void CodeEditor::lineNumberAreaPaintEvent(QPaintEvent *event)
112113
{
113114
// !Paint on line number area
114115
QPainter painter(lineNumberArea);
115-
painter.fillRect(event->rect(), settings.value("linenumberpanelcolor", palette().color(QPalette::Window)).value<QColor>());
116+
painter.fillRect(event->rect(), lineNumberPanelColor);
116117

117118
QTextBlock block = firstVisibleBlock();
118119
int blockNumber = block.blockNumber();

‎codeeditor.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ private slots:
114114
bool hasBreakpoints;
115115
int prevBlockCount;
116116
QSettings settings;
117+
QColor lineNumberPanelColor;
117118

118119
signals:
119120
void breakpointsChanged(quint64 lineNumber, bool isAdded);

‎debugger.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ void Debugger::processAction(QString output, QString error)
545545
return;
546546

547547
//print information to log field
548-
emit printLog(output);
548+
emit printLog(output, QSettings("SASM Project", "SASM").value("fontcolor", QPalette().color(QPalette::Text)).value<QColor>());
549549
}
550550

551551
bool Debugger::isStopped()

‎debugger.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public slots:
203203
void started();
204204
void printRegisters(QList<Debugger::registersInfo>);
205205
void printMemory(QList<Debugger::memoryInfo>);
206-
void printLog(QString msg, QColor color = QColor(Qt::black));
206+
void printLog(QString msg, QColor color);
207207
void printOutput(QString msg);
208208
void inMacro();
209209
void wasStopped();

‎language_de.qm‎

521 Bytes
Binary file not shown.

‎language_de.ts‎

Lines changed: 164 additions & 129 deletions
Large diffs are not rendered by default.

‎language_es.qm‎

207 Bytes
Binary file not shown.

‎language_es.ts‎

Lines changed: 161 additions & 136 deletions
Large diffs are not rendered by default.

‎language_fr.qm‎

352 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)