From a6e18371614de360025d83bb9b17eb396e913510 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Tue, 15 May 2012 16:24:49 -0500 Subject: [PATCH] Remove stylesheets for stabilization ui group boxes as they don't work properly on all platforms. Also removed custom fonts as these don't work consistently across platforms. Basically don't customize shit in the .ui file. Generate a stylesheet and let's properly validate them and/or have one per platform. Even things like changing font sizes behave inconsistently. Don't specify the size of buttons, at least to any precision. It will not work across platforms. --- .../config/configstabilizationwidget.cpp | 5 + .../src/plugins/config/stabilization.ui | 1207 ++--------------- overo | 2 +- 3 files changed, 129 insertions(+), 1085 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.cpp b/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.cpp index 3f2b4d216..07f6904c3 100644 --- a/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.cpp @@ -40,6 +40,11 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa { m_stabilization = new Ui_StabilizationWidget(); m_stabilization->setupUi(this); + + // To bring old style sheet back without adding it manually do this: + // Alternatively apply a global stylesheet to the QGroupBox + // setStyleSheet("QGroupBox {background-color: qlineargradient(spread:pad, x1:0.507, y1:0.869318, x2:0.507, y2:0.0965909, stop:0 rgba(243, 243, 243, 255), stop:1 rgba(250, 250, 250, 255)); border: 1px outset #999; border-radius: 3; }"); + autoLoadWidgets(); realtimeUpdates=new QTimer(this); connect(m_stabilization->realTimeUpdates_6,SIGNAL(stateChanged(int)),this,SLOT(realtimeUpdatesSlot(int))); diff --git a/ground/openpilotgcs/src/plugins/config/stabilization.ui b/ground/openpilotgcs/src/plugins/config/stabilization.ui index ef0b52a15..fd6b01ca8 100755 --- a/ground/openpilotgcs/src/plugins/config/stabilization.ui +++ b/ground/openpilotgcs/src/plugins/config/stabilization.ui @@ -495,29 +495,13 @@ 0 - 0 + -114 673 - 880 + 790 - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - + Qt::Horizontal @@ -533,7 +517,7 @@ - + @@ -541,19 +525,12 @@ 16 - - - 9 - 75 - true - - Rate Stabilization (Inner Loop) - + @@ -573,530 +550,6 @@ 181 - - - - - - - 0 - 0 - 0 - - - - - - - - - 243 - 243 - 243 - - - - - 250 - 250 - 250 - - - - - - - - - 255 - 255 - 255 - - - - - - - 251 - 251 - 251 - - - - - - - 124 - 124 - 124 - - - - - - - 165 - 165 - 165 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - - - 243 - 243 - 243 - - - - - 250 - 250 - 250 - - - - - - - - - - - 243 - 243 - 243 - - - - - 250 - 250 - 250 - - - - - - - - - 0 - 0 - 0 - - - - - - - 251 - 251 - 251 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - - - 243 - 243 - 243 - - - - - 250 - 250 - 250 - - - - - - - - - 255 - 255 - 255 - - - - - - - 251 - 251 - 251 - - - - - - - 124 - 124 - 124 - - - - - - - 165 - 165 - 165 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - - - 243 - 243 - 243 - - - - - 250 - 250 - 250 - - - - - - - - - - - 243 - 243 - 243 - - - - - 250 - 250 - 250 - - - - - - - - - 0 - 0 - 0 - - - - - - - 251 - 251 - 251 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 124 - 124 - 124 - - - - - - - - - 243 - 243 - 243 - - - - - 250 - 250 - 250 - - - - - - - - - 255 - 255 - 255 - - - - - - - 251 - 251 - 251 - - - - - - - 124 - 124 - 124 - - - - - - - 165 - 165 - 165 - - - - - - - 124 - 124 - 124 - - - - - - - 255 - 255 - 255 - - - - - - - 124 - 124 - 124 - - - - - - - - - 243 - 243 - 243 - - - - - 250 - 250 - 250 - - - - - - - - - - - 243 - 243 - 243 - - - - - 250 - 250 - 250 - - - - - - - - - 0 - 0 - 0 - - - - - - - 248 - 248 - 248 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - false - - - #RateStabilizationGroup_15{background-color: qlineargradient(spread:pad, x1:0.507, y1:0.869318, x2:0.507, y2:0.0965909, stop:0 rgba(243, 243, 243, 255), stop:1 rgba(250, 250, 250, 255)); - -border: 1px outset #999; -border-radius: 3; -} - @@ -3966,23 +3419,7 @@ value as the Kp. - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 15 - - - - - + Qt::Horizontal @@ -3998,7 +3435,7 @@ value as the Kp. - + @@ -4006,19 +3443,12 @@ value as the Kp. 16 - - - 9 - 75 - true - - Attitude Stabilization (Outer Loop) - + @@ -4555,13 +3985,6 @@ value as the Kp. false - - #RateStabilizationGroup_17{background-color: qlineargradient(spread:pad, x1:0.507, y1:0.869318, x2:0.507, y2:0.0965909, stop:0 rgba(243, 243, 243, 255), stop:1 rgba(250, 250, 250, 255)); - -border: 1px outset #999; -border-radius: 3; -} - @@ -4604,26 +4027,14 @@ border-radius: 3; - + - - - 0 - 0 - - 81 28 - - - 81 - 28 - - QPushButton { border: 1px outset #999; @@ -4656,7 +4067,7 @@ border-radius: 4; - + @@ -7335,26 +6746,14 @@ border-radius: 5; - + - - - 0 - 0 - - 51 28 - - - 51 - 28 - - QPushButton { border: 1px outset #999; @@ -7387,42 +6786,23 @@ border-radius: 4; + + + + Qt::Horizontal + + + + 40 + 20 + + + + - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 2 - 10 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 15 - - - - - + Qt::Horizontal @@ -7438,7 +6818,7 @@ border-radius: 4; - + @@ -7446,19 +6826,12 @@ border-radius: 4; 16 - - - 9 - 75 - true - - Stick Range and Limits - + @@ -7992,16 +7365,6 @@ border-radius: 4; - - false - - - #RateStabilizationGroup_19{background-color: qlineargradient(spread:pad, x1:0.507, y1:0.869318, x2:0.507, y2:0.0965909, stop:0 rgba(243, 243, 243, 255), stop:1 rgba(250, 250, 250, 255)); - -border: 1px outset #999; -border-radius: 3; -} - @@ -8019,7 +7382,7 @@ border-radius: 3; - 10 + 1000 10 @@ -8027,24 +7390,12 @@ border-radius: 3; - - - 0 - 0 - - 51 28 - - - 51 - 28 - - QPushButton { border: 1px outset #999; @@ -8091,12 +7442,6 @@ border-radius: 4; 28 - - - 81 - 28 - - QPushButton { border: 1px outset #999; @@ -11063,23 +10408,7 @@ Attitude - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - + Qt::Vertical @@ -11095,23 +10424,7 @@ Attitude - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 2 - 10 - - - - - + @@ -11648,13 +10961,6 @@ Attitude false - - #RateStabilizationGroup_21{background-color: qlineargradient(spread:pad, x1:0.507, y1:0.869318, x2:0.507, y2:0.0965909, stop:0 rgba(243, 243, 243, 255), stop:1 rgba(250, 250, 250, 255)); - -border: 1px outset #999; -border-radius: 3; -} - @@ -11734,29 +11040,12 @@ automatically every 300ms, which will help for fast tuning. - - - 0 - 0 - - 120 28 - - - 120 - 28 - - - - - 8 - - Reloads the saved settings into GCS. Useful if you have accidentally changed some settings. @@ -11795,29 +11084,12 @@ border-radius: 4; - - - 0 - 0 - - 60 28 - - - 60 - 28 - - - - - 8 - - Send settings to the board but do not save to the non-volatile memory @@ -11854,29 +11126,12 @@ border-radius: 4; - - - 0 - 0 - - 60 28 - - - 60 - 28 - - - - - 8 - - Send settings to the board and save to the non-volatile memory @@ -11939,27 +11194,11 @@ border-radius: 4; 0 0 673 - 1079 + 981 - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 25 - 10 - - - - - + Qt::Horizontal @@ -11975,7 +11214,7 @@ border-radius: 4; - + @@ -11983,19 +11222,12 @@ border-radius: 4; 16 - - - 9 - 75 - true - - Rate Stabization Coefficients (Inner Loop) - + @@ -12529,16 +11761,6 @@ border-radius: 4; - - false - - - #RateStabilizationGroup_8{background-color: qlineargradient(spread:pad, x1:0.507, y1:0.869318, x2:0.507, y2:0.0965909, stop:0 rgba(243, 243, 243, 255), stop:1 rgba(250, 250, 250, 255)); - -border: 1px outset #999; -border-radius: 3; -} - @@ -15474,55 +14696,7 @@ value as the Kp. - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 2 - 10 - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 2 - 10 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 15 - - - - - Qt::Horizontal @@ -15538,7 +14712,7 @@ value as the Kp. - + @@ -15546,19 +14720,12 @@ value as the Kp. 16 - - - 9 - 75 - true - - Attitude Stabization Coefficients (Outer Loop) - + @@ -16095,13 +15262,6 @@ value as the Kp. false - - #RateStabilizationGroup_4{background-color: qlineargradient(spread:pad, x1:0.507, y1:0.869318, x2:0.507, y2:0.0965909, stop:0 rgba(243, 243, 243, 255), stop:1 rgba(250, 250, 250, 255)); - -border: 1px outset #999; -border-radius: 3; -} - @@ -16112,85 +15272,6 @@ border-radius: 3; false - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 10 - 10 - - - - - - - - - - - Link Roll and Pitch - - - - - - - - 0 - 0 - - - - - 81 - 28 - - - - - 81 - 28 - - - - QPushButton { -border: 1px outset #999; -border-radius: 5; -background-color: qlineargradient(spread:pad, x1:0.507, y1:0.869318, x2:0.507, y2:0.0965909, stop:0.28 rgba(236, 236, 236, 255), stop:1 rgba(252, 252, 252, 255)); -} - -QPushButton:pressed { - - border-style: inset; - background-color: qlineargradient(spread:pad, x1:0.502, y1:0.664864, x2:0.502, y2:0.034, stop:0.358209 rgba(250, 250, 250, 255), stop:0.626866 rgba(235, 235, 235, 255)); - -} - - -QPushButton:hover { - border: 1px outset #999; -border-color: rgb(83, 83, 83); -border-radius: 4; - } - - - Default - - - - objname:StabilizationSettings - button:default - buttongroup:5 - - - - @@ -18839,26 +17920,89 @@ border-radius: 5; + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 10 + + + + + + + + + 0 + 0 + + + + + 81 + 28 + + + + + 81 + 28 + + + + QPushButton { +border: 1px outset #999; +border-radius: 5; +background-color: qlineargradient(spread:pad, x1:0.507, y1:0.869318, x2:0.507, y2:0.0965909, stop:0.28 rgba(236, 236, 236, 255), stop:1 rgba(252, 252, 252, 255)); +} + +QPushButton:pressed { + + border-style: inset; + background-color: qlineargradient(spread:pad, x1:0.502, y1:0.664864, x2:0.502, y2:0.034, stop:0.358209 rgba(250, 250, 250, 255), stop:0.626866 rgba(235, 235, 235, 255)); + +} + + +QPushButton:hover { + border: 1px outset #999; +border-color: rgb(83, 83, 83); +border-radius: 4; + } + + + Default + + + + objname:StabilizationSettings + button:default + buttongroup:5 + + + + + + + + + + + Link Roll and Pitch + + + - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 15 - - - - - + Qt::Horizontal @@ -18874,7 +18018,7 @@ border-radius: 5; - + @@ -18882,19 +18026,12 @@ border-radius: 5; 16 - - - 9 - 75 - true - - Stick Range and Limits - + @@ -19428,16 +18565,6 @@ border-radius: 5; - - false - - - #RateStabilizationGroup_6{background-color: qlineargradient(spread:pad, x1:0.507, y1:0.869318, x2:0.507, y2:0.0965909, stop:0 rgba(243, 243, 243, 255), stop:1 rgba(250, 250, 250, 255)); - -border: 1px outset #999; -border-radius: 3; -} - @@ -19455,7 +18582,7 @@ border-radius: 3; - 10 + 10000 10 @@ -19463,24 +18590,12 @@ border-radius: 3; - - - 0 - 0 - - 81 28 - - - 81 - 28 - - QPushButton { border: 1px outset #999; @@ -22192,23 +21307,7 @@ rate(deg/s) - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - + Qt::Horizontal @@ -22224,7 +21323,7 @@ rate(deg/s) - + @@ -22232,26 +21331,13 @@ rate(deg/s) 16 - - - 9 - 75 - true - - Sensor Tunning - + - - - 0 - 0 - - 0 @@ -22781,13 +21867,6 @@ rate(deg/s) false - - #RateStabilizationGroup_23{background-color: qlineargradient(spread:pad, x1:0.507, y1:0.869318, x2:0.507, y2:0.0965909, stop:0 rgba(243, 243, 243, 255), stop:1 rgba(250, 250, 250, 255)); - -border: 1px outset #999; -border-radius: 3; -} - @@ -25118,23 +24197,7 @@ border-radius: 5; - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - + @@ -25671,13 +24734,6 @@ border-radius: 5; false - - #RateStabilizationGroup_22{background-color: qlineargradient(spread:pad, x1:0.507, y1:0.869318, x2:0.507, y2:0.0965909, stop:0 rgba(243, 243, 243, 255), stop:1 rgba(250, 250, 250, 255)); - -border: 1px outset #999; -border-radius: 3; -} - @@ -25724,13 +24780,6 @@ border-radius: 3; 0 - - - 9 - 50 - false - - If you check this, the GCS will udpate the stabilization factors automatically every 300ms, which will help for fast tuning. @@ -25776,11 +24825,6 @@ automatically every 300ms, which will help for fast tuning. 28 - - - 8 - - Send settings to the board but do not save to the non-volatile memory @@ -25835,11 +24879,6 @@ border-radius: 4; 28 - - - 8 - - Send settings to the board and save to the non-volatile memory diff --git a/overo b/overo index 8381aa124..335a3486d 160000 --- a/overo +++ b/overo @@ -1 +1 @@ -Subproject commit 8381aa124feafbb268c4d87d569a8185765f4297 +Subproject commit 335a3486dd41e48345209d0a65d49a8cc8b442a1