From 72d1e2ebf16bceaaa8027817dbb7c3784e3f68ae Mon Sep 17 00:00:00 2001 From: Jeremy Bullock Date: Jan 12 2017 01:45:50 +0000 Subject: fix white xsheet vertical line (#876) close #857 --- diff --git a/stuff/config/qss/gray_048/gray_048.less b/stuff/config/qss/gray_048/gray_048.less index e60d7d2..f2fcddb 100644 --- a/stuff/config/qss/gray_048/gray_048.less +++ b/stuff/config/qss/gray_048/gray_048.less @@ -910,6 +910,8 @@ XsheetViewer { qproperty-BGColor: rgb(72,72,72); qproperty-LightLineColor: rgb(32,32,32); qproperty-MarkerLineColor: rgb(30, 150, 196); + qproperty-VerticalLineColor: rgb(120,120,120); + qproperty-VerticalLineHeadColor: rgb(160,160,160); qproperty-PreviewFrameTextColor: rgb(150, 230, 230); qproperty-CurrentRowBgColor: rgb(80,96,130); diff --git a/stuff/config/qss/gray_048/gray_048.qss b/stuff/config/qss/gray_048/gray_048.qss index a01957f..0ae606d 100644 --- a/stuff/config/qss/gray_048/gray_048.qss +++ b/stuff/config/qss/gray_048/gray_048.qss @@ -923,6 +923,8 @@ XsheetViewer { qproperty-BGColor: #484848; qproperty-LightLineColor: #202020; qproperty-MarkerLineColor: #1e96c4; + qproperty-VerticalLineColor: #787878; + qproperty-VerticalLineHeadColor: #a0a0a0; qproperty-PreviewFrameTextColor: #96e6e6; qproperty-CurrentRowBgColor: #506082; qproperty-EmptyColumnHeadColor: #606060; diff --git a/stuff/config/qss/gray_048/gray_048_mac.qss b/stuff/config/qss/gray_048/gray_048_mac.qss index ea3824a..bd59c11 100644 --- a/stuff/config/qss/gray_048/gray_048_mac.qss +++ b/stuff/config/qss/gray_048/gray_048_mac.qss @@ -923,6 +923,8 @@ XsheetViewer { qproperty-BGColor: #484848; qproperty-LightLineColor: #202020; qproperty-MarkerLineColor: #1e96c4; + qproperty-VerticalLineColor: #787878; + qproperty-VerticalLineHeadColor: #a0a0a0; qproperty-PreviewFrameTextColor: #96e6e6; qproperty-CurrentRowBgColor: #506082; qproperty-EmptyColumnHeadColor: #606060; diff --git a/stuff/config/qss/gray_072/gray_072.less b/stuff/config/qss/gray_072/gray_072.less index 0f95d3d..ce5e94b 100644 --- a/stuff/config/qss/gray_072/gray_072.less +++ b/stuff/config/qss/gray_072/gray_072.less @@ -1,3 +1,4 @@ +// out: gray_072.qss /* LESS Definitions */ /*Image URL*/ @@ -908,6 +909,8 @@ XsheetViewer { qproperty-BGColor: rgb(72,72,72); qproperty-LightLineColor: rgb(32,32,32); qproperty-MarkerLineColor: rgb(30, 150, 196); + qproperty-VerticalLineColor: rgb(120,120,120); + qproperty-VerticalLineHeadColor: rgb(160,160,160); qproperty-PreviewFrameTextColor: rgb(150, 230, 230); qproperty-CurrentRowBgColor: rgb(80,96,130); diff --git a/stuff/config/qss/gray_072/gray_072.qss b/stuff/config/qss/gray_072/gray_072.qss index 80272e5..b0acaee 100644 --- a/stuff/config/qss/gray_072/gray_072.qss +++ b/stuff/config/qss/gray_072/gray_072.qss @@ -923,6 +923,8 @@ XsheetViewer { qproperty-BGColor: #484848; qproperty-LightLineColor: #202020; qproperty-MarkerLineColor: #1e96c4; + qproperty-VerticalLineColor: #787878; + qproperty-VerticalLineHeadColor: #a0a0a0; qproperty-PreviewFrameTextColor: #96e6e6; qproperty-CurrentRowBgColor: #506082; qproperty-EmptyColumnHeadColor: #606060; diff --git a/stuff/config/qss/gray_072/gray_072_mac.qss b/stuff/config/qss/gray_072/gray_072_mac.qss index c402bc2..770c273 100644 --- a/stuff/config/qss/gray_072/gray_072_mac.qss +++ b/stuff/config/qss/gray_072/gray_072_mac.qss @@ -923,6 +923,8 @@ XsheetViewer { qproperty-BGColor: #484848; qproperty-LightLineColor: #202020; qproperty-MarkerLineColor: #1e96c4; + qproperty-VerticalLineColor: #787878; + qproperty-VerticalLineHeadColor: #a0a0a0; qproperty-PreviewFrameTextColor: #96e6e6; qproperty-CurrentRowBgColor: #506082; qproperty-EmptyColumnHeadColor: #606060; diff --git a/stuff/config/qss/gray_128/gray_128.less b/stuff/config/qss/gray_128/gray_128.less index 1e08d9f..9786522 100644 --- a/stuff/config/qss/gray_128/gray_128.less +++ b/stuff/config/qss/gray_128/gray_128.less @@ -745,6 +745,8 @@ XsheetViewer { qproperty-BGColor: rgb(164,164,164); qproperty-LightLineColor: rgb(146,144,146); qproperty-MarkerLineColor: rgb(0, 255, 246); + qproperty-VerticalLineColor: rgb(0, 0, 0); + qproperty-VerticalLineHeadColor: rgb(0, 0, 0); qproperty-PreviewFrameTextColor: rgb(0, 0, 255); qproperty-CurrentRowBgColor: rgb(210,210,210); diff --git a/stuff/config/qss/gray_128/gray_128.qss b/stuff/config/qss/gray_128/gray_128.qss index c3668ad..02d1026 100644 --- a/stuff/config/qss/gray_128/gray_128.qss +++ b/stuff/config/qss/gray_128/gray_128.qss @@ -670,6 +670,8 @@ XsheetViewer { qproperty-BGColor: #a4a4a4; qproperty-LightLineColor: #929092; qproperty-MarkerLineColor: #00fff6; + qproperty-VerticalLineColor: #000000; + qproperty-VerticalLineHeadColor: #000000; qproperty-PreviewFrameTextColor: #0000ff; qproperty-CurrentRowBgColor: #d2d2d2; qproperty-EmptyColumnHeadColor: #c8c8c8; diff --git a/stuff/config/qss/gray_128/gray_128_mac.qss b/stuff/config/qss/gray_128/gray_128_mac.qss index df5ad71..ef8ac61 100644 --- a/stuff/config/qss/gray_128/gray_128_mac.qss +++ b/stuff/config/qss/gray_128/gray_128_mac.qss @@ -670,6 +670,8 @@ XsheetViewer { qproperty-BGColor: #a4a4a4; qproperty-LightLineColor: #929092; qproperty-MarkerLineColor: #00fff6; + qproperty-VerticalLineColor: #000000; + qproperty-VerticalLineHeadColor: #000000; qproperty-PreviewFrameTextColor: #0000ff; qproperty-CurrentRowBgColor: #d2d2d2; qproperty-EmptyColumnHeadColor: #c8c8c8; diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cpp index 87c9575..a63fd37 100644 --- a/toonz/sources/toonz/xshcellviewer.cpp +++ b/toonz/sources/toonz/xshcellviewer.cpp @@ -830,10 +830,8 @@ void CellArea::drawCells(QPainter &p, const QRect toBeUpdated) { x1 = m_viewer->columnToX(col + 1); // draw vertical lines - p.setPen(Qt::black); + p.setPen(m_viewer->getVerticalLineColor()); if (x > 0) p.drawLine(x, y0, x, y1); - p.setPen(Qt::white); - if (x > 1) p.drawLine(x - 1, y0, x - 1, y1); for (row = r0; row <= r1; row++) { // draw horizontal lines @@ -1605,7 +1603,7 @@ void CellArea::paintEvent(QPaintEvent *event) { int col = m_viewer->getCurrentColumn(); int x = m_viewer->columnToX(col); int y = m_viewer->rowToY(row); - QRect rect = QRect(x + 1, y + 1, ColumnWidth - 3, RowHeight - 2); + QRect rect = QRect(x + 1, y + 1, ColumnWidth - 2, RowHeight - 2); p.setPen(Qt::black); p.setBrush(Qt::NoBrush); p.drawRect(rect); diff --git a/toonz/sources/toonz/xshcolumnviewer.cpp b/toonz/sources/toonz/xshcolumnviewer.cpp index f490b8e..995bc83 100644 --- a/toonz/sources/toonz/xshcolumnviewer.cpp +++ b/toonz/sources/toonz/xshcolumnviewer.cpp @@ -642,10 +642,8 @@ void ColumnArea::drawLevelColumnHead(QPainter &p, int col) { if (isEmpty || col < 0) { p.fillRect(rect, m_viewer->getEmptyColumnHeadColor()); - p.setPen(Qt::black); + p.setPen(m_viewer->getVerticalLineHeadColor()); p.drawLine(x0, y0, x0, y1); - p.setPen(Qt::white); - p.drawLine(x1, y0, x1, y1); } else { QColor columnColor, sideColor; if (usage == Reference) { @@ -804,10 +802,8 @@ void ColumnArea::drawSoundColumnHead(QPainter &p, int col) { // base color if (isEmpty || col < 0) { p.fillRect(rect, EmptyColumnHeadColor); - p.setPen(Qt::black); + p.setPen(m_viewer->getVerticalLineHeadColor()); p.drawLine(x0, y0, x0, y1); - p.setPen(Qt::white); - p.drawLine(x1, y0, x1, y1); } else { QColor columnColor, sideColor; @@ -985,10 +981,8 @@ void ColumnArea::drawPaletteColumnHead(QPainter &p, int col) { // fill base color if (isEmpty || col < 0) { p.fillRect(rect, EmptyColumnHeadColor); - p.setPen(Qt::black); + p.setPen(m_viewer->getVerticalLineHeadColor()); p.drawLine(x0, y0, x0, y1); - p.setPen(Qt::white); - p.drawLine(x1, y0, x1, y1); } else { QColor columnColor, sideColor; if (usage == Reference) { diff --git a/toonz/sources/toonz/xsheetviewer.h b/toonz/sources/toonz/xsheetviewer.h index 6e823b5..64a17de 100644 --- a/toonz/sources/toonz/xsheetviewer.h +++ b/toonz/sources/toonz/xsheetviewer.h @@ -176,12 +176,18 @@ class XsheetViewer final : public QFrame, public Spreadsheet::FrameScroller { // Row QColor m_currentRowBgColor; // current frame / column (210,210,210) QColor m_markerLineColor; // marker lines (0, 255, 246) + QColor m_verticalLineColor; // vertical lines + QColor m_verticalLineHeadColor; // vertical lines in column head QColor m_textColor; // text color (black) QColor m_previewFrameTextColor; // frame number in preview range (blue) Q_PROPERTY(QColor CurrentRowBgColor READ getCurrentRowBgColor WRITE setCurrentRowBgColor) Q_PROPERTY( QColor MarkerLineColor READ getMarkerLineColor WRITE setMarkerLineColor) + Q_PROPERTY(QColor VerticalLineColor READ getVerticalLineColor WRITE + setVerticalLineColor) + Q_PROPERTY(QColor VerticalLineHeadColor READ getVerticalLineHeadColor WRITE + setVerticalLineHeadColor) Q_PROPERTY(QColor TextColor READ getTextColor WRITE setTextColor) Q_PROPERTY(QColor PreviewFrameTextColor READ getPreviewFrameTextColor WRITE setPreviewFrameTextColor) @@ -476,6 +482,14 @@ public: QColor getCurrentRowBgColor() const { return m_currentRowBgColor; } void setMarkerLineColor(const QColor &color) { m_markerLineColor = color; } QColor getMarkerLineColor() const { return m_markerLineColor; } + void setVerticalLineColor(const QColor &color) { + m_verticalLineColor = color; + } + QColor getVerticalLineColor() const { return m_verticalLineColor; } + void setVerticalLineHeadColor(const QColor &color) { + m_verticalLineHeadColor = color; + } + QColor getVerticalLineHeadColor() const { return m_verticalLineHeadColor; } void setTextColor(const QColor &color) { m_textColor = color; } QColor getTextColor() const { return m_textColor; } void setPreviewFrameTextColor(const QColor &color) {