Skip to content

Commit 9abb1f8

Browse files
committed
Add menu bar to the main window
1 parent 5f2f0ad commit 9abb1f8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/app/main.qml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
import QtQuick
44
import QtQuick.Controls.Material
55
import QtQuick.Layouts
6+
import ScratchCPP
67
import ScratchCPP.UiComponents
78
import ScratchCPP.Render
89

9-
Window {
10+
ApplicationWindow {
11+
id: root
1012
minimumWidth: layout.implicitWidth + layout.anchors.margins * 2
1113
minimumHeight: layout.implicitHeight + layout.anchors.margins * 2
1214
visible: true
@@ -15,6 +17,11 @@ Window {
1517
Material.accent: "orange"
1618
Material.theme: Material.Dark
1719

20+
menuBar: CustomMenuBar {
21+
width: root.width
22+
model: AppMenuBar.model
23+
}
24+
1825
ColumnLayout {
1926
id: layout
2027
anchors.fill: parent

0 commit comments

Comments
 (0)