Skip to content

Commit e1ceafa

Browse files
committed
Fix bugs in workspace
1 parent e205c4d commit e1ceafa

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Window {
2727
property ObjectModel rightToolButtonsModel: null
2828
property ObjectModel statusButtonsModel: null
2929
property ObjectModel bubbleNotificationsModel: null
30-
property double topDockingViewHeightRatio: 0.3
30+
property double topDockingViewHeightRatio: 0.5
3131
property bool useSeparatedMenu: false
3232

3333
readonly property bool isMacOS: Qt.platform.os === "osx" || Qt.platform.os === "macos"

src/plugins/coreplugin/internal/workspace/ProjectWindowWorkspaceManager.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,29 +70,27 @@ namespace Core::Internal {
7070
{{{"org.diffscope.visualeditor.panel.arrangement", true}
7171
},
7272
400,
73-
360,
73+
0.4,
7474
0
7575
}
7676
);
7777
layout.setViewSpec(
7878
ProjectWindowWorkspaceLayout::TopRight,
79-
{{}, 400, 360, -1
80-
}
79+
{{}, 400, 0.4, -1}
8180
);
8281
layout.setViewSpec(
8382
ProjectWindowWorkspaceLayout::BottomLeft,
8483
{{{"org.diffscope.visualeditor.panel.pianoRoll", true},
8584
{"org.diffscope.visualeditor.panel.mixer", true}
8685
},
8786
400,
88-
640,
87+
0.4,
8988
0
9089
}
9190
);
9291
layout.setViewSpec(
9392
ProjectWindowWorkspaceLayout::BottomRight,
94-
{{}, 400, 640, -1
95-
}
93+
{{}, 400, 0.4, -1}
9694
);
9795
layout.setViewSpec(
9896
ProjectWindowWorkspaceLayout::RightTop,

src/plugins/coreplugin/qml/windows/WorkspaceAddOnHelper.qml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ QtObject {
122122
window.topDockingView.splitterRatio = topData.splitterRatio
123123
window.bottomDockingView.contentData = bottomData.objects.map(conv)
124124
window.bottomDockingView.splitterRatio = bottomData.splitterRatio
125-
window.topDockingViewHeightRatio = (window.topDockingView.barSize + topData.preferredPanelSize) / (window.topDockingView.barSize + topData.preferredPanelSize + window.bottomDockingView.barSize + bottomData.preferredPanelSize)
125+
window.topDockingViewHeightRatio = topData.preferredPanelSize
126126
for (let i of topData.visibleIndices) {
127127
window.topDockingView.showPane(i)
128128
}
@@ -156,7 +156,7 @@ QtObject {
156156
return v
157157
}),
158158
width: isLeftOrRight ? dockingView.preferredPanelSize : dockingView.splitterRatio,
159-
height: isLeftOrRight ? dockingView.splitterRatio : dockingView.preferredPanelSize,
159+
height: isLeftOrRight ? dockingView.splitterRatio : window.topDockingViewHeightRatio,
160160
visibleIndex: dockingView.firstIndex,
161161
}
162162
console.debug(lcWorkspaceAddOnHelper, "Saved docking view", firstKey, viewSpecMap[firstKey].width, viewSpecMap[firstKey].height, viewSpecMap[firstKey].visibleIndex)
@@ -175,7 +175,7 @@ QtObject {
175175
return v
176176
}),
177177
width: isLeftOrRight ? dockingView.panelSize : 1 - dockingView.splitterRatio,
178-
height: isLeftOrRight ? 1 - dockingView.splitterRatio : dockingView.panelSize,
178+
height: isLeftOrRight ? 1 - dockingView.splitterRatio : window.topDockingViewHeightRatio,
179179
visibleIndex: dockingView.lastIndex - (dockingView.stretchIndex + 1),
180180
}
181181
console.debug(lcWorkspaceAddOnHelper, "Saved docking view", lastKey, viewSpecMap[lastKey].width, viewSpecMap[lastKey].height, viewSpecMap[lastKey].visibleIndex)

0 commit comments

Comments
 (0)