mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Properly set minimum width with QToolButton
This commit is contained in:
parent
ac1b3f0ba2
commit
663f198001
@ -677,11 +677,10 @@ GuiView::GuiView(int id)
|
|||||||
zoom_value_->setAutoRaise(true);
|
zoom_value_->setAutoRaise(true);
|
||||||
zoom_value_->setPopupMode(QToolButton::InstantPopup);
|
zoom_value_->setPopupMode(QToolButton::InstantPopup);
|
||||||
zoom_value_->setFixedHeight(fm.height());
|
zoom_value_->setFixedHeight(fm.height());
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
|
// Get sensible minimum width to heep the size constant
|
||||||
zoom_value_->setMinimumWidth(fm.horizontalAdvance("000%"));
|
zoom_value_->setText(toqstr("000%"));
|
||||||
#else
|
int const mw = zoom_value_->width();
|
||||||
zoom_value_->setMinimumWidth(fm.width("000%"));
|
zoom_value_->setMinimumWidth(mw);
|
||||||
#endif
|
|
||||||
statusBar()->addPermanentWidget(zoom_value_);
|
statusBar()->addPermanentWidget(zoom_value_);
|
||||||
zoom_value_->setEnabled(currentBufferView());
|
zoom_value_->setEnabled(currentBufferView());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user