Make the oscilloscope colors available as properties

Make the oscilloscope colors available as properties so that they can be
changed via style sheets. Adjust the existing styles to use the colors
that have been hard coded previously.

Cleanup the paintEvent method of VisualizationWidget, e.g. by extracting
a method to determine the color to use for the line and by pulling
variables to the place where they are used. Fix some Clang warnings.
This commit is contained in:
Michael Gregorius
2018-07-30 20:00:08 +02:00
parent 0cddc469bc
commit 160488c096
4 changed files with 83 additions and 29 deletions

View File

@@ -157,6 +157,9 @@ GroupBox {
VisualizationWidget {
background: none;
border: none;
qproperty-normalColor: rgb(71, 253, 133);
qproperty-warningColor: rgb(255, 192, 64);
qproperty-clippingColor: rgb(255, 64, 64);
}
/* main toolbar cpu load widget - this can have transparent bg now */

View File

@@ -176,6 +176,9 @@ GroupBox {
VisualizationWidget {
background: none;
border: none;
qproperty-normalColor: rgb(71, 253, 133);
qproperty-warningColor: rgb(255, 192, 64);
qproperty-clippingColor: rgb(255, 64, 64);
}
/* main toolbar cpu load widget - this can have transparent bg now */