QtView::QtView(unsigned int width, unsigned int height)
: QMainWindow(), LyXView(), commandbuffer_(0)
{
+ resize(width, height);
+
qApp->setMainWidget(this);
bufferview_.reset(new BufferView(this, width, height));
{
Session & session = LyX::ref().session();
session.saveSessionInfo("WindowIsMaximized", (isMaximized() ? "yes" : "no"));
- // don't save maximized values
- showNormal();
// save windows size and position
session.saveSessionInfo("WindowWidth", convert<string>(width()));
session.saveSessionInfo("WindowHeight", convert<string>(height()));
void start(string const & batch, vector<string> const & files,
- unsigned int width, unsigned int height, int posx, int posy, bool maximize)
+ unsigned int width, unsigned int height, int posx, int posy, bool)
{
// this can't be done before because it needs the Languages object
initEncodings();
QtView & view = *view_ptr.get();
- view.init();
-
- if (posx != -1 && posy != -1) {
- view.setGeometry(posx, posy, width, height);
- if (maximize)
- view.setWindowState(Qt::WindowMaximized);
- }
+ if (posx != -1 && posy != -1)
+ view.move(QPoint(posx, posy));
view.show();
+ view.init();
// FIXME: some code below needs moving