refactor(new_editor/app): reorganize host structure and add smoke test
This commit is contained in:
45
new_editor/app/UI/Styles/EditorTreeViewStyle.h
Normal file
45
new_editor/app/UI/Styles/EditorTreeViewStyle.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEditor/Collections/UIEditorTreeView.h>
|
||||
|
||||
namespace XCEngine::UI::Editor::App {
|
||||
|
||||
inline constexpr ::XCEngine::UI::UIColor kEditorTreeSurfaceColor(0.10f, 0.10f, 0.10f, 1.0f);
|
||||
inline constexpr ::XCEngine::UI::UIColor kEditorTreeHoverColor(0.13f, 0.13f, 0.13f, 1.0f);
|
||||
inline constexpr ::XCEngine::UI::UIColor kEditorTreeSelectedColor(0.17f, 0.17f, 0.17f, 1.0f);
|
||||
inline constexpr ::XCEngine::UI::UIColor kEditorTreeDisclosureColor(0.620f, 0.620f, 0.620f, 1.0f);
|
||||
inline constexpr ::XCEngine::UI::UIColor kEditorTreeTextColor(0.920f, 0.920f, 0.920f, 1.0f);
|
||||
|
||||
inline Widgets::UIEditorTreeViewMetrics BuildEditorTreeViewMetrics() {
|
||||
Widgets::UIEditorTreeViewMetrics metrics = {};
|
||||
metrics.rowHeight = 20.0f;
|
||||
metrics.rowGap = 0.0f;
|
||||
metrics.horizontalPadding = 6.0f;
|
||||
metrics.indentWidth = 14.0f;
|
||||
metrics.disclosureExtent = 18.0f;
|
||||
metrics.disclosureLabelGap = 2.0f;
|
||||
metrics.iconExtent = 18.0f;
|
||||
metrics.iconLabelGap = 2.0f;
|
||||
metrics.iconInsetY = -1.0f;
|
||||
metrics.labelInsetY = 0.0f;
|
||||
metrics.cornerRounding = 0.0f;
|
||||
metrics.borderThickness = 0.0f;
|
||||
metrics.focusedBorderThickness = 0.0f;
|
||||
return metrics;
|
||||
}
|
||||
|
||||
inline Widgets::UIEditorTreeViewPalette BuildEditorTreeViewPalette() {
|
||||
Widgets::UIEditorTreeViewPalette palette = {};
|
||||
palette.surfaceColor = kEditorTreeSurfaceColor;
|
||||
palette.borderColor = kEditorTreeSurfaceColor;
|
||||
palette.focusedBorderColor = kEditorTreeSurfaceColor;
|
||||
palette.rowHoverColor = kEditorTreeHoverColor;
|
||||
palette.rowSelectedColor = kEditorTreeSelectedColor;
|
||||
palette.rowSelectedFocusedColor = kEditorTreeSelectedColor;
|
||||
palette.disclosureColor = kEditorTreeDisclosureColor;
|
||||
palette.textColor = kEditorTreeTextColor;
|
||||
return palette;
|
||||
}
|
||||
|
||||
} // namespace XCEngine::UI::Editor::App
|
||||
|
||||
Reference in New Issue
Block a user