1
0
Fork 0

GUI: allow customization of background flicker color

This commit is contained in:
Duncan Ogilvie 2020-07-11 16:41:24 +02:00
parent f597c23ffa
commit e0d736eb2a
4 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,7 @@ AbstractTableViewHeaderTextColor=#E0E0E0
AbstractTableViewSelectionColor=#414141
AbstractTableViewSeparatorColor=#717171
AbstractTableViewTextColor=#E0E0E0
BackgroundFlickerColor=#EF5350
BreakpointSummaryKeywordColor=#89A2F6
BreakpointSummaryParenColor=#E0E0E0
BreakpointSummaryStringColor=#B794F6

View File

@ -556,6 +556,7 @@ void AppearanceDialog::colorInfoListInit()
colorInfoListAppend(tr("Symbol Unloaded Text"), "SymbolUnloadedTextColor", "");
colorInfoListAppend(tr("Symbol Loading Text"), "SymbolLoadingTextColor", "");
colorInfoListAppend(tr("Symbol Loaded Text"), "SymbolLoadedTextColor", "");
colorInfoListAppend(tr("Background Flicker Color"), "BackgroundFlickerColor", "");
//dev helper
const QMap<QString, QColor>* Colors = &Config()->defaultColors;

View File

@ -1,4 +1,5 @@
#include "BackgroundFlickerThread.h"
#include "Configuration.h"
#include <Windows.h>
BackgroundFlickerThread::BackgroundFlickerThread(QWidget* widget, QColor & background, QObject* parent) : QThread(parent), background(background)
@ -15,10 +16,11 @@ void BackgroundFlickerThread::setProperties(int count, int delay)
void BackgroundFlickerThread::run()
{
QColor flickerColor = ConfigColor("BackgroundFlickerColor");
QColor oldColor = background;
for(int i = 0; i < count; i++)
{
background = QColor(Qt::red);
background = flickerColor;
mWidget->update();
Sleep(delay);

View File

@ -242,6 +242,7 @@ Configuration::Configuration() : QObject(), noMoreMsgbox(false)
defaultColors.insert("SymbolUnloadedTextColor", QColor("#000000"));
defaultColors.insert("SymbolLoadingTextColor", QColor("#8B671F"));
defaultColors.insert("SymbolLoadedTextColor", QColor("#008000"));
defaultColors.insert("BackgroundFlickerColor", QColor("#ff6961"));
//bool settings
QMap<QString, bool> disassemblyBool;