]> git.lyx.org Git - features.git/commitdiff
* src/frontends/qt4/BulletModule.C:
authorJürgen Spitzmüller <spitz@lyx.org>
Tue, 27 Mar 2007 06:55:25 +0000 (06:55 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Tue, 27 Mar 2007 06:55:25 +0000 (06:55 +0000)
* 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

src/frontends/qt4/BulletsModule.C
src/frontends/qt4/ui/BulletsUi.ui

index 80f2fb31ca3bb46ab61cf7976858a81d333be4dc..676a5aa0bad1dc83411b1446b5a2c839f7395265 100644 (file)
@@ -13,6 +13,7 @@
 #include "BulletsModule.h"
 #include "qt_helpers.h"
 
+#include "debug.h"
 #include "support/filetools.h"
 
 #include <QPixmap>
@@ -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) {
index 8040986f4d50f3947840c3f73037678ce5c97e24..3aec8209319d2d51e6fda427fb8ee1ca8a3d7ac5 100644 (file)
@@ -1,7 +1,4 @@
 <ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
  <class>BulletsUi</class>
  <widget class="QWidget" name="BulletsUi" >
   <property name="geometry" >
     </widget>
    </item>
    <item row="2" column="1" colspan="3" >
-    <widget class="QStackedWidget" name="bulletpaneSW" />
+    <widget class="QStackedWidget" name="bulletpaneSW" >
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>0</hsizetype>
+       <vsizetype>0</vsizetype>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+    </widget>
    </item>
   </layout>
  </widget>
- <pixmapfunction></pixmapfunction>
  <includes>
   <include location="local" >qt_helpers.h</include>
  </includes>