fix white xsheet vertical line (#876)

close #857
This commit is contained in:
Jeremy Bullock 2017-01-11 18:45:50 -07:00 committed by shun-iwasawa
parent d3b1c57d37
commit 72d1e2ebf1
12 changed files with 38 additions and 13 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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) {

View file

@ -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) {