diff --git a/stuff/config/qss/Blue/Blue.qss b/stuff/config/qss/Blue/Blue.qss index c39a659..3e75526 100644 --- a/stuff/config/qss/Blue/Blue.qss +++ b/stuff/config/qss/Blue/Blue.qss @@ -1301,6 +1301,13 @@ QProgressBar::chunk { border-radius: 2; } /* ----------------------------------------------------------------------------- + Custom Panel Widgets +----------------------------------------------------------------------------- */ +MyScroller { + qproperty-ScrollerBorderColor: #747b8c; + qproperty-ScrollerBGColor: #2d2f30; +} +/* ----------------------------------------------------------------------------- File Browser ----------------------------------------------------------------------------- */ /* Left Pane @@ -2289,9 +2296,9 @@ Ruler { XsheetViewer { qproperty-TextColor: #d6d8dd; qproperty-ErrorTextColor: #ff7b7b; - qproperty-BGColor: #3a3b3d; qproperty-SelectedTextColor: #d6d8dd; qproperty-CurrentFrameTextColor: #d6d8dd; + qproperty-BGColor: #3a3b3d; qproperty-LightLineColor: rgba(0, 0, 0, 0.2); qproperty-MarkerLineColor: rgba(255, 255, 255, 0.15); qproperty-SecMarkerLineColor: rgba(255, 255, 255, 0.25); diff --git a/stuff/config/qss/Dark/Dark.qss b/stuff/config/qss/Dark/Dark.qss index f433cc4..a995fed 100644 --- a/stuff/config/qss/Dark/Dark.qss +++ b/stuff/config/qss/Dark/Dark.qss @@ -1301,6 +1301,13 @@ QProgressBar::chunk { border-radius: 2; } /* ----------------------------------------------------------------------------- + Custom Panel Widgets +----------------------------------------------------------------------------- */ +MyScroller { + qproperty-ScrollerBorderColor: #8d8d8d; + qproperty-ScrollerBGColor: #1c1c1c; +} +/* ----------------------------------------------------------------------------- File Browser ----------------------------------------------------------------------------- */ /* Left Pane @@ -2289,9 +2296,9 @@ Ruler { XsheetViewer { qproperty-TextColor: #e6e6e6; qproperty-ErrorTextColor: #ff7b7b; - qproperty-BGColor: #303030; qproperty-SelectedTextColor: #e6e6e6; qproperty-CurrentFrameTextColor: #e6e6e6; + qproperty-BGColor: #303030; qproperty-LightLineColor: rgba(0, 0, 0, 0.3); qproperty-MarkerLineColor: rgba(255, 255, 255, 0.15); qproperty-SecMarkerLineColor: rgba(255, 255, 255, 0.25); diff --git a/stuff/config/qss/Default/Default.qss b/stuff/config/qss/Default/Default.qss index f39d127..b1600d9 100644 --- a/stuff/config/qss/Default/Default.qss +++ b/stuff/config/qss/Default/Default.qss @@ -1301,6 +1301,13 @@ QProgressBar::chunk { border-radius: 2; } /* ----------------------------------------------------------------------------- + Custom Panel Widgets +----------------------------------------------------------------------------- */ +MyScroller { + qproperty-ScrollerBorderColor: #8d8d8d; + qproperty-ScrollerBGColor: #343434; +} +/* ----------------------------------------------------------------------------- File Browser ----------------------------------------------------------------------------- */ /* Left Pane @@ -2289,9 +2296,9 @@ Ruler { XsheetViewer { qproperty-TextColor: #e6e6e6; qproperty-ErrorTextColor: #ff7b7b; - qproperty-BGColor: #404040; qproperty-SelectedTextColor: #e6e6e6; qproperty-CurrentFrameTextColor: #e6e6e6; + qproperty-BGColor: #404040; qproperty-LightLineColor: rgba(0, 0, 0, 0.2); qproperty-MarkerLineColor: rgba(255, 255, 255, 0.15); qproperty-SecMarkerLineColor: rgba(255, 255, 255, 0.25); diff --git a/stuff/config/qss/Default/less/Default.less b/stuff/config/qss/Default/less/Default.less index 19c8068..d2393cd 100644 --- a/stuff/config/qss/Default/less/Default.less +++ b/stuff/config/qss/Default/less/Default.less @@ -304,6 +304,13 @@ @slider-right-handle-disabled: @slider-handle-img-disabled; // ----------------------------------------------------------------------------- +// Custom Panel Widgets +// ----------------------------------------------------------------------------- + +@customPanel-Scroller-border-color: darken(@text-color, 35); +@customPanel-Scroller-bg-color: darken(@bg, 8); + +// ----------------------------------------------------------------------------- // Titlebars // ----------------------------------------------------------------------------- diff --git a/stuff/config/qss/Default/less/layouts/controls.less b/stuff/config/qss/Default/less/layouts/controls.less index 037aaac..8c9773b 100644 --- a/stuff/config/qss/Default/less/layouts/controls.less +++ b/stuff/config/qss/Default/less/layouts/controls.less @@ -393,3 +393,12 @@ QProgressBar { border-radius: 2; } } + +/* ----------------------------------------------------------------------------- + Custom Panel Widgets +----------------------------------------------------------------------------- */ + +MyScroller { + qproperty-ScrollerBorderColor: @customPanel-Scroller-border-color; + qproperty-ScrollerBGColor: @customPanel-Scroller-bg-color; +} diff --git a/stuff/config/qss/Light/Light.qss b/stuff/config/qss/Light/Light.qss index d59ded0..ac23e20 100644 --- a/stuff/config/qss/Light/Light.qss +++ b/stuff/config/qss/Light/Light.qss @@ -1301,6 +1301,13 @@ QProgressBar::chunk { border-radius: 2; } /* ----------------------------------------------------------------------------- + Custom Panel Widgets +----------------------------------------------------------------------------- */ +MyScroller { + qproperty-ScrollerBorderColor: #000000; + qproperty-ScrollerBGColor: #c7c7c7; +} +/* ----------------------------------------------------------------------------- File Browser ----------------------------------------------------------------------------- */ /* Left Pane @@ -2289,9 +2296,9 @@ Ruler { XsheetViewer { qproperty-TextColor: #000; qproperty-ErrorTextColor: #c01111; - qproperty-BGColor: #cecece; qproperty-SelectedTextColor: #000; qproperty-CurrentFrameTextColor: #000; + qproperty-BGColor: #cecece; qproperty-LightLineColor: rgba(0, 0, 0, 0.15); qproperty-MarkerLineColor: rgba(0, 0, 0, 0.3); qproperty-SecMarkerLineColor: rgba(0, 0, 0, 0.5); diff --git a/stuff/config/qss/Neutral/Neutral.qss b/stuff/config/qss/Neutral/Neutral.qss index d5e01c2..250127d 100644 --- a/stuff/config/qss/Neutral/Neutral.qss +++ b/stuff/config/qss/Neutral/Neutral.qss @@ -1301,6 +1301,13 @@ QProgressBar::chunk { border-radius: 2; } /* ----------------------------------------------------------------------------- + Custom Panel Widgets +----------------------------------------------------------------------------- */ +MyScroller { + qproperty-ScrollerBorderColor: #000000; + qproperty-ScrollerBGColor: #6c6c6c; +} +/* ----------------------------------------------------------------------------- File Browser ----------------------------------------------------------------------------- */ /* Left Pane @@ -2289,9 +2296,9 @@ Ruler { XsheetViewer { qproperty-TextColor: #000; qproperty-ErrorTextColor: #c01111; - qproperty-BGColor: #767676; qproperty-SelectedTextColor: #000; qproperty-CurrentFrameTextColor: #000; + qproperty-BGColor: #767676; qproperty-LightLineColor: rgba(0, 0, 0, 0.15); qproperty-MarkerLineColor: rgba(255, 255, 255, 0.2); qproperty-SecMarkerLineColor: rgba(255, 255, 255, 0.35); diff --git a/toonz/sources/toonz/custompanelmanager.cpp b/toonz/sources/toonz/custompanelmanager.cpp index 61d7ad1..669bbaf 100644 --- a/toonz/sources/toonz/custompanelmanager.cpp +++ b/toonz/sources/toonz/custompanelmanager.cpp @@ -36,8 +36,8 @@ MyScroller::MyScroller(Qt::Orientation orientation, CommandId command1, void MyScroller::paintEvent(QPaintEvent*) { QPainter p(this); - p.setPen(Qt::white); - p.setBrush(Qt::NoBrush); + p.setPen(m_scrollerBorderColor); + p.setBrush(m_scrollerBGColor); p.drawRect(rect().adjusted(0, 0, -1, -1)); diff --git a/toonz/sources/toonz/custompanelmanager.h b/toonz/sources/toonz/custompanelmanager.h index 006afa2..7b27ccd 100644 --- a/toonz/sources/toonz/custompanelmanager.h +++ b/toonz/sources/toonz/custompanelmanager.h @@ -17,11 +17,25 @@ class MyScroller : public QWidget { Qt::Orientation m_orientation; QAction* m_actions[2]; int m_anchorPos; + QColor m_scrollerBorderColor; + QColor m_scrollerBGColor; + + Q_PROPERTY(QColor ScrollerBorderColor READ getScrollerBorderColor WRITE + setScrollerBorderColor); + Q_PROPERTY(QColor ScrollerBGColor READ getScrollerBGColor WRITE + setScrollerBGColor); public: MyScroller(Qt::Orientation orientation, CommandId command1, CommandId command2, QWidget* parent = nullptr); + void setScrollerBorderColor(const QColor& color) { + m_scrollerBorderColor = color; + } + QColor getScrollerBorderColor() const { return m_scrollerBorderColor; } + void setScrollerBGColor(const QColor& color) { m_scrollerBGColor = color; } + QColor getScrollerBGColor() const { return m_scrollerBGColor; } + protected: void paintEvent(QPaintEvent*) override; void mousePressEvent(QMouseEvent* event) override;