- fix: Line numbers for problem case input/output/expected texteditors are not vertically centered.
This commit is contained in:
parent
aa12dcc4d1
commit
4a8b3e1896
1
NEWS.md
1
NEWS.md
|
@ -26,6 +26,7 @@ Red Panda C++ Version 2.26
|
|||
- change: In Options -> Language -> Generate Assembly, option "Don't generate SEH directives" default to True.
|
||||
- change: In Options —> Editor -> Code Suggestion, option "Hide symbols starting with underscore" default to True.
|
||||
- fix: Crash if include a non-exist header file in the source.
|
||||
- fix: Line numbers for problem case input/output/expected texteditors are not vertically centered.
|
||||
|
||||
Red Panda C++ Version 2.25
|
||||
|
||||
|
|
|
@ -197,7 +197,8 @@ void LineNumberTextEditor::lineNumberAreaPaintEvent(QPaintEvent *event)
|
|||
painter.setPen(mLineNumberAreaCurrentLine);
|
||||
else
|
||||
painter.setPen(mLineNumberAreaForeground);
|
||||
painter.drawText(5, top, lineNumberArea->width()-10, fontMetrics().height(),
|
||||
int y=top+std::max(0,bottom-top-fontMetrics().lineSpacing());
|
||||
painter.drawText(5, y, lineNumberArea->width()-10, fontMetrics().height(),
|
||||
Qt::AlignRight, number);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue