From 2f945dc6fb6670ee00c6f965f3e7e06e84d2fdf1 Mon Sep 17 00:00:00 2001 From: "royqh1979@gmail.com" Date: Tue, 16 Nov 2021 00:03:43 +0800 Subject: [PATCH] - fix: text color for cpu info dialog not correctly setted --- NEWS.md | 3 +++ RedPandaIDE/qsynedit/SynEdit.cpp | 2 ++ .../environmentappearencewidget.cpp | 1 + RedPandaIDE/version.h | 4 ++-- RedPandaIDE/widgets/cpudialog.cpp | 16 ++++++++++++++++ 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index e67be16f..1f61e99a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +Version 0.8.11 For Dev-C++ 7 Beta + - fix: text color for cpu info dialog not correctly setted + Version 0.8.10 For Dev-C++ 7 Beta - fix: Shouldn't update auto link settings, if the header name to be modified is unchanged - fix: add unit to project not correctly set new unit file's encoding diff --git a/RedPandaIDE/qsynedit/SynEdit.cpp b/RedPandaIDE/qsynedit/SynEdit.cpp index 37590b7a..155ae4f3 100644 --- a/RedPandaIDE/qsynedit/SynEdit.cpp +++ b/RedPandaIDE/qsynedit/SynEdit.cpp @@ -59,6 +59,8 @@ SynEdit::SynEdit(QWidget *parent) : QAbstractScrollArea(parent) mRedoList->connect(mRedoList.get(), &SynEditUndoList::addedUndo, this, &SynEdit::onRedoAdded); mOrigRedoList = mRedoList; + mForegroundColor=palette().color(QPalette::Text); + mBackgroundColor=palette().color(QPalette::Base); mCaretColor = QColorConstants::Red; mCaretUseTextColor = false; mActiveLineColor = QColorConstants::Svg::lightblue; diff --git a/RedPandaIDE/settingsdialog/environmentappearencewidget.cpp b/RedPandaIDE/settingsdialog/environmentappearencewidget.cpp index 21c604af..67e9af55 100644 --- a/RedPandaIDE/settingsdialog/environmentappearencewidget.cpp +++ b/RedPandaIDE/settingsdialog/environmentappearencewidget.cpp @@ -58,6 +58,7 @@ void EnvironmentAppearenceWidget::doSave() pSettings->environment().setInterfaceFontSize(ui->spinFontSize->value()); pSettings->environment().setLanguage(ui->cbLanguage->currentData().toString()); + pSettings->editor().save(); pSettings->environment().save(); pMainWindow->applySettings(); } diff --git a/RedPandaIDE/version.h b/RedPandaIDE/version.h index feae575c..f88d7bcc 100644 --- a/RedPandaIDE/version.h +++ b/RedPandaIDE/version.h @@ -1,7 +1,7 @@ #ifndef VERSION_H #define VERSION_H -#include +#include -#define DEVCPP_VERSION "beta.0.8.9" +#define DEVCPP_VERSION "beta.0.8.11" #endif // VERSION_H diff --git a/RedPandaIDE/widgets/cpudialog.cpp b/RedPandaIDE/widgets/cpudialog.cpp index 7edf6159..ccf1281c 100644 --- a/RedPandaIDE/widgets/cpudialog.cpp +++ b/RedPandaIDE/widgets/cpudialog.cpp @@ -13,12 +13,28 @@ CPUDialog::CPUDialog(QWidget *parent) : setWindowFlags(windowFlags() | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint); ui->setupUi(this); ui->txtCode->setHighlighter(highlighterManager.getCppHighlighter()); + ui->txtCode->setReadOnly(true); + ui->txtCode->gutter().setShowLineNumbers(false); + ui->txtCode->setCaretUseTextColor(true); + + ui->txtCode->codeFolding().indentGuides = false; + ui->txtCode->codeFolding().fillIndents = false; + ui->txtCode->setRightEdge(0); + ui->txtCode->setUseCodeFolding(false); highlighterManager.applyColorScheme(ui->txtCode->highlighter(), pSettings->editor().colorScheme()); PColorSchemeItem item = pColorManager->getItem(pSettings->editor().colorScheme(),COLOR_SCHEME_ACTIVE_LINE); if (item) { ui->txtCode->setActiveLineColor(item->background()); } + item = pColorManager->getItem(pSettings->editor().colorScheme(),COLOR_SCHEME_TEXT); + if (item) { + ui->txtCode->setForegroundColor(item->foreground()); + ui->txtCode->setBackgroundColor(item->background()); + } else { + ui->txtCode->setForegroundColor(palette().color(QPalette::Text)); + ui->txtCode->setBackgroundColor(palette().color(QPalette::Base)); + } ui->lstRegister->setModel(pMainWindow->debugger()->registerModel()); ui->rdIntel->setChecked(pSettings->debugger().useIntelStyle());