From 7b423a4eb33b40630b22558b2751c40dc90a7519 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 26 Jun 2016 16:58:18 +0200 Subject: [PATCH] Make command buffer icons same size as QLineEdit height Part of bug #10125 (cherry picked from commit 458d2015dc311844a9533ac838a2f81b0a83069f) --- src/frontends/qt4/GuiCommandBuffer.cpp | 18 ++++++++++++------ status.22x | 2 ++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/frontends/qt4/GuiCommandBuffer.cpp b/src/frontends/qt4/GuiCommandBuffer.cpp index 9880e2b996..2085c1cc3c 100644 --- a/src/frontends/qt4/GuiCommandBuffer.cpp +++ b/src/frontends/qt4/GuiCommandBuffer.cpp @@ -94,20 +94,26 @@ GuiCommandBuffer::GuiCommandBuffer(GuiView * view) QVBoxLayout * top = new QVBoxLayout(this); QHBoxLayout * layout = new QHBoxLayout(0); + edit_ = new GuiCommandEdit(this); + edit_->setMinimumSize(edit_->sizeHint()); + edit_->setFocusPolicy(Qt::ClickFocus); + + int height = max(24, 2 * (edit_->sizeHint().height() / 2)); + QSize button_size = QSize(height, height); + QSize icon_size = button_size - QSize(4, 4); + upPB = new QPushButton(qpup, "", this); upPB->setToolTip(qt_("List of previous commands")); - upPB->setMaximumSize(24, 24); + upPB->setMaximumSize(button_size); + upPB->setIconSize(icon_size); downPB = new QPushButton(qpdown, "", this); downPB->setToolTip(qt_("Next command")); - downPB->setMaximumSize(24, 24); + downPB->setMaximumSize(button_size); + downPB->setIconSize(icon_size); downPB->setEnabled(false); connect(downPB, SIGNAL(clicked()), this, SLOT(down())); connect(upPB, SIGNAL(pressed()), this, SLOT(listHistoryUp())); - edit_ = new GuiCommandEdit(this); - edit_->setMinimumSize(edit_->sizeHint()); - edit_->setFocusPolicy(Qt::ClickFocus); - connect(edit_, SIGNAL(returnPressed()), this, SLOT(dispatch())); connect(edit_, SIGNAL(tabPressed()), this, SLOT(complete())); connect(edit_, SIGNAL(upPressed()), this, SLOT(up())); diff --git a/status.22x b/status.22x index 788f460e2f..b7141e092e 100644 --- a/status.22x +++ b/status.22x @@ -77,6 +77,8 @@ What's new - Ask where to export file if not yet saved (bug 8814). +- Fix size issue with outliner icons on HiDPI monitors (bug 10125). + * LYX2LYX -- 2.39.5