Files
XCEngine/new_editor/app/UI/Styles/EditorTreeViewStyle.h

46 lines
1.8 KiB
C
Raw Normal View History

#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