0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-11-25 00:18:06 +03:00
This commit is contained in:
Rodrigo Torres
2021-08-23 02:07:08 -03:00
parent 53683a8c89
commit 7dad9d700b
42 changed files with 249 additions and 157 deletions

View File

@@ -46,8 +46,8 @@ void CodeEditor::lineNumberAreaPaintEvent(QPaintEvent* event)
QPainter painter(lineNumberArea);
QStyleOption option;
option.initFrom(this);
//painter.fillRect(event->rect(), QPalette().background().color());
QColor bg = option.palette.background().color().darker(150);
//painter.fillRect(event->rect(), QPalette().window().color());
QColor bg = option.palette.window().color().darker(150);
painter.fillRect(event->rect(), bg);
QTextBlock block = firstVisibleBlock();
@@ -79,7 +79,7 @@ int CodeEditor::lineNumberAreaWidth()
++digits;
}
int space = fontMetrics().width(QLatin1Char('9'))*2 + fontMetrics().width(QLatin1Char('9')) * digits;
int space = fontMetrics().boundingRect(QLatin1Char('9')).width()*2 + fontMetrics().boundingRect(QLatin1Char('9')).width() * digits;
return space;
}
@@ -300,7 +300,7 @@ void CodeEditor::highlightCurrentLine()
if (!isReadOnly()) {
QTextEdit::ExtraSelection selection;
QColor lineColor = QColor(QPalette().background().color()).darker(100);
QColor lineColor = QColor(QPalette().window().color()).darker(100);
selection.format.setBackground(lineColor);
selection.format.setProperty(QTextFormat::FullWidthSelection, true);