diff --git a/src/frontends/qt4/GuiDelimiter.cpp b/src/frontends/qt4/GuiDelimiter.cpp index 31903fc8b4..2ae6def688 100644 --- a/src/frontends/qt4/GuiDelimiter.cpp +++ b/src/frontends/qt4/GuiDelimiter.cpp @@ -181,6 +181,11 @@ GuiDelimiter::GuiDelimiter(GuiView & lv) initMathSymbols(); + FontInfo lyxfont; + lyxfont.setFamily(CMR_FAMILY); + QFontMetrics fm(frontend::getFont(lyxfont)); + QSize item_size(fm.maxWidth(), fm.height() + 8); + typedef map ListItems; ListItems list_items; // The last element is the empty one. @@ -191,11 +196,12 @@ GuiDelimiter::GuiDelimiter(GuiView & lv) QString symbol(ms.fontcode? QChar(ms.fontcode) : toqstr(docstring(1, ms.unicode))); QListWidgetItem * lwi = new QListWidgetItem(symbol); - FontInfo lyxfont; lyxfont.setFamily(ms.fontfamily); QFont font = frontend::getFont(lyxfont); lwi->setFont(font); lwi->setToolTip(toqstr(delim)); + lwi->setSizeHint(item_size); + lwi->setTextAlignment(Qt::AlignTop); list_items[ms.unicode] = lwi; leftLW->addItem(lwi); } diff --git a/src/frontends/qt4/ui/DelimiterUi.ui b/src/frontends/qt4/ui/DelimiterUi.ui index 0044d13bb1..21c6ad1299 100644 --- a/src/frontends/qt4/ui/DelimiterUi.ui +++ b/src/frontends/qt4/ui/DelimiterUi.ui @@ -84,7 +84,7 @@ QListView::Adjust - 0 + 2 -1 @@ -123,7 +123,7 @@ QListView::Adjust - 0 + 2