OpenToonz - An open-source full-featured 2D animation creation software
C
Pair field style #881 (#1034)
Jeremy Bullock2739e0d08ce0
diff --git a/stuff/config/qss/gray_048/gray_048.less b/stuff/config/qss/gray_048/gray_048.lessindex 2772ec829..e96e5e7bc 100644--- a/stuff/config/qss/gray_048/gray_048.less+++ b/stuff/config/qss/gray_048/gray_048.less@@ -1353,7 +1353,9 @@ QDialog #dialogButtonFrame {#IntPairField,#DoublePairField {qproperty-LightLineColor: rgb(155,155,155);+ qproperty-LightLineEdgeColor: @m_baseBG;qproperty-DarkLineColor: rgb(47,47,47);+ qproperty-MiddleLineColor: rgb(0,0,0);qproperty-HandleLeftPixmap: url("@{image_url}/h_slider_left.png");qproperty-HandleRightPixmap: url("@{image_url}/h_slider_right.png");qproperty-HandleLeftGrayPixmap: url("@{image_url}/h_slider_left_disabled.png");diff --git a/stuff/config/qss/gray_048/gray_048.qss b/stuff/config/qss/gray_048/gray_048.qssindex f2d76cff2..d268b9320 100644--- a/stuff/config/qss/gray_048/gray_048.qss+++ b/stuff/config/qss/gray_048/gray_048.qss@@ -1350,7 +1350,9 @@ QDialog #dialogButtonFrame {#IntPairField,#DoublePairField {qproperty-LightLineColor: #9b9b9b;+ qproperty-LightLineEdgeColor: #303030;qproperty-DarkLineColor: #2f2f2f;+ qproperty-MiddleLineColor: #000000;qproperty-HandleLeftPixmap: url("../gray_072/imgs/h_slider_left.png");qproperty-HandleRightPixmap: url("../gray_072/imgs/h_slider_right.png");qproperty-HandleLeftGrayPixmap: url("../gray_072/imgs/h_slider_left_disabled.png");diff --git a/stuff/config/qss/gray_048/gray_048_mac.qss b/stuff/config/qss/gray_048/gray_048_mac.qssindex f2d76cff2..d268b9320 100644--- a/stuff/config/qss/gray_048/gray_048_mac.qss+++ b/stuff/config/qss/gray_048/gray_048_mac.qss@@ -1350,7 +1350,9 @@ QDialog #dialogButtonFrame {#IntPairField,#DoublePairField {qproperty-LightLineColor: #9b9b9b;+ qproperty-LightLineEdgeColor: #303030;qproperty-DarkLineColor: #2f2f2f;+ qproperty-MiddleLineColor: #000000;qproperty-HandleLeftPixmap: url("../gray_072/imgs/h_slider_left.png");qproperty-HandleRightPixmap: url("../gray_072/imgs/h_slider_right.png");qproperty-HandleLeftGrayPixmap: url("../gray_072/imgs/h_slider_left_disabled.png");diff --git a/stuff/config/qss/gray_072/gray_072.less b/stuff/config/qss/gray_072/gray_072.lessindex 20a0e958a..dd78c0a6c 100644--- a/stuff/config/qss/gray_072/gray_072.less+++ b/stuff/config/qss/gray_072/gray_072.less@@ -1352,7 +1352,9 @@ QDialog #dialogButtonFrame {#IntPairField,#DoublePairField {qproperty-LightLineColor: rgb(155,155,155);+ qproperty-LightLineEdgeColor: @m_baseBG;qproperty-DarkLineColor: rgb(47,47,47);+ qproperty-MiddleLineColor: rgb(0,0,0);qproperty-HandleLeftPixmap: url("@{image_url}/h_slider_left.png");qproperty-HandleRightPixmap: url("@{image_url}/h_slider_right.png");qproperty-HandleLeftGrayPixmap: url("@{image_url}/h_slider_left_disabled.png");diff --git a/stuff/config/qss/gray_072/gray_072.qss b/stuff/config/qss/gray_072/gray_072.qssindex 7ed7c3474..413c15a7a 100644--- a/stuff/config/qss/gray_072/gray_072.qss+++ b/stuff/config/qss/gray_072/gray_072.qss@@ -1350,7 +1350,9 @@ QDialog #dialogButtonFrame {#IntPairField,#DoublePairField {qproperty-LightLineColor: #9b9b9b;+ qproperty-LightLineEdgeColor: #484848;qproperty-DarkLineColor: #2f2f2f;+ qproperty-MiddleLineColor: #000000;qproperty-HandleLeftPixmap: url("imgs/h_slider_left.png");qproperty-HandleRightPixmap: url("imgs/h_slider_right.png");qproperty-HandleLeftGrayPixmap: url("imgs/h_slider_left_disabled.png");diff --git a/stuff/config/qss/gray_072/gray_072_mac.qss b/stuff/config/qss/gray_072/gray_072_mac.qssindex 7ed7c3474..413c15a7a 100644--- a/stuff/config/qss/gray_072/gray_072_mac.qss+++ b/stuff/config/qss/gray_072/gray_072_mac.qss@@ -1350,7 +1350,9 @@ QDialog #dialogButtonFrame {#IntPairField,#DoublePairField {qproperty-LightLineColor: #9b9b9b;+ qproperty-LightLineEdgeColor: #484848;qproperty-DarkLineColor: #2f2f2f;+ qproperty-MiddleLineColor: #000000;qproperty-HandleLeftPixmap: url("imgs/h_slider_left.png");qproperty-HandleRightPixmap: url("imgs/h_slider_right.png");qproperty-HandleLeftGrayPixmap: url("imgs/h_slider_left_disabled.png");diff --git a/stuff/config/qss/gray_128/gray_128.less b/stuff/config/qss/gray_128/gray_128.lessindex 2254f17f9..54efef570 100644--- a/stuff/config/qss/gray_128/gray_128.less+++ b/stuff/config/qss/gray_128/gray_128.less@@ -1171,7 +1171,9 @@ QDialog #dialogButtonFrame {#IntPairField,#DoublePairField {qproperty-LightLineColor: white;- qproperty-DarkLineColor: rgb(128,128,128);+ qproperty-LightLineEdgeColor: white;+ qproperty-DarkLineColor: rgb(198,198,198);+ qproperty-MiddleLineColor: @m_baseBG;qproperty-HandleLeftPixmap: url("@{image_url}/h_slider_left.png");qproperty-HandleRightPixmap: url("@{image_url}/h_slider_right.png");qproperty-HandleLeftGrayPixmap: url("@{image_url}/h_slider_left_disabled.png");diff --git a/stuff/config/qss/gray_128/gray_128.qss b/stuff/config/qss/gray_128/gray_128.qssindex 2d04549ea..ee3fe1ef9 100644--- a/stuff/config/qss/gray_128/gray_128.qss+++ b/stuff/config/qss/gray_128/gray_128.qss@@ -1080,7 +1080,9 @@ QDialog #dialogButtonFrame {#IntPairField,#DoublePairField {qproperty-LightLineColor: white;- qproperty-DarkLineColor: #808080;+ qproperty-LightLineEdgeColor: white;+ qproperty-DarkLineColor: #c6c6c6;+ qproperty-MiddleLineColor: #808080;qproperty-HandleLeftPixmap: url("imgs/h_slider_left.png");qproperty-HandleRightPixmap: url("imgs/h_slider_right.png");qproperty-HandleLeftGrayPixmap: url("imgs/h_slider_left_disabled.png");diff --git a/stuff/config/qss/gray_128/gray_128_mac.qss b/stuff/config/qss/gray_128/gray_128_mac.qssindex 2d04549ea..ee3fe1ef9 100644--- a/stuff/config/qss/gray_128/gray_128_mac.qss+++ b/stuff/config/qss/gray_128/gray_128_mac.qss@@ -1080,7 +1080,9 @@ QDialog #dialogButtonFrame {#IntPairField,#DoublePairField {qproperty-LightLineColor: white;- qproperty-DarkLineColor: #808080;+ qproperty-LightLineEdgeColor: white;+ qproperty-DarkLineColor: #c6c6c6;+ qproperty-MiddleLineColor: #808080;qproperty-HandleLeftPixmap: url("imgs/h_slider_left.png");qproperty-HandleRightPixmap: url("imgs/h_slider_right.png");qproperty-HandleLeftGrayPixmap: url("imgs/h_slider_left_disabled.png");diff --git a/toonz/sources/include/toonzqt/doublepairfield.h b/toonz/sources/include/toonzqt/doublepairfield.hindex 9fcaf7fbe..7220cb035 100644--- a/toonz/sources/include/toonzqt/doublepairfield.h+++ b/toonz/sources/include/toonzqt/doublepairfield.h@@ -80,9 +80,15 @@ protected:QColor m_lightLineColor; /*-- スライダ溝の明るい色(白) --*/QColor m_darkLineColor; /*-- スライダ溝の暗い色(128,128,128) --*/+ QColor m_middleLineColor;+ QColor m_lightLineEdgeColor;Q_PROPERTY(QColor LightLineColor READ getLightLineColor WRITE setLightLineColor);Q_PROPERTY(QColor DarkLineColor READ getDarkLineColor WRITE setDarkLineColor);+ Q_PROPERTY(+ QColor MiddleLineColor READ getMiddleLineColor WRITE setMiddleLineColor);+ Q_PROPERTY(QColor LightLineEdgeColor READ getLightLineEdgeColor WRITE+ setLightLineEdgeColor);DoubleValueLineEdit *m_leftLineEdit;DoubleValueLineEdit *m_rightLineEdit;@@ -143,6 +149,12 @@ public:QColor getLightLineColor() const { return m_lightLineColor; }void setDarkLineColor(const QColor &color) { m_darkLineColor = color; }QColor getDarkLineColor() const { return m_darkLineColor; }+ void setMiddleLineColor(const QColor &color) { m_middleLineColor = color; }+ QColor getMiddleLineColor() const { return m_middleLineColor; }+ void setLightLineEdgeColor(const QColor &color) {+ m_lightLineEdgeColor = color;+ }+ QColor getLightLineEdgeColor() const { return m_lightLineEdgeColor; }protected:/*! Return value corresponding \b x position. */diff --git a/toonz/sources/include/toonzqt/intpairfield.h b/toonz/sources/include/toonzqt/intpairfield.hindex 1d62613da..c2fffa411 100644--- a/toonz/sources/include/toonzqt/intpairfield.h+++ b/toonz/sources/include/toonzqt/intpairfield.h@@ -93,9 +93,15 @@ class DVAPI IntPairField : public QWidget {QColor m_lightLineColor; /*-- スライダ溝の明るい色(白) --*/QColor m_darkLineColor; /*-- スライダ溝の暗い色(128,128,128) --*/+ QColor m_middleLineColor;+ QColor m_lightLineEdgeColor;Q_PROPERTY(QColor LightLineColor READ getLightLineColor WRITE setLightLineColor);Q_PROPERTY(QColor DarkLineColor READ getDarkLineColor WRITE setDarkLineColor);+ Q_PROPERTY(+ QColor MiddleLineColor READ getMiddleLineColor WRITE setMiddleLineColor);+ Q_PROPERTY(QColor LightLineEdgeColor READ getLightLineEdgeColor WRITE+ setLightLineEdgeColor);QLabel *m_leftLabel, *m_rightLabel;@@ -151,6 +157,12 @@ public:QColor getLightLineColor() const { return m_lightLineColor; }void setDarkLineColor(const QColor &color) { m_darkLineColor = color; }QColor getDarkLineColor() const { return m_darkLineColor; }+ void setMiddleLineColor(const QColor &color) { m_middleLineColor = color; }+ QColor getMiddleLineColor() const { return m_middleLineColor; }+ void setLightLineEdgeColor(const QColor &color) {+ m_lightLineEdgeColor = color;+ }+ QColor getLightLineEdgeColor() const { return m_lightLineEdgeColor; }protected:/*! Return value corresponding \b x position. */diff --git a/toonz/sources/toonzqt/doublepairfield.cpp b/toonz/sources/toonzqt/doublepairfield.cppindex 7a7839aaa..afdc2d6dd 100644--- a/toonz/sources/toonzqt/doublepairfield.cpp+++ b/toonz/sources/toonzqt/doublepairfield.cpp@@ -99,16 +99,19 @@ void DoubleValuePairField::paintEvent(QPaintEvent *) {int y = height() / 2;p.setPen(getLightLineColor());- p.drawLine(x0 - 1, y, x1 + 1, y);+ p.drawLine(x0 - 1, y, x1, y);+ p.setPen(getLightLineEdgeColor());+ p.drawPoint(x1 + 1, y);p.drawPoint(x1 + 1, y - 1);p.drawPoint(x1 + 1, y - 2);p.drawPoint(x1 + 1, y - 3);- p.setPen(QColor(0, 0, 0));+ p.setPen(getMiddleLineColor());p.drawLine(x0, y - 2, x1 - 1, y - 2);p.setPen(getDarkLineColor());p.drawLine(x0 - 1, y - 3, x1, y - 3);p.drawPoint(x0 - 1, y - 1);p.drawPoint(x0 - 1, y - 2);+p.setPen(Qt::black);int y1 = height() - 1;diff --git a/toonz/sources/toonzqt/intpairfield.cpp b/toonz/sources/toonzqt/intpairfield.cppindex 21f1d111d..3d2cfe8a5 100644--- a/toonz/sources/toonzqt/intpairfield.cpp+++ b/toonz/sources/toonzqt/intpairfield.cpp@@ -95,11 +95,13 @@ void IntPairField::paintEvent(QPaintEvent *) {int y = height() / 2;p.setPen(getLightLineColor());- p.drawLine(x0 - 1, y, x1 + 1, y);+ p.drawLine(x0 - 1, y, x1, y);+ p.setPen(getLightLineEdgeColor());+ p.drawPoint(x1 + 1, y);p.drawPoint(x1 + 1, y - 1);p.drawPoint(x1 + 1, y - 2);p.drawPoint(x1 + 1, y - 3);- p.setPen(QColor(0, 0, 0));+ p.setPen(getMiddleLineColor());p.drawLine(x0, y - 2, x1 - 1, y - 2);p.setPen(getDarkLineColor());p.drawLine(x0 - 1, y - 3, x1, y - 3);