ukui-menu/qml/AppUI/FullScreenUI.qml

71 lines
2.0 KiB
QML

import QtQuick 2.0
import QtQuick.Layouts 1.12
import AppControls2 1.0 as AppControls2
import org.ukui.menu.core 1.0
AppControls2.StyleBackground {
paletteRole: Palette.Dark
MouseArea {
anchors.fill: parent
onClicked: {
if (fullScreenContent.visible) {
//执行全屏退出操作
forceActiveFocus();
mainWindow.hide();
} else {
folderLoader.item.isFolderOpened = false;
fullScreenContent.visible = true;
fullScreenContent.isContentShow = true;
}
}
}
ColumnLayout {
anchors.fill: parent
anchors.leftMargin: 35
anchors.rightMargin: 35
FullScreenHeader {
id: fullScreenHeader
Layout.preferredHeight: 130
Layout.fillWidth: true
Layout.maximumHeight: 130
searchOpacity: fullScreenContent.isContentShow ? 1 : 0
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
FullScreenContent {
id: fullScreenContent
anchors.fill: parent
}
Loader {
id: folderLoader
active: false
anchors.fill: parent
sourceComponent: FullScreenFolder {}
function openFolder(id, name, x, y) {
active = true;
item.model.setFolderId(id);
item.folderName = name;
item.folderX = x;
item.folderY = y;
item.isFolderOpened = true;
}
Component.onCompleted: fullScreenContent.openFolderSignal.connect(openFolder)
Component.onDestruction: fullScreenContent.openFolderSignal.disconnect(openFolder)
}
}
FullScreenFooter {
Layout.preferredHeight: 90
Layout.fillWidth: true
}
}
}