| 664 | } |
| 665 | |
| 666 | void CodeEditor::paintHeader(QPaintEvent *event) |
| 667 | { |
| 668 | QPainter painter(editorHeader); |
| 669 | QFont lineNoFont = font(); |
| 670 | QFontMetrics fm(lineNoFont); |
| 671 | int origFontHeight = fm.height(); |
| 672 | lineNoFont.setPointSizeF(lineNoFont.pointSizeF()*0.8); |
| 673 | QFontMetrics fm2(lineNoFont); |
| 674 | int heightDiff = (origFontHeight-fm2.height()); |
| 675 | painter.setFont(lineNoFont); |
| 676 | |
| 677 | |
| 678 | painter.fillRect(event->rect(), theme.backgroundColor.get(darkMode)); |
| 679 | int baseX = debugInfo->geometry().x(); |
| 680 | painter.setPen(theme.textColor.get(darkMode)); |
| 681 | painter.drawText(baseX, heightDiff/2, DEBUG_TAB_SIZE, debugInfoOffset(), Qt::AlignCenter, "Cons"); |
| 682 | painter.drawText(baseX + DEBUG_TAB_SIZE, heightDiff/2, DEBUG_TAB_SIZE, debugInfoOffset(), Qt::AlignCenter, "Vars"); |
| 683 | painter.drawText(baseX + DEBUG_TAB_SIZE*2, heightDiff/2, DEBUG_TAB_SIZE, debugInfoOffset(), Qt::AlignCenter, "Time"); |
| 684 | } |
| 685 | |
| 686 | void CodeEditor::setEditorFont(QFont& font) |
| 687 | { |
no test coverage detected