Commit ea19fa6e authored by Alexander Lohnau's avatar Alexander Lohnau 💬 Committed by Nate Graham
Browse files

Fix close button for NewStuff.Dialog not existing on X11

We need this to be a proper window in order for it to have window
decorations like the close button.

BUG: 437653
FIXED-IN: 5.93
parent 82f04bff
Pipeline #147044 passed with stage
in 2 minutes and 59 seconds
......@@ -17,13 +17,14 @@
import QtQuick 2.11
import QtQuick.Window 2.15
import QtQuick.Controls 2.5 as QtControls
import QtQuick.Dialogs 1.3 as QtDialogs
import org.kde.kirigami 2.7 as Kirigami
import org.kde.newstuff 1.85 as NewStuff
QtDialogs.Dialog {
Window {
id: component
width: Math.min(Kirigami.Units.gridUnit * 44, Screen.width)
height: Math.min(Kirigami.Units.gridUnit * 30, Screen.height)
/**
* The configuration file to use for this button
......@@ -92,6 +93,10 @@ QtDialogs.Dialog {
newStuffPage.showEntryDetails(providerId, entryId);
}
function open() {
component.visible = true;
}
onVisibleChanged: {
if (visible === true) {
newStuffPage.engine.engine.revalidateCacheEntries();
......@@ -99,10 +104,10 @@ QtDialogs.Dialog {
}
}
contentItem: Rectangle {
Rectangle {
color: Kirigami.Theme.backgroundColor
implicitWidth: Math.min(Kirigami.Units.gridUnit * 44, Screen.width)
implicitHeight: Math.min(Kirigami.Units.gridUnit * 30, Screen.height)
width: component.width
height: component.height
Keys.onEscapePressed: component.close()
NewStuff.DialogContent {
id: newStuffPage
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment