Skip to content

Commit

Permalink
adjustable passthrough text color
Browse files Browse the repository at this point in the history
  • Loading branch information
konero committed Apr 6, 2024
1 parent 9b66fc4 commit 6bead43
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions stuff/config/qss/Blue/Blue.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,7 @@ ProjectPopup QLabel {
----------------------------------------------------------------------------- */
SchematicViewer {
qproperty-TextColor: #d6d8dd;
qproperty-PassThroughTextColor: #d6d8dd;
qproperty-VerticalLineColor: rgba(0, 0, 0, 0.3);
qproperty-LevelColumnColor: #4C6E4C;
qproperty-VectorColumnColor: #7B7B4C;
Expand Down
1 change: 1 addition & 0 deletions stuff/config/qss/Dark/Dark.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,7 @@ ProjectPopup QLabel {
----------------------------------------------------------------------------- */
SchematicViewer {
qproperty-TextColor: #e6e6e6;
qproperty-PassThroughTextColor: #e6e6e6;
qproperty-VerticalLineColor: rgba(0, 0, 0, 0.4);
qproperty-LevelColumnColor: #4C6E4C;
qproperty-VectorColumnColor: #7B7B4C;
Expand Down
1 change: 1 addition & 0 deletions stuff/config/qss/Default/Default.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,7 @@ ProjectPopup QLabel {
----------------------------------------------------------------------------- */
SchematicViewer {
qproperty-TextColor: #e6e6e6;
qproperty-PassThroughTextColor: #e6e6e6;
qproperty-VerticalLineColor: rgba(0, 0, 0, 0.3);
qproperty-LevelColumnColor: #4C6E4C;
qproperty-VectorColumnColor: #7B7B4C;
Expand Down
1 change: 1 addition & 0 deletions stuff/config/qss/Default/less/layouts/schematic.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

SchematicViewer {
qproperty-TextColor: @schematic-text-color;
qproperty-PassThroughTextColor: @schematic-text-color;
qproperty-VerticalLineColor: @schematic-VerticalLine-color;

qproperty-LevelColumnColor: @xsheet-LevelColumn-color;
Expand Down
1 change: 1 addition & 0 deletions stuff/config/qss/Light/Light.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,7 @@ ProjectPopup QLabel {
----------------------------------------------------------------------------- */
SchematicViewer {
qproperty-TextColor: #000;
qproperty-PassThroughTextColor: #000;
qproperty-VerticalLineColor: rgba(0, 0, 0, 0.15);
qproperty-LevelColumnColor: #a1cea1;
qproperty-VectorColumnColor: #d3cf9a;
Expand Down
1 change: 1 addition & 0 deletions stuff/config/qss/Neutral/Neutral.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,7 @@ ProjectPopup QLabel {
----------------------------------------------------------------------------- */
SchematicViewer {
qproperty-TextColor: #000;
qproperty-PassThroughTextColor: #000;
qproperty-VerticalLineColor: rgba(0, 0, 0, 0.3);
qproperty-LevelColumnColor: #78a578;
qproperty-VectorColumnColor: #a7a163;
Expand Down
9 changes: 9 additions & 0 deletions toonz/sources/include/toonzqt/schematicviewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ class DVAPI SchematicViewer final : public QWidget {
QColor m_textColor; // text color (black)
Q_PROPERTY(QColor TextColor READ getTextColor WRITE setTextColor)

QColor m_passThroughTextColor; // text outside of the node rect
Q_PROPERTY(QColor PassThroughTextColor READ getPassThroughTextColor WRITE
setPassThroughTextColor)

QColor m_verticalLineColor;
Q_PROPERTY(QColor VerticalLineColor READ getVerticalLineColor WRITE
setVerticalLineColor)
Expand Down Expand Up @@ -391,6 +395,11 @@ class DVAPI SchematicViewer final : public QWidget {
void setTextColor(const QColor &color) { m_textColor = color; }
QColor getTextColor() const { return m_textColor; }

void setPassThroughTextColor(const QColor &color) {
m_passThroughTextColor = color;
}
QColor getPassThroughTextColor() const { return m_passThroughTextColor; }

void setVerticalLineColor(const QColor &color) {
m_verticalLineColor = color;
}
Expand Down
2 changes: 1 addition & 1 deletion toonz/sources/toonzqt/fxschematicnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3815,7 +3815,7 @@ void FxPassThroughPainter::paint(QPainter *painter,
painter->setFont(fnt);
}

painter->setPen(viewer->getTextColor());
painter->setPen(viewer->getPassThroughTextColor());

if (!m_parent->isNameEditing()) {
// if this is a current object
Expand Down

0 comments on commit 6bead43

Please sign in to comment.