Files
Flora/qml/panels/EditorPanel.qml
T

62 lines
2.0 KiB
QML
Raw Normal View History

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
// Центральная панель: панель вкладок + редактор.
// Фаза 0 — каркас: вкладки, два столбца «открыть рядом» (задел),
// переключение режимов редактирование/просмотр (задел).
Item {
id: root
readonly property bool editMode: true // Фаза 4: реальный переключатель
ColumnLayout {
anchors.fill: parent
spacing: 0
// Панель вкладок
Rectangle {
Layout.fillWidth: true
implicitHeight: 32
color: "whitesmoke"
RowLayout {
anchors.fill: parent
anchors.leftMargin: 4
spacing: 4
Repeater {
model: 0 // открытые вкладки наполняются в Фазе 4
}
Label {
Layout.fillWidth: true
text: qsTr("— нет открытых файлов —")
color: "#bbb"
}
ToolButton {
text: "▮▮" // «открыть рядом» (Фаза 4)
ToolTip.visible: hovered
ToolTip.text: qsTr("Открыть рядом (две панели)")
enabled: false
}
}
}
// Область редактирования
Rectangle {
Layout.fillWidth: true
Layout.fillHeight: true
color: "white"
Label {
anchors.centerIn: parent
text: root.editMode
? qsTr("Редактор\nОткройте файл из дерева (Фаза 4)")
: qsTr("Просмотр\n(Фаза 4)")
horizontalAlignment: Text.AlignHCenter
color: "#bbb"
}
}
}
}