Commit fdcb5567 authored by Bryant's avatar Bryant

Removed the ICONDIR token from the CSS styles; it wasn't necessary and slowed...

Removed the ICONDIR token from the CSS styles; it wasn't necessary and slowed down applying new styles to QGC.
parent 005ab6ee
......@@ -305,36 +305,12 @@ QStatusBar {
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #4B4B4B, stop:0.3 #404040, stop:0.34 #383838, stop:1 #181818);
}
QPushButton#forceLandButton {
font-weight: bold;
min-height: 30px;
color: #000000;
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #ffee01, stop:1 #ae8f00) url("ICONDIR/control/emergency-button.png");
background-clip: border;
border-width: 1px;
border-color: #555555;
border-radius: 5px;
}
QPushButton:pressed#forceLandButton {
font-weight: bold;
min-height: 30px;
color: #000000;
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #bbaa00, stop:1 #a05b00) url("ICONDIR/control/emergency-button.png");
background-clip: border;
border-width: 1px;
border-color: #555555;
border-radius: 5px;
}
QPushButton#killButton {
font-weight: bold;
min-height: 30px;
color: #000000;
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #ffb917, stop:1 #b37300) url("ICONDIR/control/emergency-button.png");
stop:0 #ffb917, stop:1 #b37300)
background-clip: border;
border-width: 1px;
border-color: #555555;
......@@ -346,7 +322,7 @@ QPushButton:pressed#killButton {
min-height: 30px;
color: #000000;
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #bb8500, stop:1 #903000) url("ICONDIR/control/emergency-button.png");
stop:0 #bb8500, stop:1 #903000);
background-clip: border;
border-width: 1px;
border-color: #555555;
......
......@@ -113,6 +113,27 @@ QGroupBox::title {
font: bold 8px;
}
QLabel {
background: rgba(0,0,0,0);
}
QLabel#toolBarNameLabel {
font: bold 16px;
}
QLabel#toolBarModeLabel {
font: 12px;
}
QLabel#toolBarStateLabel {
font: 12px;
}
QLabel#toolBarMessageLabel {
font: 12px;
font-style: italic;
}
QLineEdit {
border-radius: 2px;
border-width: 1px;
......@@ -163,15 +184,7 @@ QPushButton {
padding-right: 8px;
}
QPushButton#forceLandButton {
font-weight: bold;
min-height: 30px;
background-clip: border;
border-width: 1px;
border-radius: 5px;
}
QPushButton:pressed#forceLandButton {
QPushButton#forceLandButton, QPushButton#killButton {
font-weight: bold;
min-height: 30px;
background-clip: border;
......@@ -179,21 +192,6 @@ QPushButton:pressed#forceLandButton {
border-radius: 5px;
}
QPushButton#killButton {
font-weight: bold;
min-height: 30px;
background-clip: border;
border-width: 1px;
border-radius: 5px;
}
QPushButton:pressed#killButton {
font-weight: bold;
min-height: 30px;
border-width: 1px;
border-radius: 5px;
}
QPushButton#controlButton {
min-height: 25px;
}
......@@ -260,49 +258,40 @@ QSlider::handle:vertical {
border-radius: 3px;
}
QSpinBox {
min-height: 14px;
max-height: 18px;
QSpinBox, QDoubleSpinBox {
border-radius: 5px;
border-width: 1px;
border-style: solid;
padding-right: 16px; /* make room for the arrows */
}
QSpinBox::up-button {
QSpinBox::up-button, QDoubleSpinBox::up-button {
subcontrol-origin: border;
subcontrol-position: top right; /* position at the top right corner */
border-image: url(:/files/images/actions/go-up.svg) 1;
border-width: 1px;
width: 16px;
padding-right: 1px;
border: none;
}
QSpinBox::down-button {
QSpinBox::down-button, QDoubleSpinBox::down-button {
subcontrol-origin: border;
subcontrol-position: bottom right; /* position at the top right corner */
border-image: url(:/files/images/actions/go-down.svg) 1;
border-width: 1px;
subcontrol-position: bottom right; /* position at bottom right corner */
width: 16px;
padding-right: 1px;
border: none;
}
QTextEdit {
border-radius: 2px;
border-width: 1px;
border-style: solid;
QSpinBox::up-arrow, QDoubleSpinBox::up-arrow {
width: 16px;
}
QToolButton {
font-weight: bold;
min-height: 20px;
max-height: 20px;
margin: 1px;
border-radius: 2px;
border-width: 2px;
border-style: solid;
padding-left: 3px;
padding-right: 3px;
QSpinBox::down-arrow, QDoubleSpinBox::down-arrow {
width: 16px;
}
QToolTip {
margin: 3px;
border-radius: 3px;
QStatusBar {
border-width: 1px 0;
border-style: solid;
}
QTabWidget::pane { /* The tab widget frame */
......@@ -327,36 +316,33 @@ QTabBar::tab {
border-style: solid;
}
QTextEdit {
border-radius: 2px;
border-width: 1px;
border-style: solid;
}
QToolBar {
margin: 0;
border-width: 1px 0;
border-style: solid;
}
QLabel {
background: rgba(0,0,0,0);
}
QLabel#toolBarNameLabel {
font: bold 16px;
}
QLabel#toolBarModeLabel {
font: 12px;
}
QLabel#toolBarStateLabel {
font: 12px;
}
QLabel#toolBarMessageLabel {
font: 12px;
font-style: italic;
QToolButton {
font-weight: bold;
min-height: 20px;
max-height: 20px;
margin: 1px;
border-radius: 2px;
border-width: 2px;
border-style: solid;
padding-left: 3px;
padding-right: 3px;
}
QStatusBar {
border-width: 1px 0;
border-style: solid;
QToolTip {
margin: 3px;
border-radius: 3px;
}
/** The following are the style-specific colorings for QGC. **/
......@@ -382,7 +368,7 @@ QCheckBox::indicator {
}
QCheckBox::indicator:checked {
background-color: #000;
background-color: #777;
}
QComboBox {
......@@ -408,20 +394,6 @@ QDockWidget::close-button:hover, QDockWidget::float-button:hover {
background-color: #AAA;
}
QDoubleSpinBox {
border: 1px solid #4A4A4F;
}
QDoubleSpinBox::up-button {
border-image: url(:/files/images/actions/go-up.svg) 1;
border-width: 1px;
}
QDoubleSpinBox::down-button {
border-image: url(:/files/images/actions/go-down.svg) 1;
border-width: 1px;
}
QGroupBox {
border-color: #222216;
}
......@@ -495,48 +467,20 @@ QProgressBar QLabel {
QPushButton {
border-style: solid;
border-color: #4A4A4F;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #C3C2C8, stop: 1 #828288);
border-color: #444;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #CCC, stop: 1 #888);
}
QPushButton:checked {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #404040, stop: 1 #808080);
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #444, stop: 1 #888);
}
QPushButton:hover {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #333, stop: 1 #b0b0b0);
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #BBB, stop: 1 #777);
}
QPushButton:pressed {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #bbbbbb, stop: 1 #b0b0b0);
}
QPushButton#forceLandButton {
border-color: #222;
}
QPushButton#forceLandButton {
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #ffee01, stop:1 #ae8f00) url("ICONDIR/control/emergency-button.png");
}
QPushButton:pressed#forceLandButton {
color: #000;
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #bbaa00, stop:1 #a05b00) url("ICONDIR/control/emergency-button.png");
border-color: #222;
}
QPushButton#killButton {
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #ffb917, stop:1 #b37300) url("ICONDIR/control/emergency-button.png");
border-color: #222;
}
QPushButton:pressed#killButton {
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #bb8500, stop:1 #903000) url("ICONDIR/control/emergency-button.png");
border-color: #222;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #AAA, stop: 1 #666);
}
QPushButton#controlButton {
......@@ -555,30 +499,38 @@ QSpinBox {
border-color: #4A4A4F;
}
QSpinBox::up-button {
border-image: url(:/files/images/actions/go-up.svg) 1;
border-width: 1px;
QSpinBox::up-arrow, QDoubleSpinBox::up-arrow {
image: url(:/files/images/actions/go-up.svg);
width: 16px;
}
QSpinBox::down-button {
border-image: url(:/files/images/actions/go-down.svg) 1;
border-width: 1px;
QSpinBox::down-arrow, QDoubleSpinBox::down-arrow {
image: url(:/files/images/actions/go-down.svg);
width: 16px;
}
QStatusBar {
border-bottom-color: #101010;
border-bottom-color: #111;
border-top-color: #EEE;
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #090909, stop:0.3 #404040, stop:0.34 #383838, stop:1 #F6F6F6);
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #CCC, stop: 1 #888);
}
QTabBar::tab {
border-color: #62676B;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #090909, stop: 1 #F6F6F6);
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #CCC, stop: 1 #888);
}
QTabBar::tab:hover {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #BBB, stop: 1 #777);
}
QTabBar::tab:selected, QTabBar::tab:hover {
QTabBar::tab:pressed {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #AAA, stop: 1 #666);
}
QTabBar::tab:selected {
border-color: #379AC3;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #090909, stop: 1 #F6F6F6);
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #AAA, stop: 1 #666);
}
QTabWidget::pane { /* The tab widget frame */
......@@ -586,7 +538,7 @@ QTabWidget::pane { /* The tab widget frame */
}
QTextEdit {
border-color: #111;
border-color: #222;
}
QToolBar {
......@@ -609,6 +561,5 @@ QToolButton:pressed {
}
QToolTip {
background-color: #404040;
color: #000;
}
......@@ -115,6 +115,7 @@ MainWindow::MainWindow(QWidget *parent):
loadSettings();
emit initStatusChanged("Loading Style.");
qApp->setStyle("plastique");
if (currentStyle == QGC_MAINWINDOW_STYLE_LIGHT)
{
loadStyle(currentStyle, lightStyleFileName);
......@@ -1235,8 +1236,6 @@ void MainWindow::enableAutoReconnect(bool enabled)
bool MainWindow::loadStyle(QGC_MAINWINDOW_STYLE style, QString cssFile)
{
qApp->setStyle("plastique");
// Store the new style classification.
currentStyle = style;
......@@ -1249,8 +1248,7 @@ bool MainWindow::loadStyle(QGC_MAINWINDOW_STYLE style, QString cssFile)
// Signal to the user that the app will pause to apply a new stylesheet
qApp->setOverrideCursor(Qt::WaitCursor);
QString style = QString(styleSheet.readAll());
style.replace("ICONDIR", QCoreApplication::applicationDirPath() + "files/styles/");
QString style(styleSheet.readAll());
qApp->setStyleSheet(style);
if (currentStyle == QGC_MAINWINDOW_STYLE_LIGHT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment