mirror of
https://github.com/overte-org/overte.git
synced 2025-04-13 21:08:35 +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"?>
|
||||
<div style="width: 780px; margin: 0 auto;">
|
||||
<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">
|
||||
<title>Welcome to Interface</title>
|
||||
|
@ -135,3 +136,4 @@
|
|||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<div>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include <QtWebKitWidgets/QWebFrame>
|
||||
#include <QtWebKit/QWebElement>
|
||||
#include <QDesktopWidget>
|
||||
|
||||
#define VIEW_FIXED_WIDTH 808
|
||||
#define SETTINGS_KEY_VERSION "info-version"
|
||||
|
@ -52,8 +53,18 @@ void InfoView::loaded(bool ok)
|
|||
settings->setValue(SETTINGS_KEY_VERSION, version);
|
||||
}
|
||||
|
||||
this->setWindowModality(Qt::WindowModal);
|
||||
this->setFixedSize(VIEW_FIXED_WIDTH, this->height());
|
||||
QDesktopWidget* desktop = Application::getInstance()->desktop();
|
||||
|
||||
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->show();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue