mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Style sheets for the 3 widgets of the GUI:
Main window, initial start window, and info window (which is something like a popup showing important messages)
This commit is contained in:
@@ -26,3 +26,5 @@ win32:!win32-g++*: PRE_TARGETDEPS += ../../lib/blackmisc.lib \
|
||||
else: PRE_TARGETDEPS += ../../lib/libblackmisc.a \
|
||||
../../lib/libblackcore.a \
|
||||
../../lib/libblackgui.a
|
||||
|
||||
OTHER_FILES += *.qss
|
||||
|
||||
23
samples/blackgui/stylesheetinfo.qss
Normal file
23
samples/blackgui/stylesheetinfo.qss
Normal file
@@ -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;
|
||||
}
|
||||
23
samples/blackgui/stylesheetintro.qss
Normal file
23
samples/blackgui/stylesheetintro.qss
Normal file
@@ -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;
|
||||
}
|
||||
263
samples/blackgui/stylesheetmain.qss
Normal file
263
samples/blackgui/stylesheetmain.qss
Normal file
@@ -0,0 +1,263 @@
|
||||
/** http://qt-project.org/doc/qt-4.8/stylesheet-examples.html **/
|
||||
|
||||
QWidget {
|
||||
background-color: black;
|
||||
font: bold 10px;
|
||||
color: white; /** font **/
|
||||
}
|
||||
|
||||
QStatusBar {
|
||||
background-color: darkslategray;
|
||||
}
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
QComboBox {
|
||||
border: 1px solid gray;
|
||||
border-radius: 5px;
|
||||
background: #1e1d1b;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
QLineEdit[readOnly="true"] {
|
||||
background: black;
|
||||
}
|
||||
|
||||
QCheckBox {
|
||||
color: white;
|
||||
border: 0px solid green;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
QTextEdit {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
QPlainTextEdit {
|
||||
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 {
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user