| 1411 | } |
| 1412 | |
| 1413 | void DiffTextWindow::resizeEvent(QResizeEvent* e) |
| 1414 | { |
| 1415 | QSize newSize = e->size(); |
| 1416 | QFontMetrics fm = fontMetrics(); |
| 1417 | LineType visibleLines = newSize.height() / fm.lineSpacing() - 2; |
| 1418 | //TODO: Fix after line number area is converted to a QWidget. |
| 1419 | qint32 visibleColumns = newSize.width() / fm.horizontalAdvance('0') - d->leftInfoWidth(); |
| 1420 | |
| 1421 | if(e->size().height() != e->oldSize().height()) |
| 1422 | Q_EMIT resizeHeightChangedSignal(visibleLines); |
| 1423 | if(e->size().width() != e->oldSize().width()) |
| 1424 | Q_EMIT resizeWidthChangedSignal(visibleColumns); |
| 1425 | QWidget::resizeEvent(e); |
| 1426 | } |
| 1427 | |
| 1428 | LineType DiffTextWindow::getNofVisibleLines() const |
| 1429 | { |
nothing calls this directly
no test coverage detected