mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:37:17 +02:00
popup layot
- center position - resizable
This commit is contained in:
parent
29c62d366f
commit
a081f081f8
2 changed files with 15 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<div style="width: 780px; margin: 0 auto;">
|
||||||
<input type="hidden" id="version" value="1" />
|
<input type="hidden" id="version" value="1" />
|
||||||
<svg width="780px" height="754px" viewBox="0 0 780 754" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
<svg width="780px" height="754px" viewBox="0 0 780 754" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
||||||
<title>Welcome to Interface</title>
|
<title>Welcome to Interface</title>
|
||||||
|
@ -135,3 +136,4 @@
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
<div>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
#include <QtWebKitWidgets/QWebFrame>
|
#include <QtWebKitWidgets/QWebFrame>
|
||||||
#include <QtWebKit/QWebElement>
|
#include <QtWebKit/QWebElement>
|
||||||
|
#include <QDesktopWidget>
|
||||||
|
|
||||||
#define VIEW_FIXED_WIDTH 808
|
#define VIEW_FIXED_WIDTH 808
|
||||||
#define SETTINGS_KEY_VERSION "info-version"
|
#define SETTINGS_KEY_VERSION "info-version"
|
||||||
|
@ -52,8 +53,18 @@ void InfoView::loaded(bool ok)
|
||||||
settings->setValue(SETTINGS_KEY_VERSION, version);
|
settings->setValue(SETTINGS_KEY_VERSION, version);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->setWindowModality(Qt::WindowModal);
|
QDesktopWidget* desktop = Application::getInstance()->desktop();
|
||||||
this->setFixedSize(VIEW_FIXED_WIDTH, this->height());
|
|
||||||
|
int h = desktop->height();
|
||||||
|
this->resize(VIEW_FIXED_WIDTH, h * 0.8);
|
||||||
|
|
||||||
|
int w = desktop->width();
|
||||||
|
int mw = this->size().width();
|
||||||
|
int mh = this->size().height();
|
||||||
|
int cw = (w/2) - (mw/2);
|
||||||
|
int ch = (h/2) - (mh/2);
|
||||||
|
this->move(cw, ch);
|
||||||
|
|
||||||
this->setWindowTitle(this->title());
|
this->setWindowTitle(this->title());
|
||||||
this->show();
|
this->show();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue