forked from blue/squawk
fix: About window now is a dialog
This commit is contained in:
parent
645b92ba51
commit
ea7dcc5f18
@ -637,14 +637,13 @@ void Squawk::onContextAboutToHide()
|
||||
void Squawk::onAboutSquawkCalled()
|
||||
{
|
||||
if (about == nullptr) {
|
||||
about = new About();
|
||||
about = new About(this);
|
||||
about->setAttribute(Qt::WA_DeleteOnClose);
|
||||
connect(about, &Settings::destroyed, this, &Squawk::onAboutSquawkClosed);
|
||||
} else {
|
||||
about->raise();
|
||||
about->activateWindow();
|
||||
}
|
||||
about->show();
|
||||
about->raise();
|
||||
about->activateWindow();
|
||||
}
|
||||
|
||||
Models::Roster::ElId Squawk::currentConversationId() const
|
||||
|
@ -25,7 +25,7 @@ static const std::string QXMPP_VERSION_MAJOR(std::to_string(QXMPP_VERSION >> 16)
|
||||
static const QString QXMPP_VERSION_STRING = QString::fromStdString(QXMPP_VERSION_MAJOR + "." + QXMPP_VERSION_MINOR + "." + QXMPP_VERSION_PATCH);
|
||||
|
||||
About::About(QWidget* parent):
|
||||
QWidget(parent),
|
||||
QDialog(parent),
|
||||
m_ui(new Ui::About),
|
||||
license(nullptr)
|
||||
{
|
||||
@ -37,7 +37,11 @@ About::About(QWidget* parent):
|
||||
m_ui->qxmppVersionValue->setText(QXmppVersion());
|
||||
m_ui->qxmppBuiltAgainstVersion->setText(tr("(built against %1)").arg(QXMPP_VERSION_STRING));
|
||||
|
||||
setWindowFlag(Qt::Tool);
|
||||
setWindowFlag(Qt::WindowStaysOnTopHint);
|
||||
move(
|
||||
parent->window()->frameGeometry().topLeft() +
|
||||
parent->window()->rect().center() - rect().center()
|
||||
);
|
||||
|
||||
connect(m_ui->licenceLink, &QLabel::linkActivated, this, &About::onLicenseActivated);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
#ifndef ABOUT_H
|
||||
#define ABOUT_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QDialog>
|
||||
#include <QScopedPointer>
|
||||
#include <QApplication>
|
||||
#include <QFile>
|
||||
@ -32,7 +32,7 @@ class About;
|
||||
/**
|
||||
* @todo write docs
|
||||
*/
|
||||
class About : public QWidget
|
||||
class About : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user