Files
pilotclient/src/blackgui/share/qss/stdwidget.qss
2018-08-09 01:39:24 +02:00

671 lines
14 KiB
Plaintext

/*
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)
*/
QFrame {
border-style: solid;
border-color: transparent;
border-width: 1px;
}
QCheckBox {
border: 0px solid green; /* also borders label */
background: transparent;
}
/* CGuiUtility::checkBoxReadOnly */
/* used for read-only checkboxes */
QCheckBox::indicator {
color: #b1b1b1;
border: 1px solid #7f7f7f;
width: 15px;
height: 15px;
}
QCheckBox::indicator::checked {
image: url(:/diagona/icons/diagona/icons/tick.png);
}
QCheckBox::indicator:indeterminate {
image: url(:/diagona/icons/diagona/icons/question.png);
}
/* 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;
}
/* Dialog, sometimes main window */
QDialog {
background-image: url(:/textures/icons/textures/texture-outer.jpg);
background-color: darkslategray;
}
/* separator between info areas and rest */
/* this hides them */
QDialog::separator {
background: transparent;
width: 0px; /* when vertical */
height: 0px; /* when horizontal */
}
QDialog::separator:hover {
background: transparent;
}
/* selector QWizard not working, so using individual components */
/* the wizard pages are currently hardcoded */
/*
BlackGui--Components--CCopyConfigurationComponent {
background: black;
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
*/
/* setup load dialog */
BlackGui--Components--CSetupLoadingDialog {
background: black; /* background is background color here */
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
/* setup load dialog details frame */
/*
BlackGui--Components--CSetupLoadingDialog #fr_Details {
background-image: url(:/textures/icons/textures/texture-outer.jpg);
background-color: darkslategray;
}
*/
/* core settings */
/* needed for CCoreSettingsDialog */
/* BlackGui::Components::CSettingsComponent */
BlackGui--Components--CCoreSettingsDialog {
background: black; /* background is background color here */
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
QFileDialog #sidebar {
background: black;
}
QFileDialog QToolButton {
background: inherit;
}
/*
Required when dock widget is floating
1) background-image not working on QDockWidget, so I use direct children for that
2) seems to have only effect as normal (floating) window
3) Borders between this widget and the inner child are the margins defined in dockwidget
*/
BlackGui--CDockWidgetInfoArea {
background-color: green; /* Use green or red here to adjust the borders */
}
/* outer widget in dock widget */
BlackGui--CDockWidgetInfoArea > QWidget[dockwidget="outerwidget"] {
background: black; /* background is background color here */
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
/* this is the first widget in the dock area */
/* all dock widgets shall have this QWidget as container */
BlackGui--CDockWidgetInfoArea[framelessDockWidget="true"] > QWidget > QFrame[dockwidget="innerwidget"] {
margin: 0px;
padding: 3px;
border: 2px solid green;
border-radius: 10px;
}
BlackGui--CDockWidgetInfoArea[framelessDockWidget="false"] > QWidget > QFrame[dockwidget="innerwidget"] {
/* void */
}
/* required when info area is not floating */
BlackGui--CInfoArea {
background: black; /* background is background color here */
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
/* Overlay messages */
BlackGui--COverlayMessages {
background: transparent; /* background is background color here */
background-image: url(:/textures/icons/textures/texture-inner.jpg);
border: 5px solid rgba(100, 100, 100, 90%);
border-radius: 10px;
}
BlackGui--CDropSite {
color: grey;
border: 2px dashed grey;
border-radius: 5px;
min-height: 18px;
max-height: 18px;
margin: 2px;
padding: 2px;
}
/* Validator bar */
BlackGui--Editors--CValidationIndicator {
background: black; /* background is background color here */
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
BlackGui--CPluginDetailsWindow,
BlackGui--CPluginConfigWindow {
background: black;
}
BlackGui--Components--CDBusServerAddressSelector::disabled {
background: rgba(4, 105, 105, 105);
}
BlackGui--Components--CSimulatorSelector::disabled {
background: rgba(4, 105, 105, 105);
}
BlackGui--Components--CDownloadComponent,
BlackGui--Components--CDownloadDialog,
BlackGui--Components--CRawFsdMessagesComponent,
BlackGui--Components--CRawFsdMessagesDialog,
BlackGui--Components--CDbOwnModelsDialog,
BlackGui--Components--CDbOwnModelSetDialog,
BlackGui--Components--CFirstModelSetComponent,
BlackGui--Components--CDbDistributorComponent,
BlackGui--Components--CLegalInfoComponent
{
background: black; /* background is background color here */
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
/* default for buttons */
QToolButton {
background-color: transparent; /* transparent tool buttons */
border: 0px;
}
QPushButton {
background-color: rgba(0, 0, 255, 128);
border-style: 1px solid yellow;
border-radius:3px;
color: yellow; /* font color */
padding: 0px;
margin-right: 5px;
min-width:60px;
min-height:20px;
}
QPushButton::disabled {
background-color: rgba(77, 88, 99, 128); /* slated gray if a channel) */
border-style: none;
border-radius: 3px;
color: white;
padding: 0px;
margin-right: 5px;
qproperty-textElideMode: ElideMiddle;
}
QPushButton:pressed{ background-color: lightblue; }
/**
QPushButton:focus:pressed{ background-color: black; }
QPushButton:focus{ background-color: green; }
QPushButton:hover{ background-color: red; }
QPushButton:checked{ background-color: pink; }
**/
QProgressBar {
border: 1px solid green;
border-radius: 5px;
background-color: black;
text-align: center;
padding: 0px;
height: 16px;
}
QProgressBar::chunk {
background-color: darkblue;
width: 10px;
margin: 0.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);
}
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;
}
QSplitter {
margin: 0px;
border: 0px;
padding: 0px;
}
QSplitter::handle {
background-color: rgba(0, 0, 255, 200);
margin-top: 1px;
margin-bottom: 1px;
height: 1px;
}
QSplitter::handle:pressed {
background-color: rgba(0, 255, 255, 255);
}
/*
QSplitter::handle:horizontal { width: 1px; }
QSplitter::handle:vertical { height: 1px; }
*/
QLabel {
background: transparent;
}
QLineEdit {
background: transparent;
border: 1px solid green;
border-radius: 5px;
}
QLineEdit[readOnly="true"] {
background: rgba(40,40,40);
border: 1px solid rgba(50,50,50);
}
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;
margin-top: 1.0em; /* leave space at the top for the title */
padding-top: 0.25em;
border-radius: 5px;
background: black; /* background is background color here */
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
QGroupBox::disabled {
background: rgba(4, 105, 105, 105);
}
QGroupBox::title {
top: 2px;
left: 5px;
subcontrol-origin: margin;
subcontrol-position: middle left; /* position at the top center */
padding: 0px 10px 0px 10px;
background-color: darkblue;
border: 1px solid green;
border-radius: 5px;
}
QToolBox::tab {
border: 1px solid green;
border-radius: 6px;
min-width: 30px;
padding: 2px;
padding-left: 4px;
padding-right: 4px;
}
QToolBox::tab::selected {
color: rgba(255, 255, 0, 255);
background-color: rgba(0, 0, 255, 128);
}
QToolBox::tab::!selected {
background-color: rgba(0, 0, 255, 48);
}
/* no border on page */
QToolBox > QWidget {
border: 0px;
}
QComboBox {
border: 1px solid green;
border-radius: 5px;
padding: 1px;
background: transparent;
selection-background-color: #3f98ff;
}
/* drop down list */
QComboBox QAbstractItemView {
background-color: black;
color: lightgray;
qproperty-textElideMode: ElideMiddle;
}
QDoubleSpinBox {
border: 1px solid green;
border-radius: 5px;
padding: 1px;
background: transparent;
}
QSpinBox {
border: 1px solid green;
border-radius: 5px;
padding: 1px;
background: transparent;
}
QColorDialog {
background-image: url(:/textures/icons/textures/texture-outer.jpg);
background-color: darkslategray;
}
QMenuBar {
background-image: url(:/textures/icons/textures/texture-outer.jpg);
background-color: darkslategray;
padding: 5px 0px 0px 10px;
margin: 0px 0px 30px 0px; /* removes overlapping bar in frameless mode, why bottom margin helps here, no idea, bug? */
}
QMenuBar::item {
spacing: 5px; /* spacing between menu bar items */
padding: 3px 3px;
background: transparent;
border-radius: 4px;
}
/* when selected using mouse or keyboard */
QMenuBar::item:selected {
background: black;
}
QMenuBar::item:pressed {
background: black;
}
BlackGui--CDockWidgetInfoArea > QMenu > QMenuWidget {
border: 0px; /* reserve space for selection border */
}
/* reset menu style */
QMenu {
color: black;
font-style: normal;
font-weight: normal;
padding: 5px;
}
QMenu::item {
padding: 4px 25px 4px 20px;
}
/* fix margin style */
QMenu > QFrame {
color: black;
}
BlackGui--Components--CMarginsInput {
color: black;
}
QRadioButton::indicator:checked, QRadioButton::indicator:unchecked {
color: #b1b1b1;
background-color: #000000;
border: 1px solid #b1b1b1;
border-radius: 7px;
}
QRadioButton::indicator:checked {
background-color: qradialgradient(
cx: 0.5, cy: 0.5,
fx: 0.5, fy: 0.5,
radius: 1.0,
stop: 0.25 #32cd32,
stop: 0.3 #000000
);
}
QScrollArea {
border: 1px solid green;
border-radius: 5px;
}
/* have to set background on widget in scroll area, cannot set directly on scroll area */
/* The inner widget I want to modify is on 2nd level. QScrollArea > QWidget selects too many */
/* http://doc.qt.io/qt-4.8/stylesheet-syntax.html */
QScrollArea > * > QWidget {
background: black; /* background is background color here */
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
QScrollArea QMenu {
border: 1px solid darkslategray; /* reserve space for selection border */
background: lightgray;
color: black;
padding: 0px;
}
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;
}
QHeaderView::section {
border: 1px solid black;
background-color: darkslategray;
color: white; /* font */
padding: 1px;
margin: 0px;
}
QHeaderView {
border-width: 0px;
}
/* style the sort indicator */
QHeaderView::down-arrow {
image: url(:/diagona/icons/diagona/icons/arrow-270-small.png);
subcontrol-position: bottom left;
}
QHeaderView::up-arrow {
image: url(:/diagona/icons/diagona/icons/arrow-090-small.png);
subcontrol-position: bottom left;
}
QTableView, QTreeView, QListView {
border: 1px solid green; /** outer border **/
border-radius: 5px;
background-color: transparent;
alternate-background-color: darkslategray;
/** in order to enable alternate color it must be also set to true on view **/
/** this can be done in code or UI builder **/
selection-background-color: blue;
margin-left: 2px;
margin-right: 2px;
margin-top: 2px;
margin-bottom: 2px;
padding: 1px;
gridline-color: transparent;
}
/** explicitly setting font color avoids black when pressing CTRL-S **/
QTableView::item:selected {
background-color: blue;
color: white;
}
QListView::item:selected {
background-color: blue;
color: white;
}
QTreeView {
show-decoration-selected: 1;
}
QTreeView::item {
border: 0px;
padding: 2px 2px 2px 2px;
}
QTreeView::item:hover {
background: green;
}
QTreeView::item:selected {
background: blue;
}
QTreeView::branch:open:has-children {
image: url(:/diagona/icons/diagona/icons/toggle.png);
}
QTreeView::branch:closed:has-children {
image: url(:/diagona/icons/diagona/icons/toggle-expand.png);
}
QSlider {
min-height: 2em;
}
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;
}
QStatusBar {
background: transparent;
min-height: 20px;
}
QStatusBar::item {
border: none;
}
QStatusBar QLabel {
border: none;
padding-left: 5px;
}