refs #446, style sheet adjustments

* split up style sheets
* prepared stylesheet, also include placeholder for forthcoming data GUI
This commit is contained in:
Klaus Basan
2015-06-19 23:29:54 +02:00
committed by Mathew Sutcliffe
parent 9d0408138a
commit 091c61c909
11 changed files with 227 additions and 367 deletions

View File

@@ -67,72 +67,8 @@ BlackGui--CInfoArea {
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
/** fix scroll areas **/
/** in flight plan **/
QAbstractScrollArea #qw_FlightPlanTabMain { background-color: black; background-image: url(:/textures/icons/textures/texture-inner.jpg); }
QAbstractScrollArea #qw_RemarksGenerator { background-color: transparent; background-image: url(:/textures/icons/textures/texture-inner.jpg); }
/** in log component **/
QAbstractScrollArea #pg_StatusPageMessages { background-color: black; }
QAbstractScrollArea #pg_StatusPageCons ole { background-color: black; }
/** main GUI parts **/
/** style when main window is frameless **/
#wi_CentralWidgetOutside[framelessMainWindow="true"] {
background-image: url(:/textures/icons/textures/texture-outer.jpg);
background-color: darkslategray;
margin: 0px;
border: 2px solid green;
border-radius: 20px;
}
/** dw_InfoBarStatus has its own style sheet **/
#fr_CentralFrameInside {
margin-right: 5px;
margin-left: 5px;
margin-top: 2px;
margin-bottom: 5px;
}
#gb_AtcStationsOnlineInfo {
border-style: none;
}
#sw_MainMiddle {
padding: 3px;
border: 1px solid green;
border-radius: 10px;
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
#sw_MainMiddle QPushButton {
background-color: rgba(0, 0, 255, 128);
border-style: none;
border-radius:3px;
color: yellow;
padding: 3px;
margin-right: 5px;
}
/** close button with frameless windows **/
#pb_FramelessCloseButton {
background: transparent;
padding: 0px 10px 0px 0px;
margin: 0px;
}
/** for FontDialog etc. **/
#comp_Settings QToolButton {
background-color: rgba(0, 0, 255, 128);
border-style: none;
border-radius:3px;
color: yellow;
}
#wi_MainKeypadArea QPushButton {
/** default for buttons **/
QPushButton {
/** background-image: url(:/textures/icons/textures/texture-inner.jpg); **/
/** need to fix pressed button first **/
background: black;
@@ -145,53 +81,15 @@ QAbstractScrollArea #pg_StatusPageCons ole { background-color: black; }
min-height:20px;
}
#wi_MainKeypadArea QPushButton::checked {
/** background-image: url(:/textures/icons/textures/texture-inner.jpg); **/
/** need to fix pressed button first **/
QPushButton::disabled {
background-color: grey;
border-style: solid;
border-color: yellow;
font: bold;
color: yellow;
}
/** cockpit needs to come after sw_MainMiddle **/
#comp_CockpitComComponent QPushButton {
background-color: transparent;
border-style: solid;
border-radius:3px;
border-width: 0px;
border-color: blue;
color: yellow;
padding: 1px;
margin: 2px;
}
/** fixes scroll area for audio setup and inner background **/
#sa_AudioSetup { background-color: black; }
#sa_AudioComponentInner {
background-image: url(:/textures/icons/textures/texture-inner.jpg);
background-color: black;
}
/** volume buttons **/
#wi_AudioSoundButtons QPushButton {
background-color: transparent;
}
/** COM panel **/
#wip_CockpitComPanelShowHideBar QPushButton {
background-color: transparent;
border-style: solid;
border-radius:3px;
border-width: 0px;
border-color: blue;
}
#le_CommandLineInput {
background-image: url(:/textures/icons/textures/texture-inner.jpg);
margin-bottom: 5px;
padding: 3px;
border-radius: 5px;
border-width: 1px;
border-radius:6px;
border-color: green;
max-height:20px;
min-width:60px;
min-height:20px;
}
QProgressBar {

View File

@@ -1,217 +1,3 @@
/** Main window **/
QWidget {
background-image: url(:/textures/icons/textures/texture-outer.jpg);
background-color: darkslategray;
}
/** Main window **/
QMainWindow {
background-image: url(:/textures/icons/textures/texture-outer.jpg);
background-color: darkslategray;
}
/** separator between info areas and rest **/
/** this hides them **/
QMainWindow::separator {
background: transparent;
width: 0px; /* when vertical */
height: 0px; /* when horizontal */
}
QMainWindow::separator:hover {
background: transparent;
}
QPushButton {
/** background-image: url(:/textures/icons/textures/texture-inner.jpg); **/
/** need to fix pressed button first **/
background: black;
border-style: solid;
border-width: 1px;
border-radius:6px;
border-color: green;
max-height:20px;
min-width:60px;
min-height:20px;
}
QPushButton::disabled {
background-color: grey;
border-style: solid;
border-width: 1px;
border-radius:6px;
border-color: green;
max-height:20px;
min-width:60px;
min-height:20px;
}
QTextEdit {
background: black; /** background is background color here **/
background-image: url(:/textures/icons/textures/texture-inner.jpg);
color: grey;
}
QRadioButton {
background: transparent;
}
QGroupBox {
border: 1px solid green;
margin-top: 2.5ex; /* leave space at the top for the title */
border-radius: 5px;
}
QGroupBox::title {
subcontrol-origin: margin;
subcontrol-position: middle center; /* position at the top center */
padding: 0 5px;
background: transparent;
}
QComboBox {
background-color: black;
border: 1px solid yellow;
}
QTabWidget::pane { /* The tab widget frame */
border: none;
}
QTabWidget::tab-bar {
left: 5px; /* move to the right by 5px */
}
QTabBar::tab {
border: 1px solid green;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
min-width: 30px;
padding: 2px;
padding-left: 4px;
padding-right: 4px;
margin-right: 3px;
}
QTabBar::tab::selected {
background-color: grey;
}
QTabBar::tear {
image: url(:/own/icons/own/transparent1px.png);
max-width: 1px;
}
QTabBar QToolButton { /* the scroll buttons are tool buttons */
background-color: rgba(0, 0, 255, 200);
border: 1px solid green;
}
QHeaderView::section {
border: 1px solid black;
background: transparent;
color: white; /** font **/
padding: 1px;
margin: 0px;
}
QTableView, QTreeView {
border: 1px solid green;
border-radius: 5px;
alternate-background-color: darkslategray;
selection-background-color: blue;
margin-left: 2px;
margin-right: 2px;
margin-top: 2px;
margin-bottom: 2px;
padding:0px;
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
QSizeGrip { }
QScrollArea {
border: 1px solid green;
border-radius: 5px;
}
QScrollBar:horizontal {
border: 2px solid gray;
background: slategray;
height: 10px;
margin: 0px 5px 0px 5px;
}
QScrollBar:vertical {
border: 2px solid gray;
background: slategray;
width: 10px;
margin: 5px 0px 5px 0;
}
QScrollBar::handle:horizontal {
background: black;
min-width: 15px;
}
QScrollBar::handle:vertical {
background: black;
min-height: 15px;
}
QScrollBar::add-line:horizontal {
border: 2px solid gray;
background: blue;
width: 5px;
subcontrol-position: right;
subcontrol-origin: margin;
}
QScrollBar::sub-line:horizontal {
border: 2px solid gray;
background: blue;
width: 5px;
subcontrol-position: left;
subcontrol-origin: margin;
}
QScrollBar::add-line:vertical {
border: 2px solid gray;
background: blue;
height: 5px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}
QScrollBar::sub-line:vertical {
border: 2px solid gray;
background: blue;
height: 5px;
subcontrol-position: top;
subcontrol-origin: margin;
}
QSlider::groove:horizontal {
border: 1px solid gray;
height: 4px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
background: darkslategray;
}
QSlider::handle:horizontal {
background: lightgray;
border: 1px solid darkslategray;
width: 18px;
margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
border-radius: 3px;
}
QSizeGrip {
image: url(:/diagona/icons/diagona/icons/arrow-in-out.png);
padding: 0px 20px 0px 0px;
width: 16px;
height: 16px;
}
#le_CommandLineInput {
background-image: url(:/textures/icons/textures/texture-inner.jpg);
margin-bottom: 5px;

View File

@@ -0,0 +1,20 @@
#le_CommandLineInput {
background-image: url(:/textures/icons/textures/texture-inner.jpg);
margin-bottom: 5px;
padding: 3px;
border-radius: 5px;
}
#comp_Log {
background: transparent; /** background is background color here **/
}
#gb_DBusMode {
background: transparent; /** background is background color here **/
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
#gb_Controls {
background: transparent; /** background is background color here **/
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}

