Added dark theme
@ -137,11 +137,11 @@ void MainWindow::initUI()
|
||||
spacer4->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
|
||||
spacer4->setMinimumSize(10, 10);
|
||||
ui->mainToolBar->insertWidget(ui->actionForward, spacer4);
|
||||
ui->actionForward->setIcon(QIcon(new SvgIconEngine(QString(":/img/icons/arrow_right.svg"), palette().buttonText().color())));
|
||||
ui->actionForward->setIcon(QIcon(new SvgIconEngine(QString(":/img/icons/arrow_right.svg"))));
|
||||
|
||||
// Popup menu on theme toolbar button
|
||||
QToolButton *backButton = new QToolButton(this);
|
||||
backButton->setIcon(QIcon(new SvgIconEngine(QString(":/img/icons/arrow_left.svg"), palette().buttonText().color())));
|
||||
backButton->setIcon(QIcon(new SvgIconEngine(QString(":/img/icons/arrow_left.svg"))));
|
||||
//backButton->setPopupMode(QToolButton::DelayedPopup);
|
||||
ui->mainToolBar->insertWidget(ui->actionForward, backButton);
|
||||
connect(backButton, SIGNAL(clicked()), this, SLOT(backButton_clicked()));
|
||||
@ -371,18 +371,6 @@ bool MainWindow::saveProjectAs(bool quit)
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::toggleTheme()
|
||||
{
|
||||
if (QSettings().value("dark").toBool())
|
||||
{
|
||||
setDefaultTheme();
|
||||
}
|
||||
else
|
||||
{
|
||||
setDarkTheme();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::refreshOmniBar(const QStringList &flags)
|
||||
{
|
||||
omnibar->refresh(flags);
|
||||
@ -487,17 +475,6 @@ void MainWindow::setTabLocation()
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::setDarkTheme()
|
||||
{
|
||||
Config()->setDarkTheme(true);
|
||||
}
|
||||
|
||||
void MainWindow::setDefaultTheme()
|
||||
{
|
||||
Config()->setDarkTheme(false);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::refreshAll()
|
||||
{
|
||||
Core()->triggerRefreshAll();
|
||||
@ -769,16 +746,6 @@ void MainWindow::on_actionRun_Script_triggered()
|
||||
this->core->cmd(". " + fileName);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionDark_Theme_triggered()
|
||||
{
|
||||
this->setDarkTheme();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionWhite_Theme_triggered()
|
||||
{
|
||||
this->setDefaultTheme();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionLoad_triggered()
|
||||
{
|
||||
QProcess process(this);
|
||||
|
@ -81,7 +81,6 @@ public:
|
||||
void addOutput(const QString &msg);
|
||||
void addDebugOutput(const QString &msg);
|
||||
void sendToNotepad(const QString &txt);
|
||||
void toggleTheme();
|
||||
void refreshOmniBar(const QStringList &flags);
|
||||
|
||||
public slots:
|
||||
@ -91,9 +90,6 @@ public slots:
|
||||
void setPanelLock();
|
||||
void setTabLocation();
|
||||
|
||||
void setDarkTheme();
|
||||
void setDefaultTheme();
|
||||
|
||||
void on_actionLock_triggered();
|
||||
|
||||
void on_actionLockUnlock_triggered();
|
||||
@ -102,8 +98,6 @@ public slots:
|
||||
|
||||
void lockUnlock_Docks(bool what);
|
||||
|
||||
void on_actionDark_Theme_triggered();
|
||||
|
||||
void on_actionRun_Script_triggered();
|
||||
|
||||
void toggleResponsive(bool maybe);
|
||||
@ -129,8 +123,6 @@ private slots:
|
||||
void on_actionUndoSeek_triggered();
|
||||
void on_actionRedoSeek_triggered();
|
||||
|
||||
void on_actionWhite_Theme_triggered();
|
||||
|
||||
void on_actionLoad_triggered();
|
||||
|
||||
void on_actionForward_triggered();
|
||||
|
@ -181,7 +181,9 @@ FORMS += \
|
||||
widgets/ClassesWidget.ui
|
||||
|
||||
RESOURCES += \
|
||||
resources.qrc
|
||||
resources.qrc \
|
||||
themes/qdarkstyle/style.qrc
|
||||
|
||||
|
||||
DISTFILES += cutter.astylerc
|
||||
|
||||
|
1
src/themes/qdarkstyle/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/*.pyc
|
BIN
src/themes/qdarkstyle/rc/Hmovetoolbar.png
Normal file
After Width: | Height: | Size: 220 B |
BIN
src/themes/qdarkstyle/rc/Hsepartoolbar.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
src/themes/qdarkstyle/rc/Vmovetoolbar.png
Normal file
After Width: | Height: | Size: 228 B |
BIN
src/themes/qdarkstyle/rc/Vsepartoolbar.png
Normal file
After Width: | Height: | Size: 187 B |
BIN
src/themes/qdarkstyle/rc/branch_closed-on.png
Normal file
After Width: | Height: | Size: 147 B |
BIN
src/themes/qdarkstyle/rc/branch_closed.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
src/themes/qdarkstyle/rc/branch_open-on.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
src/themes/qdarkstyle/rc/branch_open.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
src/themes/qdarkstyle/rc/checkbox_checked.png
Normal file
After Width: | Height: | Size: 492 B |
BIN
src/themes/qdarkstyle/rc/checkbox_checked_disabled.png
Normal file
After Width: | Height: | Size: 491 B |
BIN
src/themes/qdarkstyle/rc/checkbox_checked_focus.png
Normal file
After Width: | Height: | Size: 252 B |
BIN
src/themes/qdarkstyle/rc/checkbox_indeterminate.png
Normal file
After Width: | Height: | Size: 493 B |
BIN
src/themes/qdarkstyle/rc/checkbox_indeterminate_disabled.png
Normal file
After Width: | Height: | Size: 492 B |
BIN
src/themes/qdarkstyle/rc/checkbox_indeterminate_focus.png
Normal file
After Width: | Height: | Size: 249 B |
BIN
src/themes/qdarkstyle/rc/checkbox_unchecked.png
Normal file
After Width: | Height: | Size: 464 B |
BIN
src/themes/qdarkstyle/rc/checkbox_unchecked_disabled.png
Normal file
After Width: | Height: | Size: 464 B |
BIN
src/themes/qdarkstyle/rc/checkbox_unchecked_focus.png
Normal file
After Width: | Height: | Size: 240 B |
BIN
src/themes/qdarkstyle/rc/close-hover.png
Normal file
After Width: | Height: | Size: 598 B |
BIN
src/themes/qdarkstyle/rc/close-pressed.png
Normal file
After Width: | Height: | Size: 598 B |
BIN
src/themes/qdarkstyle/rc/close.png
Normal file
After Width: | Height: | Size: 586 B |
BIN
src/themes/qdarkstyle/rc/down_arrow.png
Normal file
After Width: | Height: | Size: 165 B |
BIN
src/themes/qdarkstyle/rc/down_arrow_disabled.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
src/themes/qdarkstyle/rc/left_arrow.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
src/themes/qdarkstyle/rc/left_arrow_disabled.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
src/themes/qdarkstyle/rc/radio_checked.png
Normal file
After Width: | Height: | Size: 940 B |
BIN
src/themes/qdarkstyle/rc/radio_checked_disabled.png
Normal file
After Width: | Height: | Size: 972 B |
BIN
src/themes/qdarkstyle/rc/radio_checked_focus.png
Normal file
After Width: | Height: | Size: 846 B |
BIN
src/themes/qdarkstyle/rc/radio_unchecked.png
Normal file
After Width: | Height: | Size: 728 B |
BIN
src/themes/qdarkstyle/rc/radio_unchecked_disabled.png
Normal file
After Width: | Height: | Size: 760 B |
BIN
src/themes/qdarkstyle/rc/radio_unchecked_focus.png
Normal file
After Width: | Height: | Size: 646 B |
BIN
src/themes/qdarkstyle/rc/right_arrow.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
src/themes/qdarkstyle/rc/right_arrow_disabled.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
src/themes/qdarkstyle/rc/sizegrip.png
Normal file
After Width: | Height: | Size: 129 B |
BIN
src/themes/qdarkstyle/rc/stylesheet-branch-end.png
Normal file
After Width: | Height: | Size: 224 B |
BIN
src/themes/qdarkstyle/rc/stylesheet-branch-more.png
Normal file
After Width: | Height: | Size: 182 B |
BIN
src/themes/qdarkstyle/rc/stylesheet-vline.png
Normal file
After Width: | Height: | Size: 239 B |
BIN
src/themes/qdarkstyle/rc/transparent.png
Normal file
After Width: | Height: | Size: 195 B |
BIN
src/themes/qdarkstyle/rc/undock.png
Normal file
After Width: | Height: | Size: 578 B |
BIN
src/themes/qdarkstyle/rc/up_arrow.png
Normal file
After Width: | Height: | Size: 158 B |
BIN
src/themes/qdarkstyle/rc/up_arrow_disabled.png
Normal file
After Width: | Height: | Size: 159 B |
46
src/themes/qdarkstyle/style.qrc
Normal file
@ -0,0 +1,46 @@
|
||||
<RCC>
|
||||
<qresource prefix="qss_icons">
|
||||
<file>rc/up_arrow_disabled.png</file>
|
||||
<file>rc/Hmovetoolbar.png</file>
|
||||
<file>rc/stylesheet-branch-end.png</file>
|
||||
<file>rc/branch_closed-on.png</file>
|
||||
<file>rc/stylesheet-vline.png</file>
|
||||
<file>rc/branch_closed.png</file>
|
||||
<file>rc/branch_open-on.png</file>
|
||||
<file>rc/transparent.png</file>
|
||||
<file>rc/right_arrow_disabled.png</file>
|
||||
<file>rc/sizegrip.png</file>
|
||||
<file>rc/close.png</file>
|
||||
<file>rc/close-hover.png</file>
|
||||
<file>rc/close-pressed.png</file>
|
||||
<file>rc/down_arrow.png</file>
|
||||
<file>rc/Vmovetoolbar.png</file>
|
||||
<file>rc/left_arrow.png</file>
|
||||
<file>rc/stylesheet-branch-more.png</file>
|
||||
<file>rc/up_arrow.png</file>
|
||||
<file>rc/right_arrow.png</file>
|
||||
<file>rc/left_arrow_disabled.png</file>
|
||||
<file>rc/Hsepartoolbar.png</file>
|
||||
<file>rc/branch_open.png</file>
|
||||
<file>rc/Vsepartoolbar.png</file>
|
||||
<file>rc/down_arrow_disabled.png</file>
|
||||
<file>rc/undock.png</file>
|
||||
<file>rc/checkbox_checked_disabled.png</file>
|
||||
<file>rc/checkbox_checked_focus.png</file>
|
||||
<file>rc/checkbox_checked.png</file>
|
||||
<file>rc/checkbox_indeterminate.png</file>
|
||||
<file>rc/checkbox_indeterminate_focus.png</file>
|
||||
<file>rc/checkbox_unchecked_disabled.png</file>
|
||||
<file>rc/checkbox_unchecked_focus.png</file>
|
||||
<file>rc/checkbox_unchecked.png</file>
|
||||
<file>rc/radio_checked_disabled.png</file>
|
||||
<file>rc/radio_checked_focus.png</file>
|
||||
<file>rc/radio_checked.png</file>
|
||||
<file>rc/radio_unchecked_disabled.png</file>
|
||||
<file>rc/radio_unchecked_focus.png</file>
|
||||
<file>rc/radio_unchecked.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="qdarkstyle">
|
||||
<file>style.qss</file>
|
||||
</qresource>
|
||||
</RCC>
|
1297
src/themes/qdarkstyle/style.qss
Normal file
@ -2,6 +2,8 @@
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
#include <QFontDatabase>
|
||||
#include <QFile>
|
||||
#include <QApplication>
|
||||
|
||||
Configuration* Configuration::mPtr = nullptr;
|
||||
|
||||
@ -118,6 +120,8 @@ void Configuration::loadDefaultTheme()
|
||||
// Custom
|
||||
setColor("gui.imports", colorA);
|
||||
|
||||
/* Load Qt Theme */
|
||||
qApp->setStyleSheet("");
|
||||
}
|
||||
|
||||
void Configuration::loadDarkTheme()
|
||||
@ -204,6 +208,20 @@ void Configuration::loadDarkTheme()
|
||||
setColor("gui.alt_background", QColor(58, 100, 128));
|
||||
// Custom
|
||||
setColor("gui.imports", colorA);
|
||||
|
||||
|
||||
/* Load Qt Theme */
|
||||
QFile f(":qdarkstyle/style.qss");
|
||||
if (!f.exists())
|
||||
{
|
||||
qWarning() << "Can't find dark theme stylesheet.";
|
||||
}
|
||||
else
|
||||
{
|
||||
f.open(QFile::ReadOnly | QFile::Text);
|
||||
QTextStream ts(&f);
|
||||
qApp->setStyleSheet(ts.readAll());
|
||||
}
|
||||
}
|
||||
|
||||
const QFont Configuration::getFont() const
|
||||
|
@ -81,7 +81,7 @@ void Dashboard::updateContents()
|
||||
else
|
||||
{
|
||||
this->ui->canaryEdit->setText("False");
|
||||
this->ui->canaryEdit->setStyleSheet("color: rgb(255, 0, 0);");
|
||||
//this->ui->canaryEdit->setStyleSheet("color: rgb(255, 0, 0);");
|
||||
}
|
||||
if (item2["crypto"].toBool() == true)
|
||||
{
|
||||
@ -98,7 +98,7 @@ void Dashboard::updateContents()
|
||||
else
|
||||
{
|
||||
this->ui->nxEdit->setText("False");
|
||||
this->ui->nxEdit->setStyleSheet("color: rgb(255, 0, 0);");
|
||||
//this->ui->nxEdit->setStyleSheet("color: rgb(255, 0, 0);");
|
||||
}
|
||||
if (item2["pic"].toBool() == true)
|
||||
{
|
||||
@ -107,7 +107,7 @@ void Dashboard::updateContents()
|
||||
else
|
||||
{
|
||||
this->ui->picEdit->setText("False");
|
||||
this->ui->picEdit->setStyleSheet("color: rgb(255, 0, 0);");
|
||||
//this->ui->picEdit->setStyleSheet("color: rgb(255, 0, 0);");
|
||||
}
|
||||
if (item2["static"].toBool() == true)
|
||||
{
|
||||
|
@ -11,7 +11,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: palette(base);</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">Dashboard</string>
|
||||
|
@ -167,7 +167,7 @@ QVariant FunctionModel::data(const QModelIndex &index, int role) const
|
||||
case Qt::ForegroundRole:
|
||||
if (functionIsImport(function.offset))
|
||||
return QVariant(ConfigColor("gui.imports"));
|
||||
return QVariant(QColor(Qt::black));
|
||||
return QVariant(this->property("color"));
|
||||
|
||||
case FunctionDescriptionRole:
|
||||
return QVariant::fromValue(function);
|
||||
|
@ -57,19 +57,13 @@
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QTreeView::item
|
||||
<string notr="true">
|
||||
QTreeView::item
|
||||
{
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
QToolTip
|
||||
{
|
||||
background-color: #444;
|
||||
border: 3px solid #444;
|
||||
color: rgb(232, 232, 232);
|
||||
font: 11pt "Monaco";
|
||||
}</string>
|
||||
</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
|
@ -23,14 +23,6 @@ SideBar::SideBar(MainWindow *main) :
|
||||
{
|
||||
ui->respButton->setChecked(false);
|
||||
}
|
||||
if (settings.value("dark").toBool())
|
||||
{
|
||||
ui->themesButton->setChecked(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->themesButton->setChecked(false);
|
||||
}
|
||||
}
|
||||
|
||||
SideBar::~SideBar() {}
|
||||
@ -54,25 +46,6 @@ void SideBar::on_lockButton_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void SideBar::themesButtonToggle()
|
||||
{
|
||||
ui->themesButton->click();
|
||||
}
|
||||
|
||||
void SideBar::on_themesButton_clicked()
|
||||
{
|
||||
if (ui->themesButton->isChecked())
|
||||
{
|
||||
// Dark theme
|
||||
this->main->setDarkTheme();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Clear theme
|
||||
this->main->setDefaultTheme();
|
||||
}
|
||||
}
|
||||
|
||||
void SideBar::on_calcInput_textChanged(const QString &arg1)
|
||||
{
|
||||
ui->calcOutput->setText(QString::number(CutterCore::getInstance()->math(arg1)));
|
||||
|
@ -19,17 +19,12 @@ public:
|
||||
explicit SideBar(MainWindow *main);
|
||||
~SideBar();
|
||||
|
||||
public slots:
|
||||
void themesButtonToggle();
|
||||
|
||||
private slots:
|
||||
|
||||
void on_tabsButton_clicked();
|
||||
|
||||
void on_lockButton_clicked();
|
||||
|
||||
void on_themesButton_clicked();
|
||||
|
||||
void on_calcInput_textChanged(const QString &arg1);
|
||||
|
||||
void on_asm2hex_clicked();
|
||||
|