Adding Adikso's Midnight Theme (#1895)
@ -576,7 +576,8 @@ FORMS += \
|
||||
RESOURCES += \
|
||||
resources.qrc \
|
||||
themes/native/native.qrc \
|
||||
themes/qdarkstyle/style.qrc \
|
||||
themes/qdarkstyle/dark.qrc \
|
||||
themes/midnight/midnight.qrc \
|
||||
themes/lightstyle/light.qrc
|
||||
|
||||
|
||||
|
@ -354,6 +354,25 @@ void Configuration::loadDarkStylesheet()
|
||||
}
|
||||
}
|
||||
|
||||
void Configuration::loadMidnightStylesheet()
|
||||
{
|
||||
/* Load Qt Theme */
|
||||
QFile f(":midnight/style.css");
|
||||
if (!f.exists()) {
|
||||
qWarning() << "Can't find Midnight theme stylesheet.";
|
||||
} else {
|
||||
f.open(QFile::ReadOnly | QFile::Text);
|
||||
QTextStream ts(&f);
|
||||
QString stylesheet = ts.readAll();
|
||||
|
||||
QPalette p = qApp->palette();
|
||||
p.setColor(QPalette::Text, Qt::white);
|
||||
qApp->setPalette(p);
|
||||
|
||||
qApp->setStyleSheet(stylesheet);
|
||||
}
|
||||
}
|
||||
|
||||
const QFont Configuration::getBaseFont() const
|
||||
{
|
||||
QFont font = s.value("font", QFont("Inconsolata", 11)).value<QFont>();
|
||||
@ -403,6 +422,8 @@ void Configuration::setInterfaceTheme(int theme)
|
||||
loadNativeStylesheet();
|
||||
} else if (interfaceTheme.name == "Dark") {
|
||||
loadDarkStylesheet();
|
||||
} else if (interfaceTheme.name == "Midnight") {
|
||||
loadMidnightStylesheet();
|
||||
} else if (interfaceTheme.name == "Light") {
|
||||
loadLightStylesheet();
|
||||
} else {
|
||||
@ -535,6 +556,7 @@ const QList<CutterInterfaceTheme>& Configuration::cutterInterfaceThemesList()
|
||||
static const QList<CutterInterfaceTheme> list = {
|
||||
{ "Native", Configuration::nativeWindowIsDark() ? DarkFlag : LightFlag },
|
||||
{ "Dark", DarkFlag },
|
||||
{ "Midnight", DarkFlag },
|
||||
{ "Light", LightFlag }
|
||||
};
|
||||
return list;
|
||||
|
@ -20,7 +20,7 @@ class QTextDocument;
|
||||
|
||||
enum ColorFlags {
|
||||
LightFlag = 1,
|
||||
DarkFlag = 2
|
||||
DarkFlag = 2,
|
||||
};
|
||||
|
||||
struct CutterInterfaceTheme {
|
||||
@ -47,6 +47,7 @@ private:
|
||||
void loadNativeStylesheet();
|
||||
void loadLightStylesheet();
|
||||
void loadDarkStylesheet();
|
||||
void loadMidnightStylesheet();
|
||||
|
||||
// Asm Options
|
||||
void applySavedAsmOptions();
|
||||
|
46
src/themes/midnight/midnight.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="midnight">
|
||||
<file>style.css</file>
|
||||
</qresource>
|
||||
</RCC>
|
BIN
src/themes/midnight/rc/Hmovetoolbar.png
Normal file
After Width: | Height: | Size: 220 B |
BIN
src/themes/midnight/rc/Hsepartoolbar.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
src/themes/midnight/rc/Vmovetoolbar.png
Normal file
After Width: | Height: | Size: 228 B |
BIN
src/themes/midnight/rc/Vsepartoolbar.png
Normal file
After Width: | Height: | Size: 187 B |
BIN
src/themes/midnight/rc/branch_closed-on.png
Normal file
After Width: | Height: | Size: 147 B |
BIN
src/themes/midnight/rc/branch_closed.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
src/themes/midnight/rc/branch_open-on.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
src/themes/midnight/rc/branch_open.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
src/themes/midnight/rc/checkbox_checked.png
Normal file
After Width: | Height: | Size: 492 B |
BIN
src/themes/midnight/rc/checkbox_checked_disabled.png
Normal file
After Width: | Height: | Size: 491 B |
BIN
src/themes/midnight/rc/checkbox_checked_focus.png
Normal file
After Width: | Height: | Size: 252 B |
BIN
src/themes/midnight/rc/checkbox_indeterminate.png
Normal file
After Width: | Height: | Size: 493 B |
BIN
src/themes/midnight/rc/checkbox_indeterminate_disabled.png
Normal file
After Width: | Height: | Size: 492 B |
BIN
src/themes/midnight/rc/checkbox_indeterminate_focus.png
Normal file
After Width: | Height: | Size: 249 B |
BIN
src/themes/midnight/rc/checkbox_unchecked.png
Normal file
After Width: | Height: | Size: 464 B |
BIN
src/themes/midnight/rc/checkbox_unchecked_disabled.png
Normal file
After Width: | Height: | Size: 464 B |
BIN
src/themes/midnight/rc/checkbox_unchecked_focus.png
Normal file
After Width: | Height: | Size: 240 B |
BIN
src/themes/midnight/rc/close-hover.png
Normal file
After Width: | Height: | Size: 598 B |
BIN
src/themes/midnight/rc/close-pressed.png
Normal file
After Width: | Height: | Size: 598 B |
BIN
src/themes/midnight/rc/close.png
Normal file
After Width: | Height: | Size: 586 B |
BIN
src/themes/midnight/rc/down_arrow.png
Normal file
After Width: | Height: | Size: 165 B |
BIN
src/themes/midnight/rc/down_arrow_disabled.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
src/themes/midnight/rc/left_arrow.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
src/themes/midnight/rc/left_arrow_disabled.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
src/themes/midnight/rc/radio_checked.png
Normal file
After Width: | Height: | Size: 940 B |
BIN
src/themes/midnight/rc/radio_checked_disabled.png
Normal file
After Width: | Height: | Size: 972 B |
BIN
src/themes/midnight/rc/radio_checked_focus.png
Normal file
After Width: | Height: | Size: 846 B |
BIN
src/themes/midnight/rc/radio_unchecked.png
Normal file
After Width: | Height: | Size: 728 B |
BIN
src/themes/midnight/rc/radio_unchecked_disabled.png
Normal file
After Width: | Height: | Size: 760 B |
BIN
src/themes/midnight/rc/radio_unchecked_focus.png
Normal file
After Width: | Height: | Size: 646 B |
BIN
src/themes/midnight/rc/right_arrow.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
src/themes/midnight/rc/right_arrow_disabled.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
src/themes/midnight/rc/sizegrip.png
Normal file
After Width: | Height: | Size: 129 B |
BIN
src/themes/midnight/rc/stylesheet-branch-end.png
Normal file
After Width: | Height: | Size: 224 B |
BIN
src/themes/midnight/rc/stylesheet-branch-more.png
Normal file
After Width: | Height: | Size: 182 B |
BIN
src/themes/midnight/rc/stylesheet-vline.png
Normal file
After Width: | Height: | Size: 239 B |
BIN
src/themes/midnight/rc/transparent.png
Normal file
After Width: | Height: | Size: 195 B |
BIN
src/themes/midnight/rc/undock.png
Normal file
After Width: | Height: | Size: 578 B |
BIN
src/themes/midnight/rc/up_arrow.png
Normal file
After Width: | Height: | Size: 158 B |
BIN
src/themes/midnight/rc/up_arrow_disabled.png
Normal file
After Width: | Height: | Size: 159 B |