View File

@@ -0,0 +1,141 @@
/**
Resources:
http://qt-project.org/doc/qt-5.3/stylesheet-examples.html
http://web.forret.com/tools/color.asp?RGB=2F4F4F&name=Dark+slate+gray
Remarks:
1) there is no opacity with background image, so we need semitransparent images
2) use -- instead of :: for namespaces
Used dynamic properties
framelessMainWindow (infobar.qss , here)
**/
/** fix scroll areas **/
/** in flight plan **/
QAbstractScrollArea #qw_FlightPlanTabMain { background-color: black; background-image: url(:/textures/icons/textures/texture-inner.jpg); }
QAbstractScrollArea #qw_RemarksGenerator { background-color: transparent; background-image: url(:/textures/icons/textures/texture-inner.jpg); }
/** in log component **/
QAbstractScrollArea #pg_StatusPageMessages { background-color: black; }
QAbstractScrollArea #pg_StatusPageCons ole { background-color: black; }
/** main GUI parts **/
/** style when main window is frameless **/
#wi_CentralWidgetOutside[framelessMainWindow="true"] {
background-image: url(:/textures/icons/textures/texture-outer.jpg);
background-color: darkslategray;
margin: 0px;
border: 2px solid green;
border-radius: 20px;
}
/** dw_InfoBarStatus has its own style sheet **/
#fr_CentralFrameInside {
margin-right: 5px;
margin-left: 5px;
margin-top: 2px;
margin-bottom: 5px;
}
#gb_AtcStationsOnlineInfo {
border-style: none;
}
#sw_MainMiddle {
padding: 3px;
border: 1px solid green;
border-radius: 10px;
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
#sw_MainMiddle QPushButton {
background-color: rgba(0, 0, 255, 128);
border-style: none;
border-radius:3px;
color: yellow;
padding: 0px;
margin-right: 5px;
}
/** close button with frameless windows **/
#pb_FramelessCloseButton {
background: transparent;
padding: 0px 0px 0px 0px;
image-position: right;
margin: 0px;
border: 0px;
}
/** for FontDialog etc. **/
#comp_Settings QToolButton {
background-color: rgba(0, 0, 255, 128);
border-style: none;
border-radius:3px;
color: yellow;
}
#wi_MainKeypadArea QPushButton {
/** background-image: url(:/textures/icons/textures/texture-inner.jpg); **/
/** need to fix pressed button first **/
background: black;
border-style: solid;
border-width: 1px;
border-radius:6px;
border-color: green;
max-height:20px;
min-width:60px;
min-height:20px;
}
#wi_MainKeypadArea QPushButton::checked {
/** background-image: url(:/textures/icons/textures/texture-inner.jpg); **/
/** need to fix pressed button first **/
border-style: solid;
border-color: yellow;
font: bold;
color: yellow;
}
/** cockpit needs to come after sw_MainMiddle **/
#comp_CockpitComComponent QPushButton {
background-color: transparent;
border-style: solid;
border-radius:3px;
border-width: 0px;
border-color: blue;
color: yellow;
padding: 1px;
margin: 2px;
}
/** fixes scroll area for audio setup and inner background **/
#sa_AudioSetup { background-color: black; }
#sa_AudioComponentInner {
background-image: url(:/textures/icons/textures/texture-inner.jpg);
background-color: black;
}
/** volume buttons **/
#wi_AudioSoundButtons QPushButton {
background-color: transparent;
}
/** COM panel **/
#wip_CockpitComPanelShowHideBar QPushButton {
background-color: transparent;
border-style: solid;
border-radius:3px;
border-width: 0px;
border-color: blue;
}
#le_CommandLineInput {
background-image: url(:/textures/icons/textures/texture-inner.jpg);
margin-bottom: 5px;
padding: 3px;
border-radius: 5px;
}

