63 lines
1.5 KiB
QML
63 lines
1.5 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Window
|
|
import FigmaQmlInterface
|
|
import QtQuckApp
|
|
|
|
ApplicationWindow {
|
|
id: rootWindow
|
|
width: 600
|
|
height: 450
|
|
visible: true
|
|
minimumWidth: width // Фиксированная ширина
|
|
maximumWidth: width
|
|
minimumHeight: height
|
|
maximumHeight: height
|
|
flags: Qt.Window | Qt.FramelessWindowHint
|
|
color: "transparent" // Прозрачный фон (если нужно)
|
|
title: "Кварц" // Пустой заголовок
|
|
|
|
// Чёрная рамка 1px по краям
|
|
Rectangle {
|
|
anchors.fill: parent
|
|
anchors.margins: -1 // Выступает за границы родителя
|
|
color: "transparent"
|
|
border.color: "#000000"
|
|
border.width: 1
|
|
}
|
|
|
|
// Верхняя панель управления
|
|
Rectangle {
|
|
id: titleBar
|
|
width: parent.width
|
|
height: 30
|
|
|
|
// Текст заголовка
|
|
Text {
|
|
anchors.centerIn: parent
|
|
text: "Custom Window"
|
|
color: "white"
|
|
font.pixelSize: 12
|
|
}
|
|
|
|
// Контекстное меню
|
|
Menu {
|
|
id: contextMenu
|
|
|
|
MenuItem {
|
|
text: "Скрыть"
|
|
onTriggered: rootWindow.visibility = Window.Minimized
|
|
}
|
|
|
|
MenuItem {
|
|
text: "Закрыть"
|
|
onTriggered: Qt.quit()
|
|
}
|
|
}
|
|
}
|
|
|
|
FigmaQmlUi {
|
|
anchors.fill: parent
|
|
}
|
|
}
|