GUI: Revert my theme changes. The theme selection will only be for the code editor again.
This commit is contained in:
parent
474fed453e
commit
5d021cb41d
|
@ -219,18 +219,3 @@ void CodeEditorStyle::saveSettings(QSettings *settings,
|
|||
}
|
||||
settings->endGroup();
|
||||
}
|
||||
|
||||
static QString rgbStyleString(QColor c)
|
||||
{
|
||||
return QString("rgb(%1,%2,%3)").arg(c.red()).arg(c.green()).arg(c.blue());
|
||||
}
|
||||
|
||||
QString CodeEditorStyle::generateStyleString() const
|
||||
{
|
||||
if (isSystemTheme())
|
||||
return QString();
|
||||
return QString("background:%1; color:%2; selection-background-color:%3;")
|
||||
.arg(rgbStyleString(widgetBGColor))
|
||||
.arg(rgbStyleString(widgetFGColor))
|
||||
.arg(rgbStyleString(highlightBGColor));
|
||||
}
|
||||
|
|
|
@ -72,8 +72,6 @@ public:
|
|||
static CodeEditorStyle loadSettings(QSettings *settings);
|
||||
static void saveSettings(QSettings *settings, const CodeEditorStyle& theStyle);
|
||||
|
||||
QString generateStyleString() const;
|
||||
|
||||
public:
|
||||
bool mSystemTheme;
|
||||
QColor widgetFGColor;
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
|
||||
#include "applicationlist.h"
|
||||
#include "aboutdialog.h"
|
||||
#include "codeeditorstyle.h"
|
||||
#include "common.h"
|
||||
#include "threadhandler.h"
|
||||
#include "fileviewdialog.h"
|
||||
|
@ -155,8 +154,6 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) :
|
|||
|
||||
loadSettings();
|
||||
|
||||
updateStyleSetting();
|
||||
|
||||
mThread->initialize(mUI.mResults);
|
||||
if (mProjectFile)
|
||||
formatAndSetTitle(tr("Project:") + ' ' + mProjectFile->getFilename());
|
||||
|
@ -402,16 +399,6 @@ void MainWindow::saveSettings() const
|
|||
mUI.mResults->saveSettings(mSettings);
|
||||
}
|
||||
|
||||
void MainWindow::updateStyleSetting()
|
||||
{
|
||||
mUI.mResults->updateStyleSetting(mSettings);
|
||||
QString styleSheet = CodeEditorStyle::loadSettings(mSettings).generateStyleString();
|
||||
mUI.mToolBarMain->setStyleSheet(styleSheet);
|
||||
mUI.mToolBarView->setStyleSheet(styleSheet);
|
||||
mUI.mToolBarFilter->setStyleSheet(styleSheet);
|
||||
this->setStyleSheet(styleSheet);
|
||||
}
|
||||
|
||||
void MainWindow::doAnalyzeProject(ImportProject p, const bool checkLibrary, const bool checkConfiguration)
|
||||
{
|
||||
clearResults();
|
||||
|
@ -1027,7 +1014,7 @@ void MainWindow::programSettings()
|
|||
dialog.showNoErrorsMessage(),
|
||||
dialog.showErrorId(),
|
||||
dialog.showInconclusive());
|
||||
this->updateStyleSetting();
|
||||
mUI.mResults->updateStyleSetting(mSettings);
|
||||
const QString newLang = mSettings->value(SETTINGS_LANGUAGE, "en").toString();
|
||||
setLanguage(newLang);
|
||||
}
|
||||
|
|
|
@ -227,9 +227,6 @@ protected slots:
|
|||
|
||||
private:
|
||||
|
||||
/** Set widget themes */
|
||||
void updateStyleSetting();
|
||||
|
||||
/** Get filename for last results */
|
||||
QString getLastResults() const;
|
||||
|
||||
|
|
|
@ -244,9 +244,6 @@ void ResultsView::updateStyleSetting(QSettings *settings)
|
|||
{
|
||||
CodeEditorStyle theStyle(CodeEditorStyle::loadSettings(settings));
|
||||
mUI.mCode->setStyle(theStyle);
|
||||
QString styleString(theStyle.generateStyleString());
|
||||
mUI.mTree->setStyleSheet(styleString);
|
||||
mUI.mDetails->setStyleSheet(styleString);
|
||||
}
|
||||
|
||||
void ResultsView::setCheckDirectory(const QString &dir)
|
||||
|
|
|
@ -420,15 +420,15 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="mTabTheme">
|
||||
<widget class="QWidget" name="mTabEditorStyle">
|
||||
<attribute name="title">
|
||||
<string>Theme</string>
|
||||
<string>Code Editor</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_11">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gboxEditorStyle">
|
||||
<property name="title">
|
||||
<string>Style</string>
|
||||
<string>Code Editor Style</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_12">
|
||||
<item>
|
||||
|
|
Loading…
Reference in New Issue