Adding Adikso's Midnight Theme (#1895)

This commit is contained in:
Itay Cohen 2019-12-08 11:57:42 +02:00 committed by xarkes
parent 9929694314
commit a50a8939ef
46 changed files with 1292 additions and 2 deletions

View File

@ -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

View File

@ -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;

View File

@ -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();

View 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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

File diff suppressed because it is too large Load Diff