fix mathed scrollbars

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5276 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2002-09-12 00:25:59 +00:00
parent 5f5672e088
commit bb2b4dd0b9
3 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2002-09-12 John Levon <levon@movementarian.org>
* QMathDialog.C: get the scrollbars right on first show
2002-09-11 John Levon <levon@movementarian.org>
* QPrint.h:

View File

@ -17,6 +17,7 @@
#include "ControlMath.h"
#include "iconpalette.h"
#include <qapplication.h>
#include <qwidgetstack.h>
#include <qcombobox.h>
#include <qlistbox.h>
@ -35,7 +36,6 @@ public:
setResizePolicy(Manual);
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOn);
setMinimumHeight(200);
setBackgroundMode(PaletteBackground);
viewport()->setBackgroundMode(PaletteBackground);
}
@ -53,8 +53,9 @@ protected:
return;
w_->resize(viewport()->width(), w_->height());
// force the resize to get accurate scrollbars
qApp->processEvents();
resizeContents(w_->width(), w_->height());
setMinimumHeight(200);
}
private:
@ -98,6 +99,7 @@ IconPalette * QMathDialog::makePanel(QWidget * parent, char const ** entries)
p->add(QPixmap(xpm_name.c_str()), entries[i], string("\\") + entries[i]);
}
connect(p, SIGNAL(button_clicked(string)), this, SLOT(symbol_clicked(string)));
return p;
}
@ -107,6 +109,7 @@ void QMathDialog::addPanel(char const ** entries)
static int id = 0;
QScrollViewSingle * view = new QScrollViewSingle(symbolsWS);
IconPalette * p = makePanel(view->viewport(), entries);
view->setChild(p);
symbolsWS->addWidget(view, id++);

View File

@ -13,7 +13,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>339</width>
<width>331</width>
<height>356</height>
</rect>
</property>
@ -476,7 +476,7 @@
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>3</vsizetype>
<vsizetype>7</vsizetype>
</sizepolicy>
</property>
<property stdset="1">