[Qt] Update resources, Add Dark UI Theme

This commit is contained in:
Marcos Medeiros 2015-04-02 15:09:45 +00:00
parent 9d59a76c38
commit f15afb8d27
19 changed files with 537 additions and 53 deletions

View File

@ -14,7 +14,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
layout()->setContentsMargins(0, 0, 0, 0);
layout()->setSizeConstraint(QLayout::SetFixedSize);
ui->teLicense->setText(util::loadText(tr(":/resource/license.txt")));
ui->teLicense->setText(util::loadText(tr(":/license.txt")));
ui->lblVersion->setText(QString(" FBAlpha %1.%2.%3.%4")
.arg(VER_MAJOR)

View File

@ -32,6 +32,12 @@
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="lblVersion">
<property name="text">

View File

@ -58,10 +58,20 @@ char *TCHARToANSI(const TCHAR* pszInString, char* pszOutString, int nOutSize)
}
QString loadAppStyle(const QString &name)
{
QFile file(name);
file.open(QFile::ReadOnly);
return QString(file.readAll());
}
int main(int argc, char **argv)
{
QApplication app(argc, argv);
app.setStyleSheet(loadAppStyle(":/resource/dark-flat.css"));
MainWindow mw;
mw.show();

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -0,0 +1,501 @@
QWidget, QDialog
{
background: url(:resource/dark-flat-bg.png);
color: #EFF0EF;
}
QHeaderView::section
{
border: none;
border-top: 0.5px solid #686868;
border-bottom: 0.5px solid #0f0f0f;
padding-left: 4px;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #4a4a4a,
stop: 1.0 #2b2b2b );
}
QPushButton
{
border: 0.5px solid #0f0f0f;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #686868 );
padding: 2px;
padding-left: 8px;
padding-right: 8px;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #4a4a4a,
stop: 1.0 #2b2b2b );
}
QPushButton:hover
{
border: 0.5px solid #0f0f0f;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #686868 );
padding: 2px;
padding-left: 8px;
padding-right: 8px;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #8c8c8c,
stop: 1.0 #515152 );
}
QPushButton:focus
{
outline: 0;
border: 0.5px solid #0f0f0f;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #2e65a9 );
padding: 2px;
padding-left: 8px;
padding-right: 8px;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #4282e5,
stop: 1.0 #142dd8 );
}
QPushButton#btnPlay
{
outline: 0;
border: 0.5px solid #0f0f0f;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #652ea9 );
padding: 2px;
padding-left: 8px;
padding-right: 8px;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #8242e5,
stop: 1.0 #2d14d8 );
}
QPushButton#btnPlay:hover
{
border: 0.5px solid #0f0f0f;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #686868 );
padding: 2px;
padding-left: 8px;
padding-right: 8px;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #8242e5,
stop: 1.0 #2da4d8 );
}
QLineEdit, QTextEdit, QSpinBox
{
background: #1f1f1f;
border: 1px solid #0f0f0f;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #1f1f1f );
}
QTreeWidget
{
background: #1f1f1f;
border: 1px solid #0f0f0f;
alternate-background-color: #1d1d1d;
}
QTreeWidget:item:selected, QTreeView::branch:selected
{
outline: 0;
border: none;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #4282e5,
stop: 1.0 #142dd8 );
}
QTreeView::branch:has-siblings:!adjoins-item {
border-image: url(:resource/vline.png) 0;
}
QTreeView::branch:has-siblings:adjoins-item {
border-image: url(:resource/branch-more.png) 0;
}
QTreeView::branch:!has-children:!has-siblings:adjoins-item {
border-image: url(:resource/branch-end.png) 0;
}
QTreeView::branch:has-children:!has-siblings:closed,
QTreeView::branch:closed:has-children:has-siblings {
border-image: none;
image: url(:resource/branch-closed.png);
}
QTreeView::branch:open:has-children:!has-siblings,
QTreeView::branch:open:has-children:has-siblings {
border-image: none;
image: url(:resource/branch-open.png);
}
QMenuBar
{
background: url(:resource/dark-flat-bg.png);
border: 1px solid #0f0f0f;
color: white;
}
QMenuBar:item
{
background: transparent;
}
QMenuBar:item:pressed
{
color: white;
outline: 0;
border: 0.5px solid #0f0f0f;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #2e65a9 );
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #4282e5,
stop: 1.0 #142dd8 );
}
QMenu
{
background: url(:resource/dark-flat-bg.png);
border: 1px solid #0f0f0f;
color: white;
/*padding: 2px;
padding-left: 8px;
padding-right: 8px;*/
}
QMenu::item::selected
{
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #4282e5,
stop: 1.0 #142dd8 );
}
QMenu::separator
{
width: 100%;
height: 1px;
margin-left: 5%;
margin-right: 5%;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #686868 );
}
QLabel#imgTitleScreen, QLabel#imgPreview
{
border: 1px solid #0f0f0f;
}
QToolTip
{
border: 1px solid black;
background-color: #FFFF99;
border-radius: 2px;
padding: 0px;
color: black;
}
QComboBox
{
border: 0.5px solid #0f0f0f;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #686868 );
padding-left: 4px;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #4a4a4a,
stop: 1.0 #2b2b2b );
}
QComboBox::drop-down
{
border: none;
padding: 3px;
}
QComboBox QAbstractItemView
{
background-color: #1f1f1f;
border: 1px solid #0f0f0f;
}
QComboBox::down-arrow
{
image: url(:resource/down_arrow.png);
}
QGroupBox
{
spacing: 5px;
padding-top: 20px;
background: #1f1f1f;
border: 1px solid #0f0f0f;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #1f1f1f );
}
QCheckBox
{
outline: 0;
background: none;
width: 13px;
height: 13px;
}
QCheckBox::indicator
{
width: 16px;
height: 16px;
background: #2f2f2f;
border: 1px solid #0f0f0f;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #1f1f1f );
}
QCheckBox::indicator:hover
{
width: 16px;
height: 16px;
background: #3f3f3f;
border: 1px solid #0f0f0f;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #1f1f1f );
}
QCheckBox::indicator:checked
{
width: 16px;
height: 16px;
background-image: url(:resource/checked.png);
background-position: center;
background-repeat: no-repeat;
border: 1px solid #0f0f0f;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #1f1f1f );
}
/*****************/
QScrollBar:horizontal {
border: 1px solid #222222;
background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0.0 #121212, stop: 0.2 #282828, stop: 1 #484848);
height: 16px;
margin: 0px 20px 0 20px;
}
QScrollBar::handle:horizontal
{
background: QLinearGradient( x1:0 y1:1, x2:0 y2:0, stop:0 #676767, stop:0.5 #878787, stop:0.51 #979797, stop:1 #a7a7a7);
border-radius: 1px;
min-width: 16px;
border: 1px solid #202020;
}
QScrollBar::add-line:horizontal {
border: 1px solid #1b1b19;
background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0.0 #121212, stop: 0.2 #282828, stop: 1 #484848);
width: 20px;
subcontrol-position: right;
subcontrol-origin: margin;
}
QScrollBar::sub-line:horizontal {
border: 1px solid #1b1b19;
background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0.0 #121212, stop: 0.2 #282828, stop: 1 #484848);
width: 20px;
subcontrol-position: left;
subcontrol-origin: margin;
}
QScrollBar::right-arrow:horizontal
{
background-image: url(:resource/right_arrow.png);
background-position: center;
background-repeat: no-repeat;
border: none;
}
QScrollBar::left-arrow:horizontal
{
background-image: url(:resource/left_arrow.png);
background-position: center;
background-repeat: no-repeat;
border: none;
}
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal
{
background: none;
}
/*****************************/
QScrollBar:vertical
{
background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0.0 #121212, stop: 0.2 #282828, stop: 1 #484848);
width: 16px;
margin: 20px 0 20px 0;
border: 1px solid #222222;
}
QScrollBar::handle:vertical
{
background: QLinearGradient( x1:1 y1:0, x2:0 y2:0, stop:0 #676767, stop:0.5 #878787, stop:0.51 #979797, stop:1 #a7a7a7);
border-radius: 1px;
min-height: 16px;
border: 1px solid #202020;
}
QScrollBar::add-line:vertical
{
border: 1px solid #1b1b19;
background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0.0 #121212, stop: 0.2 #282828, stop: 1 #484848);
height: 20px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}
QScrollBar::sub-line:vertical
{
border: 1px solid #1b1b19;
background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0.0 #121212, stop: 0.2 #282828, stop: 1 #484848);
height: 20px;
subcontrol-position: top;
subcontrol-origin: margin;
}
QScrollBar::up-arrow:vertical
{
background-image: url(:resource/up_arrow.png);
background-position: center;
background-repeat: no-repeat;
border: none;
}
QScrollBar::down-arrow:vertical
{
background-image: url(:resource/down_arrow.png);
background-position: center;
background-repeat: no-repeat;
border: none;
}
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical
{
background: none;
}
QTabWidget::pane
{
outline: 0;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #686868 );
}
QTabBar
{
outline: 0;
}
QTabBar::tab
{
border: 0.5px solid #0f0f0f;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #686868 );
border-bottom: none;
padding-left: 3px;
padding-right: 3px;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #4a4a4a,
stop: 1.0 #2b2b2b );
color: white;
}
QTabBar::tab::selected
{
border: 0.5px solid #0f0f0f;
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #686868 );
border-bottom: none;
padding-left: 3px;
padding-right: 3px;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #8c8c8c,
stop: 1.0 #515152 );
color: white;
}
QProgressBar
{
background: #1f1f1f;
border: 1px solid #0f0f0f;
text-align: center;
color: white;
}
QProgressBar::chunk
{
border-top: 2px solid
qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0.0 #0f0f0f,
stop: 1.0 #686868 );
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #8242e5,
stop: 1.0 #2da4d8 );
width: 1px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1008 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -1,48 +0,0 @@
You may freely use, modify, and distribute both the FB Alpha source code and binary, however the following restrictions apply to the FB Alpha original material (see below for a list of libraries with differing licenses, please consult their respective documentation for more information):
- You may not sell, lease, rent or otherwise seek to gain monetary profit from FB Alpha;
- You must make public any changes you make to the source code;
- You must include, verbatim, the full text of this license;
- You may not distribute binaries which support games with copyright dates less then three years old;
- You may not distribute FB Alpha with ROM images unless you have the legal right to distribute them;
- You may use dynamic linked libraries (dlls) for network play only (all other use is prohibited);
- You may not ask for donations to support your work on any project that uses the FB Alpha source code.
FB Alpha can currently be obtained from http://www.barryharris.me.uk/.
FB Alpha would not exist without a lot of code from the MAME project. The MAME project is subject to it's own license, which can be found at http://mamedev.org/legal.html. Due to the use of MAME code in FB Alpha, FB Alpha is also subject to the terms of the MAME license.
FB Alpha is based on Final Burn (formally at http://www.finalburn.com/), see additional text below.
Musashi MC68000/MC68010/MC68EC020 core by Karl Stenerud (http://www.mamedev.org/).
A68K MC68000 core by Mike Coates & Darren Olafson (http://www.mamedev.org/).
YM3812/YM3526/Y8950 core by Jarek Burczynski & Tatsuyuki Satoh (http://www.mamedev.org/).
YM2151 core by Jarek Burczynski (http://www.mamedev.org/).
YM2413 core by Jarek Burczynski (http://www.mamedev.org/).
YMF278B core by R. Belmont & O.Galibert (http://www.mamedev.org/).
YM2608/YM2610/YM2612/YM2203 cores by Jarek Burczynski & Tatsuyuki Satoh (http://www.mamedev.org/).
AY8910/YM2149 core by various authors (http://www.mamedev.org/).
M6502 emulation core by Marat (http://fms.komkon.org/EMUL8/).
I8039 emulation core by Mirko Buffoni (http://www.mamedev.org/).
ARM7 emulation core by Steve Ellenoff (http://www.mamedev.org/).
Z80 emulation core by Juergen Buchmueller (http://www.mamedev.org/).
PNG functionality provided by libpng (http://www.libpng.org/) and PNGlib (http://www.madwizard.org/).
Zip functionality provided by zlib (http://www.zlib.net/).
Ruby functionality provided by ruby (http://http://byuu.org/programming/ruby/)
Some graphics effects provided by the Scale2x, 2xPM, Eagle Graphics, 2xSaI, hq2x/hq3x/hq4x, hq2xS/hq3xS/SuperEagle/2xSaI (VBA), hq2xS/hq3xS/hq2xBold/hq3xBold/EPXB/EPXC (SNES9X ReRecording) and SuperScale libraries (http://scale2x.sourceforge.net/, http://2xpm.freeservers.com/, http://retrofx.com/, http://elektron.its.tudelft.nl/~dalikifa/, http://www.hiend3d.com/, http://code.google.com/p/vba-rerecording/, http://code.google.com/p/snes9x151-rerecording/, http://nebula.emulatronia.com/).
Miscellaneous other components from various sources. Copyright and license information are contained in the relevant parts of the source code.
All material not covered above © 2004-2013 Team FB Alpha.
DISCLAIMER: The authors of FB Alpha don't guarantee its fitness for any purpose, implied or otherwise, and do not accept responsibility for any damages whatsoever that might occur when using FB Alpha. All games emulated by FB Alpha, including any images and sounds therein, are copyrighted by their respective copyright holders. FB Alpha DOES NOT INCLUDE any ROM images of emulated games.
The following information and license conditions accompanied the original Final Burn emulator. They also apply to FB Alpha:
"Copyright (c)2001 Dave (formally of www.finalburn.com), all rights reserved. This refers to all code except where stated otherwise (e.g. unzip and zlib code)."
"You can use, modify and redistribute this code freely as long as you don't do so commercially. This copyright notice must remain with the code. If your program uses this code, you must either distribute or link to the source code. If you modify or improve this code, you must distribute the source code improvements."
"Dave"
"Former Homepage: www.finalburn.com"
"E-mail: dave@finalburn.com"

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 B

View File

@ -6,6 +6,18 @@
<file>resource/tv-not-found-non-essential.ico</file>
<file>resource/misc.bmp</file>
<file>resource/about.bmp</file>
<file>resource/license.txt</file>
<file>resource/dark-flat.css</file>
<file>resource/down_arrow.png</file>
<file>resource/left_arrow.png</file>
<file>resource/right_arrow.png</file>
<file>resource/up_arrow.png</file>
<file>resource/dark-flat-bg.png</file>
<file>resource/checked.png</file>
<file>resource/branch-closed.png</file>
<file>resource/branch-end.png</file>
<file>resource/branch-more.png</file>
<file>resource/branch-open.png</file>
<file>resource/vline.png</file>
<file alias="license.txt">../../license.txt</file>
</qresource>
</RCC>

View File

@ -316,8 +316,8 @@ void SelectDialog::buildDriverTree()
ditem->setText(1, ditem->romName());
ditem->setDriverNo(i);
ditem->setIsParent(false);
ditem->setBackgroundColor(0, QColor(200, 230, 255));
ditem->setBackgroundColor(1, QColor(210, 240, 255));
//ditem->setBackgroundColor(0, QColor(200, 230, 255));
//ditem->setBackgroundColor(1, QColor(210, 240, 255));
itemParent->addChild(ditem);
}
}

View File

@ -109,6 +109,9 @@
</item>
<item>
<widget class="QTreeWidget" name="tvDrivers">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<column>
<property name="text">
<string>Title</string>
@ -130,7 +133,7 @@
<number>0</number>
</property>
<property name="verticalSpacing">
<number>0</number>
<number>3</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">