#include "BulletsModule.h"
#include "qt_helpers.h"
+#include "debug.h"
#include "support/filetools.h"
#include <QPixmap>
// 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;
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) {
<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>