diff --git a/client.pro b/client.pro index 32d3e7de4..b955e9839 100644 --- a/client.pro +++ b/client.pro @@ -32,6 +32,7 @@ contains(BLACK_CONFIG, Samples) { SUBDIRS += samples/blackmiscquantities/sample_quantities_aviation.pro SUBDIRS += samples/blackmiscdbus/sample_blackmisc_dbus.pro SUBDIRS += samples/blackgui/sample_blackgui.pro + SUBDIRS += samples/blackgui2/sample_blackgui2.pro SUBDIRS += samples/blackcore/sample_blackcore.pro SUBDIRS += samples/blackmisc/sample_blackmisc.pro SUBDIRS += samples/voiceclient/sample_voice_client.pro diff --git a/samples/blackgui2/dockwindow.cpp b/samples/blackgui2/dockwindow.cpp new file mode 100644 index 000000000..e392abcb3 --- /dev/null +++ b/samples/blackgui2/dockwindow.cpp @@ -0,0 +1,45 @@ +#include "dockwindow.h" +#include "ui_dockwindow.h" +#include + +CDockWindow::CDockWindow(GuiModes::WindowMode windowMode, QWidget *parent) : + QMainWindow(parent, windowMode == GuiModes::WindowFrameless ? (Qt::Window | Qt::FramelessWindowHint) : Qt::Tool), + ui(new Ui::CDockWindow), + m_windowMode(windowMode) +{ + ui->setupUi(this); + connect(this->ui->dw_Edit, &QDockWidget::topLevelChanged, this, &CDockWindow::dockWindowTopLevelChanged); +} + +void CDockWindow::mouseMoveEvent(QMouseEvent *event) +{ + if (this->m_windowMode == GuiModes::WindowFrameless && event->buttons() & Qt::LeftButton) + { + move(event->globalPos() - this->m_dragPosition); + event->accept(); + return; + } + QWidget::mouseMoveEvent(event); +} + +void CDockWindow::mousePressEvent(QMouseEvent *event) +{ + if (this->m_windowMode == GuiModes::WindowFrameless && event->button() == Qt::LeftButton) + { + this->m_dragPosition = event->globalPos() - this->frameGeometry().topLeft(); + event->accept(); + return; + } + QWidget::mousePressEvent(event); +} + +void CDockWindow::dockWindowTopLevelChanged(bool topLevel) +{ + if (topLevel) + this->adjustSize(); +} + +CDockWindow::~CDockWindow() +{ + delete ui; +} diff --git a/samples/blackgui2/dockwindow.h b/samples/blackgui2/dockwindow.h new file mode 100644 index 000000000..c64edec3e --- /dev/null +++ b/samples/blackgui2/dockwindow.h @@ -0,0 +1,46 @@ +#ifndef BLACKGUI_DOCKWINDOW_H +#define BLACKGUI_DOCKWINDOW_H + +#include "guimodeenums.h" +#include + +namespace Ui +{ + class CDockWindow; +} + +class CDockWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit CDockWindow(GuiModes::WindowMode windowMode, QWidget *parent = nullptr); + ~CDockWindow(); + +protected: + + /*! + * \brief Mouse moving, required for frameless window + */ + void mouseMoveEvent(QMouseEvent *event); + + /*! + * \brief Mouse press, required for frameless window + */ + void mousePressEvent(QMouseEvent *event); + +private: + Ui::CDockWindow *ui; + GuiModes::WindowMode m_windowMode; + + // frameless window + QPoint m_dragPosition; /*!< position, if moving is handled with frameless window */ + +private slots: + //! \brief Docked window is floating / docked again + void dockWindowTopLevelChanged(bool topLevel); + + +}; + +#endif // DOCKWINDOW_H diff --git a/samples/blackgui2/dockwindow.ui b/samples/blackgui2/dockwindow.ui new file mode 100644 index 000000000..e44e321c2 --- /dev/null +++ b/samples/blackgui2/dockwindow.ui @@ -0,0 +1,593 @@ + + + CDockWindow + + + + 0 + 0 + 323 + 332 + + + + + 0 + 0 + + + + MainWindow + + + QTabWidget::Triangular + + + QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks + + + false + + + + + 0 + 0 + + + + + 16777215 + 100 + + + + + + + 0 + 0 + 323 + 21 + + + + + + + 0 + 0 + + + + + 524287 + 40 + + + + false + + + 8 + + + + + 0 + 0 + + + + + + + + + + 0 + 0 + + + + #qw_ComPanel { + background: #89a3ae; +} + +QLineEdit { + background: transparent; + text-align: right; +} + +#qw_ComPanelCom1Active, +#qw_ComPanelCom2Active, +#qw_ComPanelTransponderTop, +#qw_ComPanelCom1Standby, +#qw_ComPanelCom2Standby +{ + border: 1px solid black; + border-radius: 5px; +} + +#qw_ComPanelCom1Active, +#qw_ComPanelCom2Active, +#qw_ComPanelTransponderTop +{ + background: #262727; +} + +#qw_ComPanelCom1Standby, +#qw_ComPanelCom2Standby +{ + background: #265168; +} + +#qw_ComPanelCom1Active QLineEdit, +#qw_ComPanelCom2Active QLineEdit, +#qw_ComPanelTransponderTop QLineEdit +{ + font: 16px bold "Arial"; + color: lightgreen; + padding-left: 2px; +} + +#qw_ComPanelCom1Active QLabel, +#qw_ComPanelCom2Active QLabel, +#qw_ComPanelTransponderTop QLabel +{ + color: white; + padding-left: 2px; +} + +#qw_ComPanelCom1Standby QLineEdit, +#qw_ComPanelCom2Standby QLineEdit +{ + font: 14px "Arial"; + color: white; + padding-left: 2px; +} + +#qw_ComPanelCom1Standby QLabel, +#qw_ComPanelCom2Standby QLabel +{ + color: white; + padding-left: 2px; +} + + + + 4 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QLayout::SetDefaultConstraint + + + 4 + + + 2 + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + standby: + + + + + + + DDD.990 + + + 123.750 + + + 7 + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 16777215 + 15 + + + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + standby: + + + + + + + DDD.990 + + + 123.750 + + + 7 + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 16777215 + 15 + + + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + XPDR: + + + + + + + 9999 + + + 7000 + + + 4 + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + COM1: + + + qw_ComPanelCom1Active + + + + + + + DDD.990 + + + 123.750 + + + 7 + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + :/blackgui/icons/audiovolumelow.png + + + + + + + + + + :/blackgui/icons/loginred.png + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + COM2: + + + qw_ComPanelCom2Active + + + + + + + DDD.990 + + + 128.800 + + + 7 + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 2 + + + 0 + + + + + + 16777215 + 15 + + + + + + + + + + + + 16777215 + 15 + + + + + + + + + + + + 16777215 + 15 + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/blackgui2/guimodeenums.h b/samples/blackgui2/guimodeenums.h new file mode 100644 index 000000000..0ac568c6a --- /dev/null +++ b/samples/blackgui2/guimodeenums.h @@ -0,0 +1,30 @@ +/* Copyright (C) 2013 VATSIM Community / authors + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef SAMPLE_GUIMODEENUMS_H +#define SAMPLE_GUIMODEENUMS_H + +struct GuiModes { + +public: + /*! + * \brief Window mode + */ + enum WindowMode { + WindowFrameless, + WindowNormal + }; + + /*! + * \brief Core runs how and where? + */ + enum CoreMode { + CoreInGuiProcess, + CoreExternal, + CoreExternalVoiceLocal + }; +}; + +#endif // guard diff --git a/samples/blackgui2/introwindow.cpp b/samples/blackgui2/introwindow.cpp new file mode 100644 index 000000000..d678f2287 --- /dev/null +++ b/samples/blackgui2/introwindow.cpp @@ -0,0 +1,60 @@ +#include "introwindow.h" +#include "ui_introwindow.h" +#include +#include + +/* + * Constructor + */ +CIntroWindow::CIntroWindow(QWidget *parent) : + QDialog(parent, Qt::Tool), + ui(new Ui::CIntroWindow) +{ + ui->setupUi(this); + this->layout()->setSizeConstraint(QLayout::SetFixedSize); +} + +/* + * Destructor + */ +CIntroWindow::~CIntroWindow() { } + +/* + * Window mode + */ +GuiModes::WindowMode CIntroWindow::getWindowMode() const +{ + if (this->ui->rb_WindowNormal->isChecked()) return GuiModes::WindowNormal; + if (this->ui->rb_WindowFrameless->isChecked()) return GuiModes::WindowFrameless; + qFatal("Illegal GUI status (window mode"); + return GuiModes::WindowNormal; // just for compiler warning +} + +/* + * Core mode + */ +GuiModes::CoreMode CIntroWindow::getCoreMode() const +{ + if (this->ui->rb_CoreExternal->isChecked())return GuiModes::CoreExternal; + if (this->ui->rb_CoreExternalVoiceLocal->isChecked()) return GuiModes::CoreExternalVoiceLocal; + if (this->ui->rb_CoreInGuiProcess->isChecked()) return GuiModes::CoreInGuiProcess; + qFatal("Illegal GUI status (core mode"); + return GuiModes::CoreExternal; // just for compiler warning +} + + +/* + * Button clicked + */ +void CIntroWindow::buttonClicked() const +{ + QObject *sender = QObject::sender(); + if (sender == this->ui->pb_ModelDb) + { + QDesktopServices::openUrl(QUrl("http://vatrep.vatsim-germany.org/page/index.php", QUrl::TolerantMode)); + } + else if (sender == this->ui->pb_WebSite) + { + QDesktopServices::openUrl(QUrl("https://dev.vatsim-germany.org/", QUrl::TolerantMode)); + } +} diff --git a/samples/blackgui2/introwindow.h b/samples/blackgui2/introwindow.h new file mode 100644 index 000000000..7fb9c38f0 --- /dev/null +++ b/samples/blackgui2/introwindow.h @@ -0,0 +1,56 @@ +/* Copyright (C) 2013 VATSIM Community / authors + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef SAMPLE_INTROWINDOW_H +#define SAMPLE_INTROWINDOW_H + +#include "guimodeenums.h" +#include +#include + +namespace Ui +{ + class CIntroWindow; +} + +class CIntroWindow : public QDialog +{ + Q_OBJECT + +public: + /*! + * \brief Constructor + * \param parent widget + */ + explicit CIntroWindow(QWidget *parent = nullptr); + + /*! + * Destructor + */ + ~CIntroWindow(); + + /*! + * \brief Selected window mode + * \see GuiModes::WindowMode + */ + GuiModes::WindowMode getWindowMode() const; + + /*! + * \brief Get core mode + * \see GuiModes::CoreMode + */ + GuiModes::CoreMode getCoreMode() const; + +private slots: + /*! + * \brief Button has been clicked + */ + void buttonClicked() const; + +private: + QScopedPointer ui; +}; + +#endif // guard diff --git a/samples/blackgui2/introwindow.ui b/samples/blackgui2/introwindow.ui new file mode 100644 index 000000000..557f2bfcb --- /dev/null +++ b/samples/blackgui2/introwindow.ui @@ -0,0 +1,289 @@ + + + CIntroWindow + + + + 0 + 0 + 239 + 260 + + + + BlackGUI intro screen + + + + :/blackgui/icons/aircraftdeparture.png:/blackgui/icons/aircraftdeparture.png + + + QWidget { + font-family: arial-rounded; + font: bold 10px; + color: yellow; /** font **/ + background-color: black; +} + +QPushButton { + background-color: rgba(255, 255, 0, 175); + color: black; + border-style: solid; + border-width:1px; + border-radius: 5px; + border-color: green; + margin: 3px; + padding: 3px; +} + +QRadioButton { + background-color: transparent; +} + +QGroupBox { + border: 2px solid yellow; + border-radius: 5px; + margin-top: 2ex; /* leave space at the top for the title */ +} + + + QGroupBox::title { + subcontrol-origin: margin; + subcontrol-position: top left; /* position at the top center */ + padding: 0 0px; + margin: 0px; + background-color: black; + } + +#lbl_Icon { + max-height: 128; + max-width: 128; + +} + + + false + + + true + + + + + + 9 + + + 9 + + + 0 + + + 9 + + + 9 + + + + + Window + + + + + + Normal + + + true + + + + + + + Frameless + + + + + + + + + + Core + + + + + + Included in GUI +process + + + + + + + External (DBus) + + + true + + + + + + + External, +voice included + + + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 2 + + + 2 + + + 0 + + + 2 + + + + + Model DB + + + + + + + Web site + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + + bb_OkCancel + accepted() + CIntroWindow + accept() + + + 257 + 230 + + + 157 + 274 + + + + + bb_OkCancel + rejected() + CIntroWindow + reject() + + + 310 + 230 + + + 286 + 274 + + + + + pb_ModelDb + clicked() + CIntroWindow + buttonClicked() + + + 217 + 34 + + + 319 + 37 + + + + + pb_WebSite + clicked() + CIntroWindow + buttonClicked() + + + 262 + 58 + + + 322 + 73 + + + + + + buttonClicked() + + diff --git a/samples/blackgui2/main.cpp b/samples/blackgui2/main.cpp new file mode 100644 index 000000000..db6a026d1 --- /dev/null +++ b/samples/blackgui2/main.cpp @@ -0,0 +1,57 @@ +#include "introwindow.h" +#include "dockwindow.h" +#include "guimodeenums.h" +#include "blackmisc/blackmiscfreefunctions.h" +#include +#include +#include +#include + +/*! + * \brief Main + * \param argc + * \param argv + * \return + */ +int main(int argc, char *argv[]) +{ + // register + Q_INIT_RESOURCE(blackgui); + BlackMisc::initResources(); + BlackMisc::registerMetadata(); + // BlackMisc::displayAllUserMetatypesTypes(); + + QFile file(":blackmisc/translations/blackmisc_i18n_de.qm"); + qDebug() << (file.exists() ? "Found translations in resources" : "No translations in resources"); + QTranslator translator; + if (translator.load("blackmisc_i18n_de", ":blackmisc/translations/")) + { + qDebug() << "Translator loaded"; + } + + // app + QApplication a(argc, argv); + a.installTranslator(&translator); + + // modes + GuiModes::WindowMode windowMode; + GuiModes::CoreMode coreMode; + + // Dialog to decide external or internal core + CIntroWindow intro; + if (intro.exec() == QDialog::Rejected) + { + return 0; + } + else + { + coreMode = intro.getCoreMode(); + windowMode = intro.getWindowMode(); + } + intro.close(); + + // Window + CDockWindow dockWindow(windowMode); + dockWindow.show(); + return a.exec(); +} diff --git a/samples/blackgui2/sample_blackgui2.pro b/samples/blackgui2/sample_blackgui2.pro new file mode 100644 index 000000000..2ad01a205 --- /dev/null +++ b/samples/blackgui2/sample_blackgui2.pro @@ -0,0 +1,34 @@ +include (../../config.pri) +include (../../build.pri) + +QT += core dbus gui network xml multimedia +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = sample_blackgui2 +TEMPLATE = app + +SOURCES += *.cpp +HEADERS += *.h +FORMS += *.ui +CONFIG += blackmisc blacksound blackcore blackgui blacksim + +DEPENDPATH += . ../../src/blackmisc ../../src/blackgui ../../src/blacksound ../../src/blacksim ../../src/blackcore +INCLUDEPATH += . ../../src + +DESTDIR = ../../bin + +win32:!win32-g++*: PRE_TARGETDEPS += ../../lib/blackmisc.lib \ + ../../lib/blackgui.lib \ + ../../lib/blacksim.lib \ + ../../lib/blacksound.lib \ + ../../lib/blackcore.lib + +else: PRE_TARGETDEPS += ../../lib/libblackmisc.a \ + ../../lib/libblackgui.a \ + ../../lib/libblacksim.a \ + ../../lib/libblacksound.a \ + ../../lib/libblackcore.a + +OTHER_FILES += *.qss + +include (../../libraries.pri) diff --git a/samples/blackgui2/stylesheetinfo.qss b/samples/blackgui2/stylesheetinfo.qss new file mode 100644 index 000000000..4baa689f7 --- /dev/null +++ b/samples/blackgui2/stylesheetinfo.qss @@ -0,0 +1,23 @@ +QWidget { + font-family: arial-rounded; + font: bold 10px; + color: black; /** font **/ +} + +QPushButton { + background-color: rgba(255, 255, 0, 175); + border-style: solid; + border-width:1px; + border-radius:0px; + border-color: green; + max-height:20px; +} + +QTextEdit { + background-color: rgba(255, 255, 0, 175); + border-style: solid; + border-width:1px; + border-radius:6px; + border-color: green; + opacity: 0.5; +} diff --git a/samples/blackgui2/stylesheetintro.qss b/samples/blackgui2/stylesheetintro.qss new file mode 100644 index 000000000..4baa689f7 --- /dev/null +++ b/samples/blackgui2/stylesheetintro.qss @@ -0,0 +1,23 @@ +QWidget { + font-family: arial-rounded; + font: bold 10px; + color: black; /** font **/ +} + +QPushButton { + background-color: rgba(255, 255, 0, 175); + border-style: solid; + border-width:1px; + border-radius:0px; + border-color: green; + max-height:20px; +} + +QTextEdit { + background-color: rgba(255, 255, 0, 175); + border-style: solid; + border-width:1px; + border-radius:6px; + border-color: green; + opacity: 0.5; +} diff --git a/samples/blackgui2/stylesheetmain.qss b/samples/blackgui2/stylesheetmain.qss new file mode 100644 index 000000000..acfc52b8f --- /dev/null +++ b/samples/blackgui2/stylesheetmain.qss @@ -0,0 +1,331 @@ +/** http://qt-project.org/doc/qt-4.8/stylesheet-examples.html **/ + +QWidget { + background-color: black; + font: bold 10px; + color: white; /** font **/ +} + +QProgressBar { + border: 1px solid green; + border-radius: 5px; + text-align: center; + padding: 0px; + height: 16px; +} + +QProgressBar::chunk { + background-color: darkblue; + width: 10px; + margin: 0.5px; +} + +#wi_CentralWidgetOutside { + /** there is no opacity with background image, so we need semitransparent images **/ + /** background-image: url(:/blackgui/icons/titaniumtexture.jpg) **/ + /** border: 2px solid green; **/ + /** border-radius: 20px; **/ + background-color: darkslategray; + margin: 0px; + padding: 5px; +} + +#fr_CentralFrameInside { + background-color: darkslategray; + margin: 5px; +} + +#wi_MainKeypadArea { + background-color: darkslategray; +} + +#gb_AtcStationsOnlineInfo { + border-style: none; +} + +#sw_MainMiddle { + padding: 3px; + border: 0px; + border-radius: 10px; +} + +#sw_MainMiddle QPushButton { + font-family: arial-rounded; + background-color: rgba(0, 0, 255, 128); + border-style: none; + border-radius:3px; + color: yellow; + padding: 3px; +} + +/* No style for Dial +#sw_MainMiddel QDial { + background-color: rgba(0, 0, 255, 128); +} +*/ + +#wi_MainKeypadArea QPushButton { + font-family: arial-rounded; + background-color: black; + border-style: solid; + border-width:1px; + border-radius:6px; + border-color: green; + max-height:20px; + min-width:60px; + min-height:20px; +} + +#wi_MainKeypadAreaWindow { + background-color: darkslategray; +} + +#le_CommandLineInput { + margin-bottom: 5px; + padding: 3px; + border-radius: 5px; +} + +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: rgba(0, 0, 255, 128); +} + +QLabel { + background: transparent; +} + +QLineEdit { + background: black; + border: 1px solid green; + border-radius: 5px; +} + +QLineEdit[readOnly="true"] { + background: black; +} + +QCheckBox { + color: white; /** font **/ + border: 0px solid green; + background: transparent; +} + +QTextEdit { + border: 1px solid green; + background: transparent; + border-radius: 5px; +} + +QPlainTextEdit { + border: 1px solid green; + background: transparent; + border-radius: 5px; +} + +QGroupBox { + border: 1px solid green; +} + +QToolBox { +border: none; +} + +QToolBox::tab { + border: 1px solid green; + border-radius: 6px; + min-width: 30px; + padding: 2px; + padding-left: 4px; + padding-right: 4px; +} + +QToolBox::tab::selected { + background-color: rgba(0, 0, 255, 128); +} + +QRadioButton { + font: 10px; +} + +QComboBox { + border: 1px solid green; + border-radius: 5px; + padding: 1px; + background: transparent; +} + +QDoubleSpinBox { + border: 1px solid green; + border-radius: 5px; + padding: 1px; + background: transparent; +} + +QMenuBar { + background: darkslategray; +} + +QMenu { + background: black; + margin: 2px; /* some spacing around the menu */ +} + +QMenu::item { + padding: 2px 25px 1px 20px; + border: 2px solid darkslategray; /* reserve space for selection border */ + background: black; +} + +QMenu::item:selected { +border-color: darkblue; +background: black; +} + +QMenu::indicator { + background-color: black; +} + +QMenuBar { + background-color: darkslategray; +} + +QMenuBar::item { + spacing: 3px; /* spacing between menu bar items */ + padding: 1px 4px; + background: transparent; + border-radius: 4px; +} + +QMenuBar::item:selected { /* when selected using mouse or keyboard */ + background: black; +} + +QMenuBar::item:pressed { + background: black; +} + +QScrollBar:horizontal { + border: 2px solid gray; + background: slategray; + height: 10px; + margin: 0px 5px 0 5px; +} + +QScrollBar:vertical { + border: 2px solid gray; + background: slategray; + width: 10px; + margin: 5px 0 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; +} + +QHeaderView::section { + border: 1px solid blue; + background-color: darkslategray; + padding: 1px; + margin: 0px; +} + +QTableView { + border: 1px solid green; + border-radius: 5px; + background-color: black; + alternate-background-color: darkslategray; + selection-background-color: blue; + margin-left: 2px; + margin-top: 0; + margin-bottom: 0; + padding:0; +} + +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 darkslategra; + 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(:/blackgui/icons/resize.png); + width: 16px; + height: 16px; +} + +QStatusBar { + background: darkslategray; +} + +QStatusBar::item { + border: none; +} + +QStatusBar QLabel { + border: none; +}