View File

@@ -134,7 +134,7 @@ namespace BlackGui
QString CStyleSheetUtility::styles(const QStringList &fileNames) const
{
QString style;
foreach(QString fileName, fileNames)
for (const QString &fileName : fileNames)
{
if (!this->containsStyle(fileName)) { continue; }
QString s = this->m_styleSheets[fileName.toLower()].trimmed();
@@ -232,9 +232,9 @@ namespace BlackGui
return f;
}
const QString &CStyleSheetUtility::fileNameMainWindow()
const QString &CStyleSheetUtility::fileNameSwiftStandardGui()
{
static const QString f("mainwindow.qss");
static const QString f("swiftstdgui.qss");
return f;
}
@@ -256,6 +256,12 @@ namespace BlackGui
return f;
}
const QString &CStyleSheetUtility::fileNameStandardWidget()
{
static const QString f("stdwidget.qss");
return f;
}
const QString &CStyleSheetUtility::fileNameInfoWindow()
{
static const QString f("stylesheetinfo.qss");
@@ -280,6 +286,12 @@ namespace BlackGui
return f;
}
const QString &CStyleSheetUtility::fileNameSwiftData()
{
static const QString f("swiftdata.qss");
return f;
}
const QString &CStyleSheetUtility::fileNameIniFile()
{
static const QString f("gui.ini");

View File

@@ -66,9 +66,6 @@ namespace BlackGui
//! File name fonts.qss
static const QString &fileNameFonts();
//! File name mainwindow.qss
static const QString &fileNameMainWindow();
//! File name infobar.qss
static const QString &fileNameInfoBar();
@@ -78,6 +75,9 @@ namespace BlackGui
//! File name dockwidgettab.qss
static const QString &fileNameDockWidgetTab();
//! File name for standard widgets
static const QString &fileNameStandardWidget();
//! File name maininfoarea.qss
static const QString &fileNameInfoWindow();
@@ -87,9 +87,15 @@ namespace BlackGui
//! File name maininfoarea.qss
static const QString &fileNameFilterDialog();
//! File name swift standard GUI
static const QString &fileNameSwiftStandardGui();
//! File name swiftcore.qss
static const QString &fileNameSwiftCore();
//! File name swiftcore.qss
static const QString &fileNameSwiftData();
//! File name ini file
static const QString &fileNameIniFile();