Changeset View
Changeset View
Standalone View
Standalone View
src/TerminalDisplay.cpp
Show First 20 Lines • Show All 1245 Lines • ▼ Show 20 Line(s) | |||||
1246 | #endif | 1246 | #endif | ||
1247 | } | 1247 | } | ||
1248 | 1248 | | |||
1249 | void TerminalDisplay::showResizeNotification() | 1249 | void TerminalDisplay::showResizeNotification() | ||
1250 | { | 1250 | { | ||
1251 | if (_showTerminalSizeHint && isVisible()) { | 1251 | if (_showTerminalSizeHint && isVisible()) { | ||
1252 | if (_resizeWidget == nullptr) { | 1252 | if (_resizeWidget == nullptr) { | ||
1253 | _resizeWidget = new QLabel(i18n("Size: XXX x XXX"), this); | 1253 | _resizeWidget = new QLabel(i18n("Size: XXX x XXX"), this); | ||
1254 | _resizeWidget->setMinimumWidth(_resizeWidget->fontMetrics().width(i18n("Size: XXX x XXX"))); | 1254 | _resizeWidget->setMinimumWidth(_resizeWidget->fontMetrics().boundingRect(i18n("Size: XXX x XXX")).width()); | ||
1255 | _resizeWidget->setMinimumHeight(_resizeWidget->sizeHint().height()); | 1255 | _resizeWidget->setMinimumHeight(_resizeWidget->sizeHint().height()); | ||
1256 | _resizeWidget->setAlignment(Qt::AlignCenter); | 1256 | _resizeWidget->setAlignment(Qt::AlignCenter); | ||
1257 | 1257 | | |||
1258 | _resizeWidget->setStyleSheet(QStringLiteral("background-color:palette(window);border-style:solid;border-width:1px;border-color:palette(dark)")); | 1258 | _resizeWidget->setStyleSheet(QStringLiteral("background-color:palette(window);border-style:solid;border-width:1px;border-color:palette(dark)")); | ||
1259 | 1259 | | |||
1260 | _resizeTimer = new QTimer(this); | 1260 | _resizeTimer = new QTimer(this); | ||
1261 | _resizeTimer->setInterval(SIZE_HINT_DURATION); | 1261 | _resizeTimer->setInterval(SIZE_HINT_DURATION); | ||
1262 | _resizeTimer->setSingleShot(true); | 1262 | _resizeTimer->setSingleShot(true); | ||
▲ Show 20 Lines • Show All 2695 Lines • Show Last 20 Lines |