mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
parent
130e1b43fb
commit
01fd5e6b61
3 changed files with 14 additions and 3 deletions
|
@ -74,7 +74,10 @@ Page {
|
||||||
property var room: null
|
property var room: null
|
||||||
property var roomPreview: null
|
property var roomPreview: null
|
||||||
|
|
||||||
Component.onCompleted: MainWindow.addPerRoomWindow(room.roomId || roomPreview.roomid, roomWindowW)
|
Component.onCompleted: {
|
||||||
|
MainWindow.addPerRoomWindow(room.roomId || roomPreview.roomid, roomWindowW);
|
||||||
|
Nheko.setTransientParent(roomWindowW, null);
|
||||||
|
}
|
||||||
Component.onDestruction: MainWindow.removePerRoomWindow(room.roomId || roomPreview.roomid, roomWindowW)
|
Component.onDestruction: MainWindow.removePerRoomWindow(room.roomId || roomPreview.roomid, roomWindowW)
|
||||||
|
|
||||||
height: 650
|
height: 650
|
||||||
|
@ -84,8 +87,7 @@ Page {
|
||||||
palette: Nheko.colors
|
palette: Nheko.colors
|
||||||
color: Nheko.colors.window
|
color: Nheko.colors.window
|
||||||
title: room.plainRoomName
|
title: room.plainRoomName
|
||||||
modality: Qt.NonModal
|
//flags: Qt.Window | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||||
flags: Qt.Window | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: StandardKey.Cancel
|
sequence: StandardKey.Cancel
|
||||||
|
|
|
@ -128,6 +128,13 @@ Nheko::logout() const
|
||||||
ChatPage::instance()->initiateLogout();
|
ChatPage::instance()->initiateLogout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Nheko::setTransientParent(QWindow *window, QWindow *parentWindow) const
|
||||||
|
{
|
||||||
|
if (window)
|
||||||
|
window->setTransientParent(parentWindow);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Nheko::createRoom(QString name, QString topic, QString aliasLocalpart, bool isEncrypted, int preset)
|
Nheko::createRoom(QString name, QString topic, QString aliasLocalpart, bool isEncrypted, int preset)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <QFontDatabase>
|
#include <QFontDatabase>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QPalette>
|
#include <QPalette>
|
||||||
|
#include <QWindow>
|
||||||
|
|
||||||
#include "AliasEditModel.h"
|
#include "AliasEditModel.h"
|
||||||
#include "PowerlevelsEditModels.h"
|
#include "PowerlevelsEditModels.h"
|
||||||
|
@ -65,6 +66,7 @@ public:
|
||||||
{
|
{
|
||||||
return new AliasEditingModel(room_id_.toStdString());
|
return new AliasEditingModel(room_id_.toStdString());
|
||||||
}
|
}
|
||||||
|
Q_INVOKABLE void setTransientParent(QWindow *window, QWindow *parentWindow) const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateUserProfile();
|
void updateUserProfile();
|
||||||
|
|
Loading…
Reference in a new issue