Skip to content

Commit dc2351d

Browse files
committed
Update menu layout in home and project window
1 parent fcc9c1f commit dc2351d

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/libs/application/uishell/src/qml/HomeWindow.qml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,12 @@ Window {
128128
}
129129
MenuBar {
130130
id: menuBar
131-
parent: window.isMacOS ? window.contentItem : titleBarArea
131+
parent: window.isMacOS ? window.contentItem : !windowAgent.framelessSetup ? menuBarArea : titleBarArea
132132
anchors.left: parent.left
133133
anchors.top: parent.top
134134
anchors.topMargin: activeFocus || menus.some(menu => menu.visible) || children.some(item => item.activeFocus) ? 0 : -height
135+
topPadding: windowAgent.framelessSetup ? 4 : 0
136+
bottomPadding: windowAgent.framelessSetup ? 4 : 0
135137
ThemedItem.backgroundLevel: SVS.BL_Quaternary
136138
Behavior on anchors.topMargin {
137139
id: topMarginBehavior
@@ -179,9 +181,21 @@ Window {
179181
}
180182
}
181183

184+
Item {
185+
id: menuBarArea
186+
visible: !window.isMacOS && !windowAgent.framelessSetup
187+
width: parent.width
188+
height: menuBar.y + menuBar.height
189+
Rectangle {
190+
anchors.fill: parent
191+
color: Theme.backgroundQuaternaryColor
192+
}
193+
}
194+
182195
RowLayout {
183196
spacing: 0
184197
anchors.fill: parent
198+
anchors.topMargin: menuBarArea.visible ? menuBarArea.height : 0
185199
Pane {
186200
id: nav
187201
padding: 6

src/libs/application/uishell/src/qml/ProjectWindow.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Window {
245245
Layout.fillWidth: true
246246
color: Theme.backgroundPrimaryColor
247247
visible: !window.isMacOS && (!windowAgent.framelessSetup || window.useSeparatedMenu) && menuBar.height !== 0
248-
implicitHeight: menuBar.visualVisible ? 24 : 0
248+
Layout.preferredHeight: menuBar.visualVisible ? 24 : 0
249249
// FIXME remove spacing when visual invisible
250250
}
251251
PaneSeparator {

0 commit comments

Comments
 (0)