diff options
-rw-r--r-- | facetracknoir/ftnoir_curves.ui | 54 | ||||
-rw-r--r-- | qfunctionconfigurator/qfunctionconfigurator.cpp | 14 | ||||
-rw-r--r-- | qfunctionconfigurator/qfunctionconfigurator.h | 12 |
3 files changed, 10 insertions, 70 deletions
diff --git a/facetracknoir/ftnoir_curves.ui b/facetracknoir/ftnoir_curves.ui index bbdce4e2..83b514b5 100644 --- a/facetracknoir/ftnoir_curves.ui +++ b/facetracknoir/ftnoir_curves.ui @@ -6,8 +6,8 @@ <rect>
<x>0</x>
<y>0</y>
- <width>1050</width>
- <height>667</height>
+ <width>1042</width>
+ <height>659</height>
</rect>
</property>
<property name="windowTitle">
@@ -24,49 +24,9 @@ <bool>false</bool>
</property>
<property name="styleSheet">
- <string notr="true">background-color: rgb(240, 240, 240);
-/*
-QWidget#widgetTop {
-background-color: #595959;
-border-bottom: 1px solid #000;
-}
-*/
+ <string notr="true">
-/* Make text in message boxes selectable. */
-QMessageBox {
-/* LinksAccessibleByMouse | TextSelectableByMouse */
-messagebox-text-interaction-flags: 5;
-}
-/* Make the entire row selected in item views. */
-QAbstractItemView {
-show-decoration-selected: 1;
-}
-
-/* Nice WindowsXP-style password character for password line edits. */
-QLineEdit[echoMode="2"] {
-lineedit-password-character: 9679;
-}
-
-/* Customize tooltips. */
-QToolTip {
-background-color: rgb(170, 255, 127);
-opacity: 200;
-}
-
-/* Customize push buttons and comboboxes. Our read-only combobox
-is very similar to a push button, so they share the same border image. */
-
-QPushButton {
-min-width: 4em;
-}
-
-QPushButton:disabled {
-color: rgb(128, 128, 128);
-}
-
-QGroupBox {
-color: rgb(255, 255, 255);
-}</string>
+</string>
</property>
<layout class="QVBoxLayout" name="_vertical_layout">
<item>
@@ -156,9 +116,9 @@ color: rgb(255, 255, 255); </property>
<property name="colorBackground" stdset="0">
<color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
</color>
</property>
</widget>
diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp index 0bd9aad0..802c0a1d 100644 --- a/qfunctionconfigurator/qfunctionconfigurator.cpp +++ b/qfunctionconfigurator/qfunctionconfigurator.cpp @@ -140,15 +140,14 @@ void QFunctionConfigurator::drawBackground(const QRectF &fullRect) QRect scale; _background = QPixmap(fullRect.width(), fullRect.height()); + QColor bgColor = palette().color(QPalette::Normal, QPalette::Background); QPainter painter(&_background); - - painter.save(); + painter.fillRect(fullRect, bgColor); painter.setRenderHint(QPainter::Antialiasing); - painter.fillRect(fullRect, colBackground); QColor bg_color(112, 154, 209); painter.fillRect(range, bg_color); - QFont font("ComicSans", 4); + QFont font; font.setPointSize(8); painter.setFont(font); @@ -200,8 +199,6 @@ void QFunctionConfigurator::drawBackground(const QRectF &fullRect) pen.setColor( Qt::black ); drawLine(&painter, range.topLeft() - QPointF(2,0), range.bottomLeft() - QPointF(2,0), pen); drawLine(&painter, range.bottomLeft(), range.bottomRight(), pen); - - painter.restore(); } @@ -628,11 +625,6 @@ void QFunctionConfigurator::setColorBezier(QColor color) colBezier = color; update(); } -void QFunctionConfigurator::setColorBackground(QColor color) -{ - colBackground = color; - update(); -} void QFunctionConfigurator::setInputEGU(QString egu) { diff --git a/qfunctionconfigurator/qfunctionconfigurator.h b/qfunctionconfigurator/qfunctionconfigurator.h index 6669f92e..07eeeae3 100644 --- a/qfunctionconfigurator/qfunctionconfigurator.h +++ b/qfunctionconfigurator/qfunctionconfigurator.h @@ -63,7 +63,6 @@ class FTNOIR_TRACKER_BASE_EXPORT QFunctionConfigurator : public QWidget Q_PROPERTY(int gridDistEGU_Output READ gridDistEGU_Output WRITE setgridDistEGU_Output) Q_PROPERTY(QColor colorBezier READ colorBezier WRITE setColorBezier) - Q_PROPERTY(QColor colorBackground READ colorBackground WRITE setColorBackground) Q_PROPERTY(QString stringInputEGU READ stringInputEGU WRITE setInputEGU) Q_PROPERTY(QString stringOutputEGU READ stringOutputEGU WRITE setOutputEGU) Q_PROPERTY(QString stringCaption READ stringCaption WRITE setCaption) @@ -94,27 +93,18 @@ class FTNOIR_TRACKER_BASE_EXPORT QFunctionConfigurator : public QWidget return gDistEGU_Output; } - // Return the current color to Designer QColor colorBezier() const { return colBezier; } - // Return the current color to Designer - QColor colorBackground() const - { - return colBackground; - } - // Return the current string to Designer QString stringInputEGU() const { return strInputEGU; } - // Return the current string to Designer QString stringOutputEGU() const { return strOutputEGU; } - // Return the current string to Designer QString stringCaption() const { return strCaption; @@ -140,7 +130,6 @@ public slots: void setgridDistEGU_Output(int); void setColorBezier(QColor); - void setColorBackground(QColor); void setInputEGU(QString); void setOutputEGU(QString); void setCaption(QString); @@ -179,7 +168,6 @@ private: int gDistEGU_Output; // Distance of the grid, in EGU of Output QColor colBezier; // Color of Bezier curve - QColor colBackground; // Color of widget background QString strInputEGU; // Engineering Units input (vertical axis) QString strOutputEGU; // Engineering Units output (horizontal axis) QString strCaption; // Caption of the graph |