Files
pilotclient/src/blackgui/qss/stdwidget.qss
2015-11-19 21:00:03 +00:00

460 lines
9.6 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)
**/
/** 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;
}
/** 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;
}
/**
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 is the margin in gui.ini
**/
BlackGui--CDockWidgetInfoArea {
background-color: green; /** I use green here so I can adjust the borders in gui.ini **/
}
BlackGui--CDockWidgetInfoArea > QWidget {
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 {
margin: 0px;
padding: 3px;
border: 2px solid green;
border-radius: 10px;
}
/** fix the menu, which is overridden by the above QWidget **/
BlackGui--CDockWidgetInfoArea > QMenu {
border: 1px solid darkslategray; /* reserve space for selection border */
background: lightgray;
color: black;
padding: 0px;
}
/** 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);
}
BlackGui--COverlayMessages {
background: black; /** background is background color here **/
background-image: url(:/textures/icons/textures/texture-inner.jpg);
border: 2px solid yellow;
border-radius: 10px;
}
/**
QTableView[isShowingLoadIndicator="true"] {
background-image: url(:/preloaders/icons/preloaders/FillingRing64.gif);
background-repeat: no-repeat;
background-position: center;
}
QTableView[isShowingLoadIndicator="false"] {
background-image: url(:/own/icons/own/transparent1px.png);
background-repeat: no-repeat;
background-position: center;
}
**/
/** Validator bar **/
BlackGui--Editors--CValidationIndicator {
background: black; /** background is background color here **/
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
/** default for buttons **/
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;
}
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;
}
/* Splitter normally transparent
QSplitter { background-color: transparent; }
*/
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;
}
QToolButton {
background-color: transparent; /* transparent tool buttons */
}
QLineEdit {
background: transparent;
border: 1px solid green;
border-radius: 5px;
}
QLineEdit[readOnly="true"] {
background: transparent;
}
QCheckBox {
border: 0px solid green; /** also borders label **/
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;
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;
}
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);
}
/** no border on page */
QToolBox > QWidget {
border: 0px;
}
QComboBox {
border: 1px solid green;
border-radius: 5px;
padding: 1px;
background: transparent;
}
/** 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: 0px 0px 0px 10px;
margin: 0px 0px 20px 0px; /** removes overlapping bar in frameless mode, why bottom margin helps here, no idea, bug? **/
}
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;
}
QMenu {
border: 2px solid darkslategray; /* reserve space for selection border */
background: lightgray;
color: black;
padding: 2px;
}
QScrollArea {
border: 1px solid green;
border-radius: 5px;
}
/* have to set background on widget in scroll area, cannot set directly on scroll area */
QScrollArea QWidget {
background: black; /** background is background color here **/
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
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;
}
QTableView, QTreeView {
border: 1px solid green;
border-radius: 5px;
background-color: transparent;
alternate-background-color: darkslategray;
selection-background-color: blue;
margin-left: 2px;
margin-right: 2px;
margin-top: 2px;
margin-bottom: 2px;
padding:0px;
}
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;
}
QStatusBar::item {
border: none;
}
QStatusBar QLabel {
border: none;
padding-left: 5px;
}