mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
* 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
This commit is contained in:
parent
1c02a697f4
commit
c0a40bac98
@ -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) {
|
||||
|
@ -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" >
|
||||
@ -182,11 +179,19 @@
|
||||
</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>
|
||||
|
Loading…
Reference in New Issue
Block a user