Tighten new editor shell chrome and add dock convergence plan
This commit is contained in:
@@ -442,12 +442,7 @@ UIEditorShellInteractionDefinition BuildBaseShellDefinition() {
|
||||
BuildToolbarButton("run.pause", UIEditorShellToolbarGlyph::Pause),
|
||||
BuildToolbarButton("run.step", UIEditorShellToolbarGlyph::Step)
|
||||
};
|
||||
definition.statusSegments = {
|
||||
BuildStatusSegment("editor-mode", "Edit", UIEditorStatusBarSlot::Leading, UIEditorStatusBarTextTone::Primary, 84.0f, true),
|
||||
BuildStatusSegment("editor-status", "Shell ready", UIEditorStatusBarSlot::Leading, UIEditorStatusBarTextTone::Muted, 192.0f, false),
|
||||
BuildStatusSegment("capture", "F12 -> Screenshot", UIEditorStatusBarSlot::Trailing, UIEditorStatusBarTextTone::Muted, 168.0f, false),
|
||||
BuildStatusSegment("active-panel", "Scene", UIEditorStatusBarSlot::Trailing, UIEditorStatusBarTextTone::Primary, 136.0f, true)
|
||||
};
|
||||
definition.statusSegments = {};
|
||||
definition.workspacePresentations = {
|
||||
BuildPlaceholderPresentation("hierarchy"),
|
||||
BuildViewportPresentation("scene", "Scene", "Perspective", "Viewport shell ready"),
|
||||
|
||||
@@ -31,56 +31,56 @@ struct UIEditorTabStripState {
|
||||
|
||||
struct UIEditorTabStripMetrics {
|
||||
::XCEngine::UI::Layout::UITabStripMetrics layoutMetrics =
|
||||
::XCEngine::UI::Layout::UITabStripMetrics{ 32.0f, 88.0f, 12.0f, 1.0f };
|
||||
float estimatedGlyphWidth = 7.0f;
|
||||
float closeButtonExtent = 14.0f;
|
||||
float closeButtonGap = 8.0f;
|
||||
float closeInsetRight = 12.0f;
|
||||
::XCEngine::UI::Layout::UITabStripMetrics{ 22.0f, 68.0f, 8.0f, 1.0f };
|
||||
float estimatedGlyphWidth = 6.0f;
|
||||
float closeButtonExtent = 10.0f;
|
||||
float closeButtonGap = 4.0f;
|
||||
float closeInsetRight = 6.0f;
|
||||
float closeInsetY = 0.0f;
|
||||
float labelInsetX = 12.0f;
|
||||
float labelInsetY = -1.0f;
|
||||
float labelInsetX = 8.0f;
|
||||
float labelInsetY = -2.5f;
|
||||
float baseBorderThickness = 1.0f;
|
||||
float selectedBorderThickness = 1.5f;
|
||||
float focusedBorderThickness = 2.0f;
|
||||
float selectedBorderThickness = 1.0f;
|
||||
float focusedBorderThickness = 1.0f;
|
||||
};
|
||||
|
||||
struct UIEditorTabStripPalette {
|
||||
::XCEngine::UI::UIColor stripBackgroundColor =
|
||||
::XCEngine::UI::UIColor(0.15f, 0.15f, 0.16f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.16f, 0.16f, 0.16f, 1.0f);
|
||||
::XCEngine::UI::UIColor headerBackgroundColor =
|
||||
::XCEngine::UI::UIColor(0.18f, 0.18f, 0.19f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.18f, 0.18f, 0.18f, 1.0f);
|
||||
::XCEngine::UI::UIColor contentBackgroundColor =
|
||||
::XCEngine::UI::UIColor(0.15f, 0.15f, 0.16f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.17f, 0.17f, 0.17f, 1.0f);
|
||||
::XCEngine::UI::UIColor stripBorderColor =
|
||||
::XCEngine::UI::UIColor(0.30f, 0.32f, 0.34f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.24f, 0.24f, 0.24f, 1.0f);
|
||||
::XCEngine::UI::UIColor focusedBorderColor =
|
||||
::XCEngine::UI::UIColor(0.78f, 0.80f, 0.84f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.36f, 0.36f, 0.36f, 1.0f);
|
||||
::XCEngine::UI::UIColor tabColor =
|
||||
::XCEngine::UI::UIColor(0.21f, 0.22f, 0.24f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.20f, 0.20f, 0.20f, 1.0f);
|
||||
::XCEngine::UI::UIColor tabHoveredColor =
|
||||
::XCEngine::UI::UIColor(0.27f, 0.28f, 0.30f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.23f, 0.23f, 0.23f, 1.0f);
|
||||
::XCEngine::UI::UIColor tabSelectedColor =
|
||||
::XCEngine::UI::UIColor(0.33f, 0.35f, 0.38f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.22f, 0.22f, 0.22f, 1.0f);
|
||||
::XCEngine::UI::UIColor tabBorderColor =
|
||||
::XCEngine::UI::UIColor(0.32f, 0.34f, 0.36f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.24f, 0.24f, 0.24f, 1.0f);
|
||||
::XCEngine::UI::UIColor tabHoveredBorderColor =
|
||||
::XCEngine::UI::UIColor(0.42f, 0.44f, 0.47f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.31f, 0.31f, 0.31f, 1.0f);
|
||||
::XCEngine::UI::UIColor tabSelectedBorderColor =
|
||||
::XCEngine::UI::UIColor(0.50f, 0.52f, 0.56f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.34f, 0.34f, 0.34f, 1.0f);
|
||||
::XCEngine::UI::UIColor textPrimary =
|
||||
::XCEngine::UI::UIColor(0.93f, 0.94f, 0.96f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.86f, 0.86f, 0.86f, 1.0f);
|
||||
::XCEngine::UI::UIColor textSecondary =
|
||||
::XCEngine::UI::UIColor(0.70f, 0.72f, 0.74f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.67f, 0.67f, 0.67f, 1.0f);
|
||||
::XCEngine::UI::UIColor textMuted =
|
||||
::XCEngine::UI::UIColor(0.58f, 0.59f, 0.62f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.58f, 0.58f, 0.58f, 1.0f);
|
||||
::XCEngine::UI::UIColor closeButtonColor =
|
||||
::XCEngine::UI::UIColor(0.21f, 0.22f, 0.24f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.20f, 0.20f, 0.20f, 1.0f);
|
||||
::XCEngine::UI::UIColor closeButtonHoveredColor =
|
||||
::XCEngine::UI::UIColor(0.27f, 0.28f, 0.30f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.25f, 0.25f, 0.25f, 1.0f);
|
||||
::XCEngine::UI::UIColor closeButtonBorderColor =
|
||||
::XCEngine::UI::UIColor(0.42f, 0.44f, 0.47f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.30f, 0.30f, 0.30f, 1.0f);
|
||||
::XCEngine::UI::UIColor closeGlyphColor =
|
||||
::XCEngine::UI::UIColor(0.93f, 0.94f, 0.96f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.83f, 0.83f, 0.83f, 1.0f);
|
||||
};
|
||||
|
||||
struct UIEditorTabStripLayout {
|
||||
|
||||
@@ -49,14 +49,14 @@ struct UIEditorDockHostState {
|
||||
|
||||
struct UIEditorDockHostMetrics {
|
||||
::XCEngine::UI::Layout::UISplitterMetrics splitterMetrics =
|
||||
::XCEngine::UI::Layout::UISplitterMetrics{ 10.0f, 18.0f };
|
||||
::XCEngine::UI::Layout::UISplitterMetrics{ 4.0f, 12.0f };
|
||||
UIEditorTabStripMetrics tabStripMetrics = {};
|
||||
UIEditorPanelFrameMetrics panelFrameMetrics = {};
|
||||
::XCEngine::UI::UISize minimumStandalonePanelBodySize =
|
||||
::XCEngine::UI::UISize(180.0f, 140.0f);
|
||||
::XCEngine::UI::UISize minimumTabContentBodySize =
|
||||
::XCEngine::UI::UISize(260.0f, 180.0f);
|
||||
float splitterHandleRounding = 4.0f;
|
||||
float splitterHandleRounding = 0.0f;
|
||||
float placeholderLineGap = 22.0f;
|
||||
};
|
||||
|
||||
@@ -64,11 +64,11 @@ struct UIEditorDockHostPalette {
|
||||
UIEditorTabStripPalette tabStripPalette = {};
|
||||
UIEditorPanelFramePalette panelFramePalette = {};
|
||||
::XCEngine::UI::UIColor splitterColor =
|
||||
::XCEngine::UI::UIColor(0.22f, 0.23f, 0.25f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.22f, 0.22f, 0.22f, 1.0f);
|
||||
::XCEngine::UI::UIColor splitterHoveredColor =
|
||||
::XCEngine::UI::UIColor(0.32f, 0.34f, 0.36f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.29f, 0.29f, 0.29f, 1.0f);
|
||||
::XCEngine::UI::UIColor splitterActiveColor =
|
||||
::XCEngine::UI::UIColor(0.50f, 0.52f, 0.56f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.35f, 0.35f, 0.35f, 1.0f);
|
||||
::XCEngine::UI::UIColor placeholderTitleColor =
|
||||
::XCEngine::UI::UIColor(0.93f, 0.94f, 0.96f, 1.0f);
|
||||
::XCEngine::UI::UIColor placeholderTextColor =
|
||||
|
||||
@@ -26,41 +26,41 @@ struct UIEditorMenuBarState {
|
||||
};
|
||||
|
||||
struct UIEditorMenuBarMetrics {
|
||||
float barHeight = 34.0f;
|
||||
float horizontalInset = 10.0f;
|
||||
float verticalInset = 4.0f;
|
||||
float buttonGap = 6.0f;
|
||||
float buttonPaddingX = 14.0f;
|
||||
float estimatedGlyphWidth = 7.0f;
|
||||
float labelInsetY = -1.0f;
|
||||
float barCornerRounding = 8.0f;
|
||||
float buttonCornerRounding = 6.0f;
|
||||
float barHeight = 24.0f;
|
||||
float horizontalInset = 0.0f;
|
||||
float verticalInset = 2.0f;
|
||||
float buttonGap = 2.0f;
|
||||
float buttonPaddingX = 10.0f;
|
||||
float estimatedGlyphWidth = 6.5f;
|
||||
float labelInsetY = -1.5f;
|
||||
float barCornerRounding = 0.0f;
|
||||
float buttonCornerRounding = 0.0f;
|
||||
float baseBorderThickness = 1.0f;
|
||||
float focusedBorderThickness = 2.0f;
|
||||
float openBorderThickness = 1.5f;
|
||||
float focusedBorderThickness = 1.0f;
|
||||
float openBorderThickness = 1.0f;
|
||||
};
|
||||
|
||||
struct UIEditorMenuBarPalette {
|
||||
::XCEngine::UI::UIColor barColor =
|
||||
::XCEngine::UI::UIColor(0.18f, 0.18f, 0.19f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.14f, 0.14f, 0.14f, 1.0f);
|
||||
::XCEngine::UI::UIColor buttonColor =
|
||||
::XCEngine::UI::UIColor(0.21f, 0.22f, 0.24f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.18f, 0.18f, 0.18f, 1.0f);
|
||||
::XCEngine::UI::UIColor buttonHoveredColor =
|
||||
::XCEngine::UI::UIColor(0.27f, 0.28f, 0.30f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.23f, 0.23f, 0.23f, 1.0f);
|
||||
::XCEngine::UI::UIColor buttonOpenColor =
|
||||
::XCEngine::UI::UIColor(0.33f, 0.35f, 0.38f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.28f, 0.28f, 0.28f, 1.0f);
|
||||
::XCEngine::UI::UIColor borderColor =
|
||||
::XCEngine::UI::UIColor(0.30f, 0.32f, 0.34f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.24f, 0.24f, 0.24f, 1.0f);
|
||||
::XCEngine::UI::UIColor focusedBorderColor =
|
||||
::XCEngine::UI::UIColor(0.78f, 0.80f, 0.84f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.38f, 0.38f, 0.38f, 1.0f);
|
||||
::XCEngine::UI::UIColor openBorderColor =
|
||||
::XCEngine::UI::UIColor(0.50f, 0.52f, 0.56f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.34f, 0.34f, 0.34f, 1.0f);
|
||||
::XCEngine::UI::UIColor textPrimary =
|
||||
::XCEngine::UI::UIColor(0.93f, 0.94f, 0.96f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.85f, 0.85f, 0.85f, 1.0f);
|
||||
::XCEngine::UI::UIColor textMuted =
|
||||
::XCEngine::UI::UIColor(0.70f, 0.72f, 0.74f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.67f, 0.67f, 0.67f, 1.0f);
|
||||
::XCEngine::UI::UIColor textDisabled =
|
||||
::XCEngine::UI::UIColor(0.54f, 0.55f, 0.58f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.50f, 0.50f, 0.50f, 1.0f);
|
||||
};
|
||||
|
||||
struct UIEditorMenuBarLayout {
|
||||
|
||||
@@ -41,55 +41,55 @@ struct UIEditorPanelFrameText {
|
||||
};
|
||||
|
||||
struct UIEditorPanelFrameMetrics {
|
||||
float cornerRounding = 8.0f;
|
||||
float headerHeight = 36.0f;
|
||||
float footerHeight = 24.0f;
|
||||
float contentPadding = 12.0f;
|
||||
float titleInsetX = 14.0f;
|
||||
float titleInsetY = 9.0f;
|
||||
float subtitleInsetY = 22.0f;
|
||||
float footerInsetX = 14.0f;
|
||||
float footerInsetY = 6.0f;
|
||||
float actionButtonExtent = 18.0f;
|
||||
float actionInsetX = 12.0f;
|
||||
float actionGap = 6.0f;
|
||||
float cornerRounding = 0.0f;
|
||||
float headerHeight = 28.0f;
|
||||
float footerHeight = 18.0f;
|
||||
float contentPadding = 8.0f;
|
||||
float titleInsetX = 9.0f;
|
||||
float titleInsetY = 6.0f;
|
||||
float subtitleInsetY = 16.0f;
|
||||
float footerInsetX = 9.0f;
|
||||
float footerInsetY = 3.0f;
|
||||
float actionButtonExtent = 14.0f;
|
||||
float actionInsetX = 8.0f;
|
||||
float actionGap = 4.0f;
|
||||
float baseBorderThickness = 1.0f;
|
||||
float hoveredBorderThickness = 1.25f;
|
||||
float activeBorderThickness = 1.5f;
|
||||
float focusedBorderThickness = 2.0f;
|
||||
float hoveredBorderThickness = 1.0f;
|
||||
float activeBorderThickness = 1.0f;
|
||||
float focusedBorderThickness = 1.0f;
|
||||
};
|
||||
|
||||
struct UIEditorPanelFramePalette {
|
||||
::XCEngine::UI::UIColor surfaceColor =
|
||||
::XCEngine::UI::UIColor(0.15f, 0.15f, 0.16f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.18f, 0.18f, 0.18f, 1.0f);
|
||||
::XCEngine::UI::UIColor headerColor =
|
||||
::XCEngine::UI::UIColor(0.18f, 0.18f, 0.19f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.20f, 0.20f, 0.20f, 1.0f);
|
||||
::XCEngine::UI::UIColor footerColor =
|
||||
::XCEngine::UI::UIColor(0.17f, 0.17f, 0.18f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.18f, 0.18f, 0.18f, 1.0f);
|
||||
::XCEngine::UI::UIColor borderColor =
|
||||
::XCEngine::UI::UIColor(0.30f, 0.32f, 0.34f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.23f, 0.23f, 0.23f, 1.0f);
|
||||
::XCEngine::UI::UIColor hoveredBorderColor =
|
||||
::XCEngine::UI::UIColor(0.39f, 0.41f, 0.43f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.28f, 0.28f, 0.28f, 1.0f);
|
||||
::XCEngine::UI::UIColor activeBorderColor =
|
||||
::XCEngine::UI::UIColor(0.50f, 0.52f, 0.56f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.32f, 0.32f, 0.32f, 1.0f);
|
||||
::XCEngine::UI::UIColor focusedBorderColor =
|
||||
::XCEngine::UI::UIColor(0.78f, 0.80f, 0.84f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.36f, 0.36f, 0.36f, 1.0f);
|
||||
::XCEngine::UI::UIColor textPrimary =
|
||||
::XCEngine::UI::UIColor(0.93f, 0.94f, 0.96f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.86f, 0.86f, 0.86f, 1.0f);
|
||||
::XCEngine::UI::UIColor textSecondary =
|
||||
::XCEngine::UI::UIColor(0.70f, 0.72f, 0.74f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.64f, 0.64f, 0.64f, 1.0f);
|
||||
::XCEngine::UI::UIColor textMuted =
|
||||
::XCEngine::UI::UIColor(0.58f, 0.59f, 0.62f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.58f, 0.58f, 0.58f, 1.0f);
|
||||
::XCEngine::UI::UIColor actionButtonColor =
|
||||
::XCEngine::UI::UIColor(0.21f, 0.22f, 0.24f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.21f, 0.21f, 0.21f, 1.0f);
|
||||
::XCEngine::UI::UIColor actionButtonHoveredColor =
|
||||
::XCEngine::UI::UIColor(0.27f, 0.28f, 0.30f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.24f, 0.24f, 0.24f, 1.0f);
|
||||
::XCEngine::UI::UIColor actionButtonSelectedColor =
|
||||
::XCEngine::UI::UIColor(0.33f, 0.35f, 0.38f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.27f, 0.27f, 0.27f, 1.0f);
|
||||
::XCEngine::UI::UIColor actionButtonBorderColor =
|
||||
::XCEngine::UI::UIColor(0.42f, 0.44f, 0.47f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.29f, 0.29f, 0.29f, 1.0f);
|
||||
::XCEngine::UI::UIColor actionGlyphColor =
|
||||
::XCEngine::UI::UIColor(0.93f, 0.94f, 0.96f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.82f, 0.82f, 0.82f, 1.0f);
|
||||
};
|
||||
|
||||
struct UIEditorPanelFrameLayout {
|
||||
|
||||
@@ -26,30 +26,30 @@ struct UIEditorShellToolbarLayout {
|
||||
|
||||
struct UIEditorShellToolbarMetrics {
|
||||
float barHeight = 24.0f;
|
||||
float groupPaddingX = 8.0f;
|
||||
float groupPaddingY = 3.0f;
|
||||
float buttonWidth = 20.0f;
|
||||
float buttonHeight = 18.0f;
|
||||
float buttonGap = 5.0f;
|
||||
float groupCornerRounding = 6.0f;
|
||||
float buttonCornerRounding = 4.0f;
|
||||
float groupPaddingX = 6.0f;
|
||||
float groupPaddingY = 2.0f;
|
||||
float buttonWidth = 18.0f;
|
||||
float buttonHeight = 16.0f;
|
||||
float buttonGap = 4.0f;
|
||||
float groupCornerRounding = 0.0f;
|
||||
float buttonCornerRounding = 0.0f;
|
||||
float borderThickness = 1.0f;
|
||||
float iconThickness = 1.35f;
|
||||
float iconThickness = 1.2f;
|
||||
};
|
||||
|
||||
struct UIEditorShellToolbarPalette {
|
||||
::XCEngine::UI::UIColor barColor =
|
||||
::XCEngine::UI::UIColor(0.13f, 0.13f, 0.13f, 1.0f);
|
||||
::XCEngine::UI::UIColor groupColor =
|
||||
::XCEngine::UI::UIColor(0.16f, 0.16f, 0.16f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.15f, 0.15f, 0.15f, 1.0f);
|
||||
::XCEngine::UI::UIColor groupBorderColor =
|
||||
::XCEngine::UI::UIColor(0.30f, 0.30f, 0.30f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.25f, 0.25f, 0.25f, 1.0f);
|
||||
::XCEngine::UI::UIColor buttonColor =
|
||||
::XCEngine::UI::UIColor(0.20f, 0.20f, 0.20f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.19f, 0.19f, 0.19f, 1.0f);
|
||||
::XCEngine::UI::UIColor buttonBorderColor =
|
||||
::XCEngine::UI::UIColor(0.36f, 0.36f, 0.36f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.29f, 0.29f, 0.29f, 1.0f);
|
||||
::XCEngine::UI::UIColor iconColor =
|
||||
::XCEngine::UI::UIColor(0.84f, 0.84f, 0.84f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.82f, 0.82f, 0.82f, 1.0f);
|
||||
};
|
||||
|
||||
struct UIEditorShellComposeModel {
|
||||
@@ -66,9 +66,9 @@ struct UIEditorShellComposeState {
|
||||
};
|
||||
|
||||
struct UIEditorShellComposeMetrics {
|
||||
float outerPadding = 12.0f;
|
||||
float sectionGap = 8.0f;
|
||||
float surfaceCornerRounding = 10.0f;
|
||||
float outerPadding = 0.0f;
|
||||
float sectionGap = 0.0f;
|
||||
float surfaceCornerRounding = 0.0f;
|
||||
Widgets::UIEditorMenuBarMetrics menuBarMetrics = {};
|
||||
UIEditorShellToolbarMetrics toolbarMetrics = {};
|
||||
Widgets::UIEditorDockHostMetrics dockHostMetrics = {};
|
||||
|
||||
@@ -48,43 +48,43 @@ struct UIEditorStatusBarState {
|
||||
};
|
||||
|
||||
struct UIEditorStatusBarMetrics {
|
||||
float barHeight = 28.0f;
|
||||
float outerPaddingX = 10.0f;
|
||||
float segmentPaddingX = 10.0f;
|
||||
float segmentPaddingY = 6.0f;
|
||||
float segmentGap = 4.0f;
|
||||
float barHeight = 22.0f;
|
||||
float outerPaddingX = 8.0f;
|
||||
float segmentPaddingX = 8.0f;
|
||||
float segmentPaddingY = 4.0f;
|
||||
float segmentGap = 2.0f;
|
||||
float separatorWidth = 1.0f;
|
||||
float separatorInsetY = 6.0f;
|
||||
float separatorInsetY = 5.0f;
|
||||
float slotGapMin = 18.0f;
|
||||
float cornerRounding = 8.0f;
|
||||
float estimatedGlyphWidth = 7.0f;
|
||||
float cornerRounding = 0.0f;
|
||||
float estimatedGlyphWidth = 6.5f;
|
||||
float borderThickness = 1.0f;
|
||||
float focusedBorderThickness = 2.0f;
|
||||
float focusedBorderThickness = 1.0f;
|
||||
};
|
||||
|
||||
struct UIEditorStatusBarPalette {
|
||||
::XCEngine::UI::UIColor surfaceColor =
|
||||
::XCEngine::UI::UIColor(0.15f, 0.15f, 0.16f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.16f, 0.16f, 0.16f, 1.0f);
|
||||
::XCEngine::UI::UIColor borderColor =
|
||||
::XCEngine::UI::UIColor(0.30f, 0.32f, 0.34f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.23f, 0.23f, 0.23f, 1.0f);
|
||||
::XCEngine::UI::UIColor focusedBorderColor =
|
||||
::XCEngine::UI::UIColor(0.78f, 0.80f, 0.84f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.35f, 0.35f, 0.35f, 1.0f);
|
||||
::XCEngine::UI::UIColor segmentColor =
|
||||
::XCEngine::UI::UIColor(0.19f, 0.19f, 0.21f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.18f, 0.18f, 0.18f, 1.0f);
|
||||
::XCEngine::UI::UIColor segmentHoveredColor =
|
||||
::XCEngine::UI::UIColor(0.24f, 0.26f, 0.28f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.22f, 0.22f, 0.22f, 1.0f);
|
||||
::XCEngine::UI::UIColor segmentActiveColor =
|
||||
::XCEngine::UI::UIColor(0.30f, 0.32f, 0.35f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.25f, 0.25f, 0.25f, 1.0f);
|
||||
::XCEngine::UI::UIColor segmentBorderColor =
|
||||
::XCEngine::UI::UIColor(0.42f, 0.44f, 0.47f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.29f, 0.29f, 0.29f, 1.0f);
|
||||
::XCEngine::UI::UIColor separatorColor =
|
||||
::XCEngine::UI::UIColor(0.32f, 0.34f, 0.36f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.27f, 0.27f, 0.27f, 1.0f);
|
||||
::XCEngine::UI::UIColor textPrimary =
|
||||
::XCEngine::UI::UIColor(0.93f, 0.94f, 0.96f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.84f, 0.84f, 0.84f, 1.0f);
|
||||
::XCEngine::UI::UIColor textMuted =
|
||||
::XCEngine::UI::UIColor(0.58f, 0.59f, 0.62f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.62f, 0.62f, 0.62f, 1.0f);
|
||||
::XCEngine::UI::UIColor textAccent =
|
||||
::XCEngine::UI::UIColor(0.82f, 0.86f, 0.93f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.84f, 0.84f, 0.84f, 1.0f);
|
||||
};
|
||||
|
||||
struct UIEditorStatusBarLayout {
|
||||
|
||||
@@ -43,8 +43,8 @@ struct UIEditorViewportSlotChrome {
|
||||
std::string_view subtitle = {};
|
||||
bool showTopBar = true;
|
||||
bool showBottomBar = true;
|
||||
float topBarHeight = 40.0f;
|
||||
float bottomBarHeight = 28.0f;
|
||||
float topBarHeight = 24.0f;
|
||||
float bottomBarHeight = 22.0f;
|
||||
};
|
||||
|
||||
struct UIEditorViewportSlotToolItem {
|
||||
@@ -67,30 +67,30 @@ struct UIEditorViewportSlotState {
|
||||
};
|
||||
|
||||
struct UIEditorViewportSlotMetrics {
|
||||
float cornerRounding = 10.0f;
|
||||
float cornerRounding = 0.0f;
|
||||
float outerBorderThickness = 1.0f;
|
||||
float focusedBorderThickness = 1.5f;
|
||||
float topBarPaddingX = 12.0f;
|
||||
float topBarPaddingY = 7.0f;
|
||||
float toolPaddingX = 10.0f;
|
||||
float toolGap = 6.0f;
|
||||
float toolCornerRounding = 6.0f;
|
||||
float titleGap = 10.0f;
|
||||
float titleInsetY = 10.0f;
|
||||
float subtitleInsetY = 25.0f;
|
||||
float estimatedGlyphWidth = 7.0f;
|
||||
float focusedBorderThickness = 1.0f;
|
||||
float topBarPaddingX = 8.0f;
|
||||
float topBarPaddingY = 4.0f;
|
||||
float toolPaddingX = 8.0f;
|
||||
float toolGap = 4.0f;
|
||||
float toolCornerRounding = 2.0f;
|
||||
float titleGap = 6.0f;
|
||||
float titleInsetY = 5.0f;
|
||||
float subtitleInsetY = 14.0f;
|
||||
float estimatedGlyphWidth = 6.5f;
|
||||
float surfaceInset = 0.0f;
|
||||
float surfaceBorderThickness = 1.0f;
|
||||
float focusedSurfaceBorderThickness = 1.5f;
|
||||
float focusedSurfaceBorderThickness = 1.0f;
|
||||
};
|
||||
|
||||
struct UIEditorViewportSlotPalette {
|
||||
::XCEngine::UI::UIColor frameColor =
|
||||
::XCEngine::UI::UIColor(0.14f, 0.14f, 0.14f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.17f, 0.17f, 0.17f, 1.0f);
|
||||
::XCEngine::UI::UIColor topBarColor =
|
||||
::XCEngine::UI::UIColor(0.18f, 0.18f, 0.18f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.20f, 0.20f, 0.20f, 1.0f);
|
||||
::XCEngine::UI::UIColor surfaceColor =
|
||||
::XCEngine::UI::UIColor(0.10f, 0.10f, 0.10f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.14f, 0.14f, 0.14f, 1.0f);
|
||||
::XCEngine::UI::UIColor surfaceHoverOverlayColor =
|
||||
::XCEngine::UI::UIColor(0.22f, 0.22f, 0.22f, 0.24f);
|
||||
::XCEngine::UI::UIColor surfaceActiveOverlayColor =
|
||||
@@ -98,33 +98,33 @@ struct UIEditorViewportSlotPalette {
|
||||
::XCEngine::UI::UIColor captureOverlayColor =
|
||||
::XCEngine::UI::UIColor(0.70f, 0.70f, 0.70f, 0.10f);
|
||||
::XCEngine::UI::UIColor borderColor =
|
||||
::XCEngine::UI::UIColor(0.28f, 0.28f, 0.28f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.23f, 0.23f, 0.23f, 1.0f);
|
||||
::XCEngine::UI::UIColor focusedBorderColor =
|
||||
::XCEngine::UI::UIColor(0.84f, 0.84f, 0.84f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.36f, 0.36f, 0.36f, 1.0f);
|
||||
::XCEngine::UI::UIColor surfaceBorderColor =
|
||||
::XCEngine::UI::UIColor(0.22f, 0.22f, 0.22f, 1.0f);
|
||||
::XCEngine::UI::UIColor surfaceHoveredBorderColor =
|
||||
::XCEngine::UI::UIColor(0.44f, 0.44f, 0.44f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.28f, 0.28f, 0.28f, 1.0f);
|
||||
::XCEngine::UI::UIColor surfaceActiveBorderColor =
|
||||
::XCEngine::UI::UIColor(0.64f, 0.64f, 0.64f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.33f, 0.33f, 0.33f, 1.0f);
|
||||
::XCEngine::UI::UIColor surfaceCapturedBorderColor =
|
||||
::XCEngine::UI::UIColor(0.86f, 0.86f, 0.86f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.38f, 0.38f, 0.38f, 1.0f);
|
||||
::XCEngine::UI::UIColor toolColor =
|
||||
::XCEngine::UI::UIColor(0.24f, 0.24f, 0.24f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.21f, 0.21f, 0.21f, 1.0f);
|
||||
::XCEngine::UI::UIColor toolHoveredColor =
|
||||
::XCEngine::UI::UIColor(0.31f, 0.31f, 0.31f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.24f, 0.24f, 0.24f, 1.0f);
|
||||
::XCEngine::UI::UIColor toolSelectedColor =
|
||||
::XCEngine::UI::UIColor(0.39f, 0.39f, 0.39f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.27f, 0.27f, 0.27f, 1.0f);
|
||||
::XCEngine::UI::UIColor toolDisabledColor =
|
||||
::XCEngine::UI::UIColor(0.19f, 0.19f, 0.19f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.18f, 0.18f, 0.18f, 1.0f);
|
||||
::XCEngine::UI::UIColor toolBorderColor =
|
||||
::XCEngine::UI::UIColor(0.40f, 0.40f, 0.40f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.28f, 0.28f, 0.28f, 1.0f);
|
||||
::XCEngine::UI::UIColor textPrimary =
|
||||
::XCEngine::UI::UIColor(0.94f, 0.94f, 0.94f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.86f, 0.86f, 0.86f, 1.0f);
|
||||
::XCEngine::UI::UIColor textSecondary =
|
||||
::XCEngine::UI::UIColor(0.76f, 0.76f, 0.76f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.68f, 0.68f, 0.68f, 1.0f);
|
||||
::XCEngine::UI::UIColor textMuted =
|
||||
::XCEngine::UI::UIColor(0.62f, 0.62f, 0.62f, 1.0f);
|
||||
::XCEngine::UI::UIColor(0.58f, 0.58f, 0.58f, 1.0f);
|
||||
::XCEngine::UI::UIColor imageTint =
|
||||
::XCEngine::UI::UIColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
UIEditorStatusBarPalette statusBarPalette = {};
|
||||
|
||||
@@ -16,10 +16,10 @@ using ::XCEngine::UI::UIRect;
|
||||
using ::XCEngine::UI::Layout::ArrangeUITabStrip;
|
||||
using ::XCEngine::UI::Layout::MeasureUITabStripHeaderWidth;
|
||||
|
||||
constexpr float kTabRounding = 7.0f;
|
||||
constexpr float kStripRounding = 8.0f;
|
||||
constexpr float kHeaderFontSize = 13.0f;
|
||||
constexpr float kCloseFontSize = 11.0f;
|
||||
constexpr float kTabRounding = 0.0f;
|
||||
constexpr float kStripRounding = 0.0f;
|
||||
constexpr float kHeaderFontSize = 11.0f;
|
||||
constexpr float kCloseFontSize = 10.0f;
|
||||
|
||||
float ClampNonNegative(float value) {
|
||||
return (std::max)(value, 0.0f);
|
||||
@@ -35,17 +35,17 @@ bool IsPointInsideRect(
|
||||
}
|
||||
|
||||
float ResolveStripRounding(const UIEditorTabStripMetrics& metrics) {
|
||||
return (std::max)(
|
||||
(std::min)(ClampNonNegative(metrics.layoutMetrics.headerHeight) * 0.25f, kStripRounding),
|
||||
0.0f);
|
||||
(void)metrics;
|
||||
return kStripRounding;
|
||||
}
|
||||
|
||||
float ResolveTabRounding(const UIEditorTabStripMetrics& metrics) {
|
||||
return (std::max)(ResolveStripRounding(metrics) - 1.0f, 0.0f);
|
||||
(void)metrics;
|
||||
return kTabRounding;
|
||||
}
|
||||
|
||||
float ResolveCloseButtonRounding(const UIEditorTabStripMetrics& metrics) {
|
||||
return (std::min)(ClampNonNegative(metrics.closeButtonExtent) * 0.35f, 5.0f);
|
||||
return (std::min)(ClampNonNegative(metrics.closeButtonExtent) * 0.2f, 2.0f);
|
||||
}
|
||||
|
||||
std::size_t ResolveSelectedIndex(
|
||||
|
||||
@@ -23,8 +23,8 @@ using ::XCEngine::UI::Layout::UITabStripMeasureItem;
|
||||
using ::XCEngine::UI::Layout::UILayoutAxis;
|
||||
using ::XCEngine::UI::Widgets::ExpandUISplitterHandleHitRect;
|
||||
|
||||
constexpr std::string_view kStandalonePanelActiveFooter = "Active panel";
|
||||
constexpr std::string_view kStandalonePanelInactiveFooter = "Panel placeholder";
|
||||
constexpr std::string_view kStandalonePanelActiveFooter = "";
|
||||
constexpr std::string_view kStandalonePanelInactiveFooter = "";
|
||||
|
||||
struct DockMeasureResult {
|
||||
bool visible = false;
|
||||
@@ -97,7 +97,8 @@ UIEditorPanelFrameMetrics BuildTabContentFrameMetrics(
|
||||
frameMetrics.actionButtonExtent = 0.0f;
|
||||
frameMetrics.actionInsetX = 0.0f;
|
||||
frameMetrics.actionGap = 0.0f;
|
||||
frameMetrics.cornerRounding = (std::max)(frameMetrics.cornerRounding - 1.0f, 0.0f);
|
||||
frameMetrics.contentPadding = 0.0f;
|
||||
frameMetrics.cornerRounding = 0.0f;
|
||||
return frameMetrics;
|
||||
}
|
||||
|
||||
@@ -750,7 +751,7 @@ void AppendUIEditorDockHostForeground(
|
||||
panel.frameState,
|
||||
UIEditorPanelFrameText{
|
||||
panel.title,
|
||||
panel.panelId,
|
||||
{},
|
||||
panel.active ? kStandalonePanelActiveFooter : kStandalonePanelInactiveFooter
|
||||
},
|
||||
palette.panelFramePalette,
|
||||
|
||||
@@ -26,15 +26,15 @@ float ResolveActionButtonExtent(
|
||||
}
|
||||
|
||||
float ResolveActionCornerRounding(const UIRect& rect) {
|
||||
return (std::min)((std::max)((std::min)(rect.width, rect.height) * 0.35f, 0.0f), 6.0f);
|
||||
return (std::min)((std::max)((std::min)(rect.width, rect.height) * 0.15f, 0.0f), 2.0f);
|
||||
}
|
||||
|
||||
float ResolveActionGlyphLeft(const UIRect& rect) {
|
||||
return rect.x + (std::max)(0.0f, (rect.width - 7.0f) * 0.5f);
|
||||
return rect.x + (std::max)(0.0f, (rect.width - 6.0f) * 0.5f);
|
||||
}
|
||||
|
||||
float ResolveActionGlyphTop(const UIRect& rect) {
|
||||
return rect.y + (std::max)(0.0f, (rect.height - 12.0f) * 0.5f) - 0.5f;
|
||||
return rect.y + (std::max)(0.0f, (rect.height - 10.0f) * 0.5f) - 0.5f;
|
||||
}
|
||||
|
||||
UIColor ResolveActionFillColor(
|
||||
@@ -77,7 +77,7 @@ void AppendActionButton(
|
||||
UIPoint(ResolveActionGlyphLeft(rect), ResolveActionGlyphTop(rect)),
|
||||
std::string(glyph),
|
||||
palette.actionGlyphColor,
|
||||
12.0f);
|
||||
10.0f);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -282,9 +282,19 @@ void AppendUIEditorPanelFrameBackground(
|
||||
metrics.cornerRounding);
|
||||
if (layout.headerRect.height > 0.0f) {
|
||||
drawList.AddFilledRect(layout.headerRect, palette.headerColor, metrics.cornerRounding);
|
||||
drawList.AddLine(
|
||||
UIPoint(layout.headerRect.x, layout.headerRect.y + layout.headerRect.height - 1.0f),
|
||||
UIPoint(layout.headerRect.x + layout.headerRect.width, layout.headerRect.y + layout.headerRect.height - 1.0f),
|
||||
palette.borderColor,
|
||||
1.0f);
|
||||
}
|
||||
if (layout.hasFooter && layout.footerRect.height > 0.0f) {
|
||||
drawList.AddFilledRect(layout.footerRect, palette.footerColor, metrics.cornerRounding);
|
||||
drawList.AddLine(
|
||||
UIPoint(layout.footerRect.x, layout.footerRect.y),
|
||||
UIPoint(layout.footerRect.x + layout.footerRect.width, layout.footerRect.y),
|
||||
palette.borderColor,
|
||||
1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -300,7 +310,7 @@ void AppendUIEditorPanelFrameForeground(
|
||||
UIPoint(layout.frameRect.x + metrics.titleInsetX, layout.headerRect.y + metrics.titleInsetY),
|
||||
std::string(text.title),
|
||||
palette.textPrimary,
|
||||
16.0f);
|
||||
13.0f);
|
||||
}
|
||||
|
||||
if (!text.subtitle.empty()) {
|
||||
@@ -308,7 +318,7 @@ void AppendUIEditorPanelFrameForeground(
|
||||
UIPoint(layout.frameRect.x + metrics.titleInsetX, layout.headerRect.y + metrics.subtitleInsetY),
|
||||
std::string(text.subtitle),
|
||||
palette.textSecondary,
|
||||
12.0f);
|
||||
10.0f);
|
||||
}
|
||||
|
||||
if (layout.hasFooter && !text.footer.empty()) {
|
||||
@@ -316,7 +326,7 @@ void AppendUIEditorPanelFrameForeground(
|
||||
UIPoint(layout.footerRect.x + metrics.footerInsetX, layout.footerRect.y + metrics.footerInsetY),
|
||||
std::string(text.footer),
|
||||
palette.textMuted,
|
||||
11.0f);
|
||||
10.0f);
|
||||
}
|
||||
|
||||
if (layout.showPinButton) {
|
||||
|
||||
@@ -425,7 +425,7 @@ void AppendUIEditorViewportSlotForeground(
|
||||
UIPoint(layout.titleRect.x, layout.topBarRect.y + metrics.titleInsetY),
|
||||
std::string(chrome.title),
|
||||
palette.textPrimary,
|
||||
15.0f);
|
||||
13.0f);
|
||||
}
|
||||
|
||||
if (!chrome.subtitle.empty()) {
|
||||
@@ -433,7 +433,7 @@ void AppendUIEditorViewportSlotForeground(
|
||||
UIPoint(layout.subtitleRect.x, layout.topBarRect.y + metrics.subtitleInsetY),
|
||||
std::string(chrome.subtitle),
|
||||
palette.textSecondary,
|
||||
11.0f);
|
||||
10.0f);
|
||||
}
|
||||
|
||||
for (std::size_t index = 0u; index < toolItems.size(); ++index) {
|
||||
@@ -444,10 +444,10 @@ void AppendUIEditorViewportSlotForeground(
|
||||
drawList.AddText(
|
||||
UIPoint(
|
||||
layout.toolItemRects[index].x + metrics.toolPaddingX,
|
||||
layout.toolItemRects[index].y + 5.0f),
|
||||
layout.toolItemRects[index].y + 3.0f),
|
||||
toolItems[index].label,
|
||||
toolItems[index].enabled ? palette.textPrimary : palette.textMuted,
|
||||
12.0f);
|
||||
11.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user