Warning, /plasma/discover/discover/qml/CarouselFullScreenMaximizedView.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *   SPDX-FileCopyrightText: 2023 ivan tkachenko <me@ratijas.tk>
0003  *
0004  *   SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 import QtQuick
0008 import QtQuick.Controls as QQC2
0009 import org.kde.kirigami as Kirigami
0010 import org.kde.discover
0011 
0012 CarouselAbstractMaximizedView {
0013     id: root
0014 
0015     mode: CarouselMaximizedViewController.Mode.FullScreen
0016 
0017     function close(animated: bool) {
0018         window.visible = false;
0019         destroy();
0020     }
0021 
0022     readonly property Window window: Window {
0023         id: window
0024 
0025         visible: true
0026         visibility: Window.FullScreen
0027         flags: Qt.FramelessWindowHint
0028         transientParent: root.transientParent
0029 
0030         color: root.backgroundColor
0031 
0032         LayoutMirroring.enabled: transientParent.LayoutMirroring.enabled
0033         LayoutMirroring.childrenInherit: true
0034 
0035         CarouselMaximizedViewContent {
0036             anchors.fill: parent
0037             focus: true
0038             host: root
0039         }
0040 
0041         Connections {
0042             target: window.contentItem.Keys
0043             function onEscapePressed(event) {
0044                 root.close();
0045             }
0046         }
0047 
0048         onVisibleChanged: {
0049             if (!visible) {
0050                 root.close();
0051             }
0052         }
0053     }
0054 }