mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
restore (14087) save/load geometry logic of qt3
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14140 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
dde45f75da
commit
1ec4d26038
@ -58,6 +58,8 @@ int const statusbar_timer_value = 3000;
|
||||
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));
|
||||
@ -160,8 +162,6 @@ void QtView::closeEvent(QCloseEvent *)
|
||||
{
|
||||
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()));
|
||||
|
@ -222,7 +222,7 @@ void parse_lyxrc()
|
||||
|
||||
|
||||
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();
|
||||
@ -232,15 +232,11 @@ void start(string const & batch, vector<string> const & files,
|
||||
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user