Implement multi-window detached tab host flow

This commit is contained in:
2026-04-14 16:19:23 +08:00
parent 4b58df9a61
commit 307259091e
12 changed files with 1210 additions and 96 deletions

View File

@@ -32,7 +32,7 @@ using Widgets::UIEditorTreeViewInvalidIndex;
constexpr std::string_view kHierarchyPanelId = "hierarchy";
constexpr float kDragThreshold = 4.0f;
constexpr UIColor kDragPreviewColor(0.82f, 0.82f, 0.82f, 0.55f);
constexpr UIColor kDragPreviewColor(0.92f, 0.92f, 0.92f, 0.42f);
bool ContainsPoint(const UIRect& rect, const UIPoint& point) {
return point.x >= rect.x &&
@@ -143,6 +143,13 @@ void ProductHierarchyPanel::SetBuiltInIcons(const ProductBuiltInIcons* icons) {
RebuildItems();
}
void ProductHierarchyPanel::ResetInteractionState() {
m_treeInteractionState = {};
m_treeFrame = {};
m_dragState = {};
ResetTransientState();
}
const UIEditorPanelContentHostPanelState* ProductHierarchyPanel::FindMountedHierarchyPanel(
const UIEditorPanelContentHostFrame& contentHostFrame) const {
for (const UIEditorPanelContentHostPanelState& panelState : contentHostFrame.panelStates) {