lots of UI enhancements for better feedback and state

This commit is contained in:
Donnie 2020-06-30 22:19:45 -04:00
parent ae3518f450
commit af9ead5937
4 changed files with 83 additions and 25 deletions

View File

@ -51,12 +51,13 @@ class QMissionPlanning(QDialog):
self.add_flight_button = QPushButton("Add Flight") self.add_flight_button = QPushButton("Add Flight")
self.add_flight_button.clicked.connect(self.on_add_flight) self.add_flight_button.clicked.connect(self.on_add_flight)
self.delete_flight_button = QPushButton("Delete Selected") self.delete_flight_button = QPushButton("Delete Selected")
self.delete_flight_button.setProperty("style", "btn-danger")
self.delete_flight_button.clicked.connect(self.on_delete_flight) self.delete_flight_button.clicked.connect(self.on_delete_flight)
self.button_layout = QHBoxLayout() self.button_layout = QHBoxLayout()
self.button_layout.addStretch() self.button_layout.addStretch()
self.button_layout.addWidget(self.add_flight_button)
self.button_layout.addWidget(self.delete_flight_button) self.button_layout.addWidget(self.delete_flight_button)
self.button_layout.addWidget(self.add_flight_button)
self.mission_start_button = QPushButton("Take Off") self.mission_start_button = QPushButton("Take Off")
self.mission_start_button.setProperty("style", "start-button") self.mission_start_button.setProperty("style", "start-button")

View File

@ -0,0 +1,21 @@
--Initialization script for the Mission lua Environment (SSE)
dofile('Scripts/ScriptingSystem.lua')
--Sanitize Mission Scripting environment
--This makes unavailable some unsecure functions.
--Mission downloaded from server to client may contain potentialy harmful lua code that may use these functions.
--You can remove the code below and make availble these functions at your own risk.
local function sanitizeModule(name)
_G[name] = nil
package.loaded[name] = nil
end
do
sanitizeModule('os')
sanitizeModule('io')
sanitizeModule('lfs')
require = nil
loadlib = nil
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

View File

@ -5,9 +5,9 @@
colors colors
Backgrounds Backgrounds
mainbg ---------------------- #2D3E50 blue ------------------------ #2D3E50
med/grey/blue --------------- #435466
dark blue ------------------- #1D2731 dark blue ------------------- #1D2731
med/grey/blue --------------- #435466
dark grey ------------------- #4E5760 dark grey ------------------- #4E5760
button blue/grey gradient --- qlineargradient(x1:0, y1:0, x2:1, y2:1,stop:0 #A4B3B9, stop:1 #85989D); button blue/grey gradient --- qlineargradient(x1:0, y1:0, x2:1, y2:1,stop:0 #A4B3B9, stop:1 #85989D);
button green gradient --- qlineargradient(x1:0, y1:0, x2:1, y2:1,stop:0 #82A466, stop:1 #5C863F); button green gradient --- qlineargradient(x1:0, y1:0, x2:1, y2:1,stop:0 #82A466, stop:1 #5C863F);
@ -40,6 +40,11 @@ QMenuBar::item:pressed {
background: #1D2731; background: #1D2731;
} }
QMenu::item:selected {
background: #435466;
}
QLabel{ QLabel{
font-weight:normal; font-weight:normal;
text-align:right; text-align:right;
@ -66,20 +71,21 @@ QTopPanel * {
color: #B7C0C6; color: #B7C0C6;
font-size: 12px; font-size: 12px;
font-weight: bold; font-weight: bold;
} }
/*QPushButton*/ /*QPushButton*/
QPushButton { QPushButton {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1,stop:0 #A4B3B9, stop:1 #85989D); background: qlineargradient(x1:0, y1:0, x2:1, y2:1,stop:0 #A4B3B9, stop:1 #85989D);
border: 1px solid #97A9A9; border: 1px solid #97A9A9;
color:#fff; color:#fff;
padding: 4px 10px; padding: 6px 10px;
cursor: pointer; cursor: pointer;
border-radius:2px;
} }
QPushButton:hover { QPushButton:hover {
background: #85989D; background: #6c7b7f;
cursor:pointer; cursor:pointer;
} }
@ -95,7 +101,7 @@ QPushButton[style="btn-primary"]{
text-transform:uppercase; text-transform:uppercase;
} }
QPushButton[style="btn-primary"]:hover{ QPushButton[style="btn-primary"]:hover{
background: #85989D; background: #6c7b7f;
} }
@ -124,6 +130,7 @@ QPushButton[style="btn-danger"]{
cursor:pointer; cursor:pointer;
padding: 6px; padding: 6px;
border-radius:2px; border-radius:2px;
border: 1px solid #9E3232;
} }
QPushButton[style="btn-danger"]:hover{ QPushButton[style="btn-danger"]:hover{
@ -226,10 +233,10 @@ QLabel[style="SEAD"]{
/*QGroupBox these are the sections that look like fieldsets*/ /*QGroupBox these are the sections that look like fieldsets*/
QGroupBox { QGroupBox {
margin-top: 1ex; /* leave space at the top for the title */ margin-top: 1ex; /* leave space at the top for the title */
border:1px solid #435466; border:1px solid #435466;
padding:5px; padding:5px;
margin:5px; margin:5px;
} }
QGroupBox::title { QGroupBox::title {
@ -303,24 +310,31 @@ QTabBar::tab:selected {
/*QComboxBox*/ /*QComboBox*/
QComboxBox { QComboBox {
padding:10px;
margin:10px;
border:1px solid #3B4656; border:1px solid #3B4656;
color: #fff; color: #fff;
} padding: 4px 10px;
QComboBox:editable { background: #1D2731;
background: #465C74;
} }
QComboBox:!editable{ QComboBox::editable {
/*background: #1D2731;*/ border:4px solid red;
} }
QComboBox:hover{
border-color: #3592C4;
}
QComboBox:disabled, QComboBox::drop-down:disabled{
color: #B7C0C6;
background: #435466;
}
QComboBox::drop-down { QComboBox::drop-down {
subcontrol-origin: padding; subcontrol-origin: padding;
subcontrol-position: top right; subcontrol-position: top right;
padding: 10px; padding: 2px;
border:none; border:none;
color: #fff; color: #fff;
height: 20px; height: 20px;
@ -331,23 +345,46 @@ QComboBox::down-arrow {
} }
QComboBox QAbstractItemView { QComboBox QAbstractItemView {
padding: 10px; padding: 4px;
border:1px solid #3B4656; border:1px solid #3B4656;
background: #465C74; background: #465C74;
} }
/*QSpinBox number input with up down arrows*/
QSpinBox{ QSpinBox{
/*TODO:style this*/ border:1px solid #3B4656;
color: #fff;
padding: 4px 10px;
background: #1D2731;
min-width:40px;
}
QSpinBox:hover{
border-color: #3592C4;
}
QSpinBox::up-button , QSpinBox::down-button{
border:none;
}
QSpinBox::up-button{
image: url(resources/stylesheets/chevron-up.png);
}
QSpinBox::down-button{
image: url(resources/stylesheets/chevron-down.png);
} }
QLineEdit{ QLineEdit{
padding: 6px; padding: 4px 10px;
border:1px solid #3B4656; border:1px solid #3B4656;
background: #465C74; background: #465C74;
color: #fff; color: #fff;
margin-bottom:10px;
} }
@ -379,7 +416,6 @@ QHeaderView::section:vertical
QTableWidget { QTableWidget {
gridline-color: #1D2731; gridline-color: #1D2731;
background: #4B5B74; background: #4B5B74;
} }