From: Jürgen Spitzmüller Date: Tue, 27 Mar 2007 06:55:25 +0000 (+0000) Subject: * src/frontends/qt4/BulletModule.C: X-Git-Tag: 1.6.10~10472 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c0a40bac9883162bb2b1158cada6d81292dafe81;p=lyx.git * src/frontends/qt4/BulletModule.C: * src/frontends/qt4/ui/BulletsUi.ui: - assure that six columns of bullets are displayed in the widget (fix bug 3147). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17584 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/BulletsModule.C b/src/frontends/qt4/BulletsModule.C index 80f2fb31ca..676a5aa0ba 100644 --- a/src/frontends/qt4/BulletsModule.C +++ b/src/frontends/qt4/BulletsModule.C @@ -13,6 +13,7 @@ #include "BulletsModule.h" #include "qt_helpers.h" +#include "debug.h" #include "support/filetools.h" #include @@ -70,6 +71,7 @@ void BulletsModule::setupPanel(QListWidget * lw, QString panelname, std::string // get pixmap with bullets QPixmap pixmap = QPixmap(toqstr(libFileSearch("images", fname, "xpm").absFilename())); + int const w = pixmap.width() / 6; int const h = pixmap.height() / 6; @@ -80,9 +82,10 @@ void BulletsModule::setupPanel(QListWidget * lw, QString panelname, std::string lw->setFlow(QListView::LeftToRight); lw->setMovement(QListView::Static); lw->setUniformItemSizes(true); - lw->setGridSize( QSize(w , h) ); - lw->resize( 6 * w + 6 , 6 * h); - bulletpaneSW->setMinimumSize( 6 * w + 6 , 6 * h); + lw->setGridSize(QSize(w, h)); + // the widening by 21 is needed to avoid wrapping + lw->resize(6 * w + 21, 6 * h); + bulletpaneSW->setMinimumSize(6 * w, 6 * h + 6); // get individual bullets from pixmap for (int row = 0; row < 6; ++row) { diff --git a/src/frontends/qt4/ui/BulletsUi.ui b/src/frontends/qt4/ui/BulletsUi.ui index 8040986f4d..3aec820931 100644 --- a/src/frontends/qt4/ui/BulletsUi.ui +++ b/src/frontends/qt4/ui/BulletsUi.ui @@ -1,7 +1,4 @@ - - - BulletsUi @@ -182,11 +179,19 @@ - + + + + 0 + 0 + 0 + 0 + + + - qt_helpers.h