diff --git a/Prowl.Editor/DragDrop.cs b/Prowl.Editor/DragDrop.cs index b84f7774..01df188f 100644 --- a/Prowl.Editor/DragDrop.cs +++ b/Prowl.Editor/DragDrop.cs @@ -134,12 +134,12 @@ public static void DrawVisual(Paper paper) .Position((float)DragPosition.X + 12, (float)DragPosition.Y + 4) .Width(UnitValue.Auto).Height(22) .BackgroundColor(System.Drawing.Color.FromArgb(200, 40, 40, 45)) - .BorderColor(EditorTheme.Accent).BorderWidth(1) + .BorderColor(EditorTheme.Purple400).BorderWidth(1) .Rounded(4).ChildLeft(6).ChildRight(6) .IsNotInteractable() .Layer(Layer.Topmost) .Text($"{Payload.Icon} {Payload.DisplayName}", font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize - 2) .Alignment(TextAlignment.MiddleLeft); } diff --git a/Prowl.Editor/EditorApplication.cs b/Prowl.Editor/EditorApplication.cs index 447a35cc..edb89ad8 100644 --- a/Prowl.Editor/EditorApplication.cs +++ b/Prowl.Editor/EditorApplication.cs @@ -248,7 +248,7 @@ private void DrawTitleFlap(Paper paper, int w, int h) .Position(w - 130, 0).Size(120, EditorTheme.MenuBarHeight) .IsNotInteractable() .Text($"Prowl v{version}", font) - .TextColor(EditorTheme.TextDim) + .TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 2) .Alignment(TextAlignment.MiddleRight); @@ -289,7 +289,7 @@ private void DrawTitleFlap(Paper paper, int w, int h) float bl = cx - botW / 2f; float br = cx + botW / 2f; - var nc = EditorTheme.Normal; + var nc = EditorTheme.Neutral300; var flapColor = Prowl.Vector.Color32.FromArgb(nc.A, nc.R, nc.G, nc.B); float r = rad; @@ -314,7 +314,7 @@ private void DrawTitleFlap(Paper paper, int w, int h) canvas.FillComplexAA(); // Outline (sides + bottom only) - var bc = EditorTheme.Bright; + var bc = EditorTheme.Ink200; canvas.SetStrokeColor(Prowl.Vector.Color32.FromArgb(bc.A, bc.R, bc.G, bc.B)); canvas.SetStrokeWidth(1f); canvas.BeginPath(); @@ -340,7 +340,7 @@ private void DrawTitleFlap(Paper paper, int w, int h) .Position(bx, flapContentY).Size(projW, EditorTheme.MenuBarHeight) .IsNotInteractable() .Text(projectText, font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize) .Alignment(TextAlignment.MiddleCenter); @@ -351,7 +351,7 @@ private void DrawTitleFlap(Paper paper, int w, int h) .PositionType(PositionType.SelfDirected) .Position(bx, flapContentY + 4).Size(1, EditorTheme.MenuBarHeight - 8) .IsNotInteractable() - .BackgroundColor(EditorTheme.Border); + .BackgroundColor(EditorTheme.Ink200); bx += 10f; @@ -362,7 +362,7 @@ private void DrawTitleFlap(Paper paper, int w, int h) .Rounded(4) .BackgroundColor(Application.IsPlaying ? System.Drawing.Color.FromArgb(255, 60, 160, 60) : System.Drawing.Color.Transparent) .Hovered.BackgroundColor(System.Drawing.Color.FromArgb(80, 255, 255, 255)).End() - .Text(EditorIcons.Play, font).TextColor(EditorTheme.Text).FontSize(14f) + .Text(EditorIcons.Play, font).TextColor(EditorTheme.Ink500).FontSize(14f) .Alignment(TextAlignment.MiddleCenter) .OnClick(0, (_, e) => Application.IsPlaying = !Application.IsPlaying); @@ -375,7 +375,7 @@ private void DrawTitleFlap(Paper paper, int w, int h) .Rounded(4) .BackgroundColor(System.Drawing.Color.Transparent) .Hovered.BackgroundColor(System.Drawing.Color.FromArgb(80, 255, 255, 255)).End() - .Text(EditorIcons.Pause, font).TextColor(EditorTheme.Text).FontSize(14f) + .Text(EditorIcons.Pause, font).TextColor(EditorTheme.Ink500).FontSize(14f) .Alignment(TextAlignment.MiddleCenter); bx += btnSize + 4f; @@ -387,7 +387,7 @@ private void DrawTitleFlap(Paper paper, int w, int h) .Rounded(4) .BackgroundColor(System.Drawing.Color.Transparent) .Hovered.BackgroundColor(System.Drawing.Color.FromArgb(80, 255, 255, 255)).End() - .Text(EditorIcons.ForwardStep, font).TextColor(EditorTheme.Text).FontSize(14f) + .Text(EditorIcons.ForwardStep, font).TextColor(EditorTheme.Ink500).FontSize(14f) .Alignment(TextAlignment.MiddleCenter); bx += btnSize + 8f; @@ -397,7 +397,7 @@ private void DrawTitleFlap(Paper paper, int w, int h) .PositionType(PositionType.SelfDirected) .Position(bx, flapContentY + 4).Size(1, EditorTheme.MenuBarHeight - 8) .IsNotInteractable() - .BackgroundColor(EditorTheme.Border); + .BackgroundColor(EditorTheme.Ink200); bx += 10f; @@ -407,7 +407,7 @@ private void DrawTitleFlap(Paper paper, int w, int h) .Position(bx, flapContentY).Size(fpsW, EditorTheme.MenuBarHeight) .IsNotInteractable() .Text(fpsText, font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize) .Alignment(TextAlignment.MiddleCenter); } diff --git a/Prowl.Editor/EditorTheme.cs b/Prowl.Editor/EditorTheme.cs index 79b35df1..1c47f108 100644 --- a/Prowl.Editor/EditorTheme.cs +++ b/Prowl.Editor/EditorTheme.cs @@ -29,51 +29,6 @@ public static class EditorTheme public static float TabCloseSize = 14f; public static float TabGap = 0f; - #region Outdated - - // 4-shade system: Darkest → Dark → Normal → Bright - public static Color Background = Color.FromArgb(255, 10, 10, 12);// Background (near black) - public static Color Darkest = Color.FromArgb(255, 20, 20, 22); // Menu bar - public static Color Dark = Color.FromArgb(255, 28, 28, 30); // Background (near black) - public static Color Normal = Color.FromArgb(255, 37, 37, 40); // Windows/panels - public static Color Bright = Color.FromArgb(255, 65, 65, 70); // Scrollbar, outline - - // Aliases for readability - public static Color MenuBarBackground => Darkest; - public static Color WindowBackground => Normal; - public static Color PanelBackground => Normal; - public static Color HeaderBackground = Color.FromArgb(255, 30, 30, 33); - public static Color InputBackground = Color.FromArgb(255, 28, 28, 30); - public static Color Border => Bright; - - // Text - public static Color Text = Color.FromArgb(255, 220, 220, 220); - public static Color TextDim = Color.FromArgb(255, 150, 150, 150); - public static Color TextDisabled = Color.FromArgb(255, 90, 90, 90); - - // Interactive - public static Color ButtonNormal = Color.FromArgb(255, 55, 55, 58); - public static Color ButtonHovered = Color.FromArgb(255, 70, 70, 74); - public static Color ButtonActive = Color.FromArgb(255, 40, 40, 43); - - // Accent - public static Color Accent = Color.FromArgb(255, 51, 122, 183); - public static Color AccentDim = Color.FromArgb(255, 40, 90, 140); - - // Borders - public static Color BorderFocused = Color.FromArgb(255, 51, 122, 183); - - // Splitter - public static Color Splitter = Color.FromArgb(255, 25, 25, 25); - public static Color SplitterHovered = Color.FromArgb(255, 51, 122, 183); - - // Tab - public static Color TabActive => Normal; - public static Color TabInactive => Darkest; - public static Color TabHovered = Color.FromArgb(255, 55, 55, 58); - - #endregion - // Static color palette for the application theme. // Built from 8 base colors: #101116, #16151A, #18191D, #1D1E22, // #563784, #82AAC6, #271D36, #CB594F. diff --git a/Prowl.Editor/Inspector/AddComponentPopup.cs b/Prowl.Editor/Inspector/AddComponentPopup.cs index 5418880f..38c27965 100644 --- a/Prowl.Editor/Inspector/AddComponentPopup.cs +++ b/Prowl.Editor/Inspector/AddComponentPopup.cs @@ -66,20 +66,20 @@ public static void Draw(Paper paper) using (paper.Column("acp_modal") .Size(320, 450) .Margin(UnitValue.StretchOne) - .BackgroundColor(EditorTheme.Normal) - .BorderColor(EditorTheme.Bright).BorderWidth(1).Rounded(8) + .BackgroundColor(EditorTheme.Neutral300) + .BorderColor(EditorTheme.Ink200).BorderWidth(1).Rounded(8) .Layer(Layer.Overlay) .Enter()) { // Header using (paper.Row("acp_header") .Height(32).ChildLeft(12).ChildRight(8).RowBetween(8) - .BackgroundColor(EditorTheme.Darkest) + .BackgroundColor(EditorTheme.Neutral200) .Enter()) { paper.Box("acp_title").Height(32) .Text("Add Component", font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize).Alignment(TextAlignment.MiddleLeft); paper.Box("acp_spacer"); @@ -87,7 +87,7 @@ public static void Draw(Paper paper) paper.Box("acp_close") .Width(24).Height(24).Rounded(4) .Hovered.BackgroundColor(Color.FromArgb(255, 180, 60, 60)).End() - .Text(EditorIcons.Xmark, font).TextColor(EditorTheme.TextDim) + .Text(EditorIcons.Xmark, font).TextColor(EditorTheme.Ink400) .FontSize(12f).Alignment(TextAlignment.MiddleCenter) .OnClick(0, (_, _) => Close()); } @@ -120,7 +120,7 @@ public static void Draw(Paper paper) { paper.Box("acp_empty").Height(40) .Text("No matching components", font) - .TextColor(EditorTheme.TextDisabled) + .TextColor(EditorTheme.Ink300) .FontSize(EditorTheme.FontSize - 2).Alignment(TextAlignment.MiddleCenter); } @@ -146,7 +146,7 @@ public static void Draw(Paper paper) paper.Box($"acp_cat_{category.GetHashCode()}") .Height(20).ChildLeft(8) .Text(category, font) - .TextColor(EditorTheme.TextDim) + .TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 3).Alignment(TextAlignment.MiddleLeft); foreach (var comp in group.OrderBy(c => c.Name)) @@ -157,7 +157,7 @@ public static void Draw(Paper paper) // Small separator paper.Box($"acp_sep_{category.GetHashCode()}") .Height(1).Margin(8, 3, 8, 3) - .BackgroundColor(EditorTheme.Border); + .BackgroundColor(EditorTheme.Ink200); } } } @@ -168,7 +168,7 @@ private static void DrawComponentItem(Paper paper, Prowl.Scribe.FontFile font, s { using (paper.Row(id) .Height(EditorTheme.RowHeight) - .Hovered.BackgroundColor(EditorTheme.Accent).End() + .Hovered.BackgroundColor(EditorTheme.Purple400).End() .Rounded(3).ChildLeft(8).RowBetween(6) .OnClick(comp.Type, (type, _) => { @@ -183,13 +183,13 @@ private static void DrawComponentItem(Paper paper, Prowl.Scribe.FontFile font, s // Icon paper.Box($"{id}_ico") .Width(16).Height(EditorTheme.RowHeight) - .Text(comp.Icon, font).TextColor(EditorTheme.TextDim) + .Text(comp.Icon, font).TextColor(EditorTheme.Ink400) .FontSize(11f).Alignment(TextAlignment.MiddleCenter); // Name paper.Box($"{id}_name") .Height(EditorTheme.RowHeight) - .Text(comp.Name, font).TextColor(EditorTheme.Text) + .Text(comp.Name, font).TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize - 1).Alignment(TextAlignment.MiddleLeft); } } diff --git a/Prowl.Editor/Inspector/EngineObjectPropertyEditor.cs b/Prowl.Editor/Inspector/EngineObjectPropertyEditor.cs index 583fb0dd..cd5f868b 100644 --- a/Prowl.Editor/Inspector/EngineObjectPropertyEditor.cs +++ b/Prowl.Editor/Inspector/EngineObjectPropertyEditor.cs @@ -44,7 +44,7 @@ public override void OnGUI(Paper paper, string id, string label, object? value, if (!string.IsNullOrEmpty(label)) paper.Box($"{id}_lbl") .Width(EditorTheme.LabelWidth).Height(EditorTheme.RowHeight).ChildLeft(4) - .Text(label, font).TextColor(EditorTheme.Text) + .Text(label, font).TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize).Alignment(TextAlignment.MiddleLeft); // Check if a compatible asset is being dragged over this field @@ -54,10 +54,10 @@ public override void OnGUI(Paper paper, string id, string label, object? value, // Object field row var fieldEl = paper.Row($"{id}_field") .Height(EditorTheme.RowHeight) - .BackgroundColor(isDragTarget ? System.Drawing.Color.FromArgb(60, EditorTheme.Accent) : EditorTheme.InputBackground) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() + .BackgroundColor(isDragTarget ? System.Drawing.Color.FromArgb(60, EditorTheme.Purple400) : EditorTheme.Neutral300) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .Rounded(3).ChildLeft(4).ChildRight(2).RowBetween(2) - .BorderColor(isDragTarget ? EditorTheme.Accent : EditorTheme.Border).BorderWidth(1) + .BorderColor(isDragTarget ? EditorTheme.Purple400 : EditorTheme.Ink200).BorderWidth(1) .OnDoubleClick((fieldType, onChange), (cap, _) => OpenSelector(cap.Item1, cap.Item2)); using (fieldEl.Enter()) @@ -86,7 +86,7 @@ public override void OnGUI(Paper paper, string id, string label, object? value, .Width(16).Height(EditorTheme.RowHeight) .IsNotInteractable() .Text(icon, font) - .TextColor(eo != null ? EditorTheme.Accent : EditorTheme.TextDisabled) + .TextColor(eo != null ? EditorTheme.Purple400 : EditorTheme.Ink300) .FontSize(10f).Alignment(TextAlignment.MiddleCenter); // Name @@ -94,15 +94,15 @@ public override void OnGUI(Paper paper, string id, string label, object? value, .Height(EditorTheme.RowHeight).Clip() .IsNotInteractable() .Text(displayName, font) - .TextColor(eo != null ? EditorTheme.Text : EditorTheme.TextDisabled) + .TextColor(eo != null ? EditorTheme.Ink500 : EditorTheme.Ink300) .FontSize(EditorTheme.FontSize - 1).Alignment(TextAlignment.MiddleLeft); // Picker circle button paper.Box($"{id}_pick") .Width(20).Height(EditorTheme.RowHeight) - .Text(EditorIcons.CircleDot, font).TextColor(EditorTheme.TextDim) + .Text(EditorIcons.CircleDot, font).TextColor(EditorTheme.Ink400) .FontSize(12f).Alignment(TextAlignment.MiddleCenter) - .Hovered.BackgroundColor(EditorTheme.Accent).End() + .Hovered.BackgroundColor(EditorTheme.Purple400).End() .Rounded(3) .OnClick((fieldType, onChange), (cap, _) => OpenSelector(cap.Item1, cap.Item2)); } @@ -149,20 +149,20 @@ public static void DrawSelectorModal(Paper paper) using (paper.Column("eo_sel_modal") .Size(350, 400) .Margin(UnitValue.StretchOne) - .BackgroundColor(EditorTheme.Normal) - .BorderColor(EditorTheme.Bright).BorderWidth(1).Rounded(8) + .BackgroundColor(EditorTheme.Neutral300) + .BorderColor(EditorTheme.Ink200).BorderWidth(1).Rounded(8) .Layer(Layer.Overlay) .Enter()) { // Header using (paper.Row("eo_sel_header") .Height(32).ChildLeft(12).ChildRight(8).RowBetween(8) - .BackgroundColor(EditorTheme.Darkest) + .BackgroundColor(EditorTheme.Neutral200) .Enter()) { paper.Box("eo_sel_title").Height(32) .Text($"Select {_selectorType.Name}", font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize).Alignment(TextAlignment.MiddleLeft); paper.Box("eo_sel_spacer"); @@ -170,7 +170,7 @@ public static void DrawSelectorModal(Paper paper) paper.Box("eo_sel_close") .Width(24).Height(24).Rounded(4) .Hovered.BackgroundColor(Color.FromArgb(255, 180, 60, 60)).End() - .Text(EditorIcons.Xmark, font).TextColor(EditorTheme.TextDim) + .Text(EditorIcons.Xmark, font).TextColor(EditorTheme.Ink400) .FontSize(12f).Alignment(TextAlignment.MiddleCenter) .OnClick(0, (_, _) => _selectorOpen = false); } @@ -181,10 +181,10 @@ public static void DrawSelectorModal(Paper paper) // None option paper.Box("eo_sel_none") .Height(EditorTheme.RowHeight).ChildLeft(8) - .Hovered.BackgroundColor(EditorTheme.Accent).End() + .Hovered.BackgroundColor(EditorTheme.Purple400).End() .Rounded(3) .Text("None", font) - .TextColor(EditorTheme.TextDim) + .TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize).Alignment(TextAlignment.MiddleLeft) .OnClick(0, (_, _) => { @@ -201,7 +201,7 @@ public static void DrawSelectorModal(Paper paper) { paper.Box("eo_sel_bi_hdr").Height(EditorTheme.RowHeight).ChildLeft(6) .Text($"{EditorIcons.Cube} Built-In", font) - .TextColor(EditorTheme.TextDim) + .TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 2).Alignment(TextAlignment.MiddleLeft); for (int i = 0; i < builtInItems.Count; i++) @@ -215,11 +215,11 @@ public static void DrawSelectorModal(Paper paper) if (projectItems.Count > 0) { if (builtInItems.Count > 0) - paper.Box("eo_sel_sep2").Height(1).Margin(4, 2, 4, 2).BackgroundColor(EditorTheme.Border); + paper.Box("eo_sel_sep2").Height(1).Margin(4, 2, 4, 2).BackgroundColor(EditorTheme.Ink200); paper.Box("eo_sel_proj_hdr").Height(EditorTheme.RowHeight).ChildLeft(6) .Text($"{EditorIcons.FolderOpen} Project", font) - .TextColor(EditorTheme.TextDim) + .TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 2).Alignment(TextAlignment.MiddleLeft); for (int i = 0; i < projectItems.Count; i++) @@ -234,7 +234,7 @@ public static void DrawSelectorModal(Paper paper) { paper.Box("eo_sel_empty").Height(40) .Text("No assets of this type found", font) - .TextColor(EditorTheme.TextDisabled) + .TextColor(EditorTheme.Ink300) .FontSize(EditorTheme.FontSize - 2).Alignment(TextAlignment.MiddleCenter); } } @@ -245,7 +245,7 @@ private static void DrawSelectorItem(Paper paper, Prowl.Scribe.FontFile font, st { using (paper.Row(id) .Height(EditorTheme.RowHeight).ChildLeft(12).RowBetween(4) - .Hovered.BackgroundColor(EditorTheme.Accent).End() + .Hovered.BackgroundColor(EditorTheme.Purple400).End() .Rounded(3) .OnClick(guid, (g, _) => { @@ -257,17 +257,17 @@ private static void DrawSelectorItem(Paper paper, Prowl.Scribe.FontFile font, st { paper.Box($"{id}_ico") .Width(14).Height(EditorTheme.RowHeight) - .Text(icon, font).TextColor(EditorTheme.TextDim) + .Text(icon, font).TextColor(EditorTheme.Ink400) .FontSize(9f).Alignment(TextAlignment.MiddleCenter); paper.Box($"{id}_name") .Height(EditorTheme.RowHeight).Clip() - .Text(name, font).TextColor(EditorTheme.Text) + .Text(name, font).TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize).Alignment(TextAlignment.MiddleLeft); paper.Box($"{id}_path") .Width(UnitValue.Auto).Height(EditorTheme.RowHeight).ChildRight(4) - .Text($"({pathLabel})", font).TextColor(EditorTheme.TextDisabled) + .Text($"({pathLabel})", font).TextColor(EditorTheme.Ink300) .FontSize(EditorTheme.FontSize - 4).Alignment(TextAlignment.MiddleRight); } } diff --git a/Prowl.Editor/Inspector/GameObjectInspector.cs b/Prowl.Editor/Inspector/GameObjectInspector.cs index f74268fe..cd602d18 100644 --- a/Prowl.Editor/Inspector/GameObjectInspector.cs +++ b/Prowl.Editor/Inspector/GameObjectInspector.cs @@ -61,14 +61,14 @@ private static void DrawHeader(Paper paper, Prowl.Scribe.FontFile font, GameObje .Enter()) { paper.Box("gi_tag_lbl").Width(30).Height(22) - .Text("Tag", font).TextColor(EditorTheme.TextDim) + .Text("Tag", font).TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 2).Alignment(TextAlignment.MiddleRight); EditorGUI.TextField(paper, "gi_tag", "", go.Tag) .OnValueChanged(v => go.Tag = v); paper.Box("gi_layer_lbl").Width(36).Height(22) - .Text("Layer", font).TextColor(EditorTheme.TextDim) + .Text("Layer", font).TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 2).Alignment(TextAlignment.MiddleRight); EditorGUI.TextField(paper, "gi_layer", "", go.Layer) @@ -136,7 +136,7 @@ private static void DrawComponents(Paper paper, Prowl.Scribe.FontFile font, Game // Component foldout header using (paper.Row($"{compId}_header") .Height(24) - .BackgroundColor(EditorTheme.HeaderBackground) + .BackgroundColor(EditorTheme.Neutral300) .Rounded(3) .ChildLeft(4) .RowBetween(4) @@ -150,7 +150,7 @@ private static void DrawComponents(Paper paper, Prowl.Scribe.FontFile font, Game paper.Box($"{compId}_label") .Height(24) .Text($"{icon} {compName}", font) - .TextColor(comp.Enabled ? EditorTheme.Text : EditorTheme.TextDisabled) + .TextColor(comp.Enabled ? EditorTheme.Ink500 : EditorTheme.Ink300) .FontSize(EditorTheme.FontSize).Alignment(TextAlignment.MiddleLeft); // Spacer @@ -159,8 +159,8 @@ private static void DrawComponents(Paper paper, Prowl.Scribe.FontFile font, Game // Context menu button using (paper.Box($"{compId}_gear") .Width(20).Height(24).Rounded(3) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() - .Text(EditorIcons.EllipsisVertical, font).TextColor(EditorTheme.TextDim) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() + .Text(EditorIcons.EllipsisVertical, font).TextColor(EditorTheme.Ink400) .FontSize(11f).Alignment(TextAlignment.MiddleCenter) .Enter()) { @@ -249,10 +249,10 @@ private static void DrawAddComponentButton(Paper paper, Prowl.Scribe.FontFile fo { paper.Box("gi_add_comp") .Height(28).Rounded(4) - .BackgroundColor(EditorTheme.ButtonNormal) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() + .BackgroundColor(EditorTheme.Ink100) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .Text($"{EditorIcons.Plus} Add Component", font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize).Alignment(TextAlignment.MiddleCenter) .OnClick(go, (g, _) => AddComponentPopup.Open(g)); } diff --git a/Prowl.Editor/MainMenuBar.cs b/Prowl.Editor/MainMenuBar.cs index fa99ac84..73949914 100644 --- a/Prowl.Editor/MainMenuBar.cs +++ b/Prowl.Editor/MainMenuBar.cs @@ -21,7 +21,7 @@ public static void Draw(Paper paper) .PositionType(PositionType.SelfDirected) .Position(0, 0) .Size(paper.Percent(100), EditorTheme.MenuBarHeight) - .BackgroundColor(EditorTheme.MenuBarBackground) + .BackgroundColor(EditorTheme.Neutral200) .ChildLeft(10) .RowBetween(10) .Enter()) @@ -36,9 +36,9 @@ public static void Draw(Paper paper) using (paper.Box($"menu_{index}") .Height(EditorTheme.MenuBarHeight) .Width(UnitValue.Auto) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .Text(item.Label, font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .Alignment(TextAlignment.MiddleCenter) .FontSize(EditorTheme.FontSize) .Enter()) @@ -62,8 +62,8 @@ private static void RenderDropdown(Paper paper, string id, List items, .Position(x, y) .Width(DropdownWidth) .Height(UnitValue.Auto) - .BackgroundColor(EditorTheme.PanelBackground) - .BorderColor(EditorTheme.Border) + .BackgroundColor(EditorTheme.Neutral300) + .BorderColor(EditorTheme.Ink200) .BorderWidth(1) .Rounded(4) .ChildTop(2).ChildBottom(2) @@ -81,18 +81,18 @@ private static void RenderDropdown(Paper paper, string id, List items, paper.Box($"{id}_sep_{index}") .Height(1) .Margin(4, 4, 4, 4) - .BackgroundColor(EditorTheme.Border); + .BackgroundColor(EditorTheme.Ink200); continue; } - var textColor = item.IsEnabled ? EditorTheme.Text : EditorTheme.TextDisabled; + var textColor = item.IsEnabled ? EditorTheme.Ink500 : EditorTheme.Ink300; // Menu item row — submenu is a child so IsParentHovered keeps it open using (paper.Row($"{id}_i_{index}") .Height(ItemHeight) .BackgroundColor(Color.Transparent) .Rounded(3) - .Hovered.BackgroundColor(EditorTheme.Accent).End() + .Hovered.BackgroundColor(EditorTheme.Purple400).End() .OnClick(item, (captured, e) => { if (captured.IsEnabled && captured.OnClick != null) diff --git a/Prowl.Editor/Panels/ConsolePanel.cs b/Prowl.Editor/Panels/ConsolePanel.cs index 60df7284..0ae59c28 100644 --- a/Prowl.Editor/Panels/ConsolePanel.cs +++ b/Prowl.Editor/Panels/ConsolePanel.cs @@ -17,6 +17,7 @@ public class ConsolePanel : DockPanel public override string Title => "Console"; public override string Icon => EditorIcons.Terminal; + private const float ToolbarHeight = 26f; private const int MaxMessages = 500; private const float RowHeight = 20f; private static readonly List _messages = new(); @@ -29,7 +30,6 @@ public class ConsolePanel : DockPanel private bool _autoScroll = true; private string _searchText = ""; - private const float ToolbarHeight = 30f; private struct LogEntry { @@ -88,7 +88,7 @@ public override void OnGUI(Paper paper, float width, float height) using (paper.Column("con_root").Size(width, height).Enter()) { DrawToolbar(paper, font, width); - DrawMessages(paper, font, width, height - 26); + DrawMessages(paper, font, width, height - 33); } } @@ -96,11 +96,8 @@ private void DrawToolbar(Paper paper, Prowl.Scribe.FontFile font, float width) { using (paper.Row("con_toolbar") .Height(ToolbarHeight) - .ChildLeft(4) - .ChildRight(4) + .Margin(4, 4, 4, 0) .RowBetween(4) - .ChildTop(4) - .ChildBottom(0) .Enter()) { // Clear diff --git a/Prowl.Editor/Panels/GameViewPanel.cs b/Prowl.Editor/Panels/GameViewPanel.cs index d111cffe..0026cdbf 100644 --- a/Prowl.Editor/Panels/GameViewPanel.cs +++ b/Prowl.Editor/Panels/GameViewPanel.cs @@ -71,7 +71,7 @@ private void DrawToolbar(Paper paper, Prowl.Scribe.FontFile font, float width) paper.Box("gv_cam_count") .Width(UnitValue.Auto).Height(22).ChildLeft(4).ChildRight(4) .Text($"{EditorIcons.Camera} {camCount} camera(s)", font) - .TextColor(EditorTheme.TextDim) + .TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 3).Alignment(TextAlignment.MiddleRight); } } @@ -86,7 +86,7 @@ private void DrawGameView(Paper paper, Prowl.Scribe.FontFile font, float width, .Size(width, height) .BackgroundColor(Color.FromArgb(255, 20, 20, 22)) .Text("No scene loaded", font) - .TextColor(EditorTheme.TextDisabled) + .TextColor(EditorTheme.Ink300) .FontSize(EditorTheme.FontSize).Alignment(TextAlignment.MiddleCenter); return; } diff --git a/Prowl.Editor/Panels/HierarchyPanel.cs b/Prowl.Editor/Panels/HierarchyPanel.cs index 790290f1..fe85b86c 100644 --- a/Prowl.Editor/Panels/HierarchyPanel.cs +++ b/Prowl.Editor/Panels/HierarchyPanel.cs @@ -24,7 +24,9 @@ public class HierarchyPanel : DockPanel private Paper? _paper; private HashSet _renamingIds = new(); // GOs currently being renamed private string _renameText = ""; - private const float RowHeight = 22f; + + private const float ToolbarHeight = 30f; + // private const float RowHeight = 30f; private const float IndentSize = 16f; // Drag state @@ -60,9 +62,10 @@ public override void OnGUI(Paper paper, float width, float height) if (scene == null) { - paper.Box("hier_empty").Height(60) + paper.Box("hier_empty") + .Height(60) .Text("No Scene Loaded", font) - .TextColor(EditorTheme.TextDisabled) + .TextColor(EditorTheme.Ink300) .FontSize(EditorTheme.FontSize) .Alignment(TextAlignment.MiddleCenter); @@ -72,16 +75,23 @@ public override void OnGUI(Paper paper, float width, float height) } // Scene name header - paper.Box("hier_scene_name") - .Height(22).ChildLeft(8) - .BackgroundColor(EditorTheme.Darkest) - .Text($"{EditorIcons.Film} {scene.Name}", font) - .TextColor(EditorTheme.Text) - .FontSize(EditorTheme.FontSize - 1) - .Alignment(TextAlignment.MiddleLeft); + using (paper.Box("hier_scene_name") + .Height(EditorTheme.RowHeight) + .Margin(6, 6, 0, 6) + .Rounded(4) + .BackgroundColor(EditorTheme.Neutral200).Enter()) + { + paper.Box("hier_scene_name_text") + .Margin(8, 0) + .Height(EditorTheme.RowHeight) + .Text($"{EditorIcons.Film} {scene.Name}", font) + .TextColor(EditorTheme.Ink500) + .FontSize(EditorTheme.FontSize - 1) + .Alignment(TextAlignment.MiddleLeft); + } // Tree view - using (ScrollView.Begin(paper, "hier_scroll", width, height - RowHeight - 22)) + using (ScrollView.Begin(paper, "hier_scroll", width, height - EditorTheme.RowHeight - 22)) { var roots = GetDisplayRoots(scene); @@ -89,7 +99,7 @@ public override void OnGUI(Paper paper, float width, float height) { paper.Box("hier_empty_scene").Height(40) .Text("Scene is empty", font) - .TextColor(EditorTheme.TextDisabled) + .TextColor(EditorTheme.Ink300) .FontSize(EditorTheme.FontSize - 2) .Alignment(TextAlignment.MiddleCenter); } @@ -171,10 +181,10 @@ public override void OnGUI(Paper paper, float width, float height) if (DragDrop.IsDraggingType() && paper.IsParentHovered) { paper.Box("hier_drop_zone").Height(24) - .BackgroundColor(Color.FromArgb(40, EditorTheme.Accent)) + .BackgroundColor(Color.FromArgb(40, EditorTheme.Purple400)) .Rounded(3) .Text("Drop to spawn here", font) - .TextColor(EditorTheme.Accent) + .TextColor(EditorTheme.Purple400) .FontSize(EditorTheme.FontSize - 2) .Alignment(TextAlignment.MiddleCenter); } @@ -203,24 +213,28 @@ public override void OnGUI(Paper paper, float width, float height) private void DrawToolbar(Paper paper, Prowl.Scribe.FontFile font, float width) { using (paper.Row("hier_toolbar") - .Height(RowHeight) - .ChildLeft(4).ChildRight(4).RowBetween(4) - .ChildTop(2).ChildBottom(2) + .Height(ToolbarHeight) + .Margin(4, 4, 4, 0) + .RowBetween(4) .Enter()) { // Create button using (paper.Box("hier_add") - .Width(RowHeight - 4).Height(RowHeight - 4).Rounded(4) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() - .Text(EditorIcons.Plus, font).TextColor(EditorTheme.Text) - .FontSize(12f).Alignment(TextAlignment.MiddleCenter) + .Width(EditorTheme.RowHeight) + .Height(EditorTheme.RowHeight) + .Rounded(4) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() + .Text(EditorIcons.Plus, font) + .TextColor(EditorTheme.Ink500) + .FontSize(16f) + .Alignment(TextAlignment.MiddleCenter) .Enter()) { if (paper.IsParentHovered) { var builder = new ContextMenuBuilder(); BuildCreateMenu(builder, null); - builder.Render(paper, "hier_add_menu", 0, RowHeight - 4); + builder.Render(paper, "hier_add_menu", 0, EditorTheme.RowHeight - 4); } } @@ -260,17 +274,18 @@ private void DrawGameObjectNode(Paper paper, Prowl.Scribe.FontFile font, { paper.Box($"hier_drop_above_{goId}") .Height(2).ChildLeft(indent) - .BackgroundColor(EditorTheme.Accent); + .BackgroundColor(EditorTheme.Purple400); } - using (paper.Row($"hier_go_{goId}") - .Height(RowHeight) - .BackgroundColor(isSelected ? EditorTheme.Accent : + using (paper + .Row($"hier_go_{goId}") + .Height(EditorTheme.RowHeight) + .BackgroundColor(isSelected ? EditorTheme.Purple400 : (_dropTargetId == goId && _dropPos == DropPosition.Into) - ? Color.FromArgb(60, EditorTheme.Accent) : Color.Transparent) - .Hovered.BackgroundColor(isSelected ? EditorTheme.Accent : EditorTheme.ButtonHovered).End() - .Rounded(2) - .ChildLeft(indent + 2) + ? Color.FromArgb(60, EditorTheme.Purple400) : Color.Transparent) + .Hovered.BackgroundColor(isSelected ? EditorTheme.Purple400 : EditorTheme.Ink200).End() + .Rounded(4) + .Margin(indent + 8, 0, 0, 0) .OnClick((go, currentIndex, flatList), (cap, e) => { bool ctrl = _paper?.IsKeyDown(PaperKey.LeftControl) == true || _paper?.IsKeyDown(PaperKey.RightControl) == true; @@ -291,9 +306,10 @@ private void DrawGameObjectNode(Paper paper, Prowl.Scribe.FontFile font, if (hasChildren) { paper.Box($"hier_arr_{goId}") - .Width(14).Height(RowHeight) + .Width(14) + .Height(EditorTheme.RowHeight) .Text(isExpanded ? EditorIcons.AngleDown : EditorIcons.AngleRight, font) - .TextColor(EditorTheme.TextDim) + .TextColor(EditorTheme.Ink400) .FontSize(9f).Alignment(TextAlignment.MiddleCenter) .OnClick(goId, (id, _) => { @@ -303,14 +319,14 @@ private void DrawGameObjectNode(Paper paper, Prowl.Scribe.FontFile font, } else { - paper.Box($"hier_arr_{goId}").Width(14).Height(RowHeight); + paper.Box($"hier_arr_{goId}").Width(14).Height(EditorTheme.RowHeight); } // Icon paper.Box($"hier_ico_{goId}") - .Width(16).Height(RowHeight) + .Width(16).Height(EditorTheme.RowHeight) .Text(icon, font) - .TextColor(go.EnabledInHierarchy ? EditorTheme.TextDim : EditorTheme.TextDisabled) + .TextColor(go.EnabledInHierarchy ? EditorTheme.Ink400 : EditorTheme.Ink300) .FontSize(11f).Alignment(TextAlignment.MiddleCenter); // Name or rename field @@ -343,18 +359,18 @@ private void DrawGameObjectNode(Paper paper, Prowl.Scribe.FontFile font, else { paper.Box($"hier_name_{goId}") - .Height(RowHeight).ChildLeft(4) + .Height(EditorTheme.RowHeight).ChildLeft(4) .Text(go.Name, font) - .TextColor(go.EnabledInHierarchy ? EditorTheme.Text : EditorTheme.TextDisabled) + .TextColor(go.EnabledInHierarchy ? EditorTheme.Ink500 : EditorTheme.Ink300) .FontSize(EditorTheme.FontSize - 1) .Alignment(TextAlignment.MiddleLeft); } // Enable/disable toggle (eye icon) paper.Box($"hier_vis_{goId}") - .Width(18).Height(RowHeight) + .Width(18).Height(EditorTheme.RowHeight) .Text(go.Enabled ? EditorIcons.Eye : EditorIcons.EyeSlash, font) - .TextColor(go.Enabled ? EditorTheme.TextDim : EditorTheme.TextDisabled) + .TextColor(go.Enabled ? EditorTheme.Ink400 : EditorTheme.Ink300) .FontSize(9f).Alignment(TextAlignment.MiddleCenter) .StopEventPropagation() .OnClick(go, (g, _) => g.Enabled = !g.Enabled); @@ -368,7 +384,7 @@ private void DrawGameObjectNode(Paper paper, Prowl.Scribe.FontFile font, { paper.Box($"hier_drop_below_{goId}") .Height(2).ChildLeft(indent) - .BackgroundColor(EditorTheme.Accent); + .BackgroundColor(EditorTheme.Purple400); } // Draw children @@ -426,8 +442,8 @@ private void HandleDropTarget(Paper paper, GameObject go, string goId) float mouseY = Input.MousePosition.Y; float relY = mouseY - rowY; - float topZone = RowHeight * 0.25f; - float bottomZone = RowHeight * 0.75f; + float topZone = EditorTheme.RowHeight * 0.25f; + float bottomZone = EditorTheme.RowHeight * 0.75f; if (relY < topZone) { diff --git a/Prowl.Editor/Panels/InspectorPanel.cs b/Prowl.Editor/Panels/InspectorPanel.cs index 471e8fbd..259c5d61 100644 --- a/Prowl.Editor/Panels/InspectorPanel.cs +++ b/Prowl.Editor/Panels/InspectorPanel.cs @@ -89,13 +89,13 @@ private void DrawEmpty(Paper paper, Prowl.Scribe.FontFile font, float width) { paper.Box("insp_empty").Height(80) .Text("Nothing Selected", font) - .TextColor(EditorTheme.TextDisabled) + .TextColor(EditorTheme.Ink300) .FontSize(EditorTheme.FontSize) .Alignment(TextAlignment.MiddleCenter); paper.Box("insp_hint").Height(30) .Text("Select an asset or object to inspect it.", font) - .TextColor(EditorTheme.TextDisabled) + .TextColor(EditorTheme.Ink300) .FontSize(EditorTheme.FontSize - 4) .Alignment(TextAlignment.MiddleCenter); } @@ -135,7 +135,7 @@ private void DrawSelectionHeader(Paper paper, Prowl.Scribe.FontFile font, object .BackgroundColor(Color.FromArgb(30, 255, 255, 255)) .Rounded(6) .Text(icon, font) - .TextColor(EditorTheme.Accent) + .TextColor(EditorTheme.Purple400) .FontSize(18f) .Alignment(TextAlignment.MiddleCenter); @@ -144,14 +144,14 @@ private void DrawSelectionHeader(Paper paper, Prowl.Scribe.FontFile font, object paper.Box("insp_h_name") .Height(18) .Text(name, font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize) .Alignment(TextAlignment.MiddleLeft); paper.Box("insp_h_type") .Height(14) .Text(typeName, font) - .TextColor(EditorTheme.TextDim) + .TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 4) .Alignment(TextAlignment.MiddleLeft); } @@ -291,14 +291,14 @@ private void DrawSubAssetInspector(Paper paper, Prowl.Scribe.FontFile font, Cont .BackgroundColor(System.Drawing.Color.FromArgb(255, 80, 80, 100)) .Rounded(4) .Text("Sub-Asset", font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize - 3) .Alignment(TextAlignment.MiddleCenter); paper.Box("insp_sub_name") .Height(28) .Text(item.Name, font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize) .Alignment(TextAlignment.MiddleLeft); } diff --git a/Prowl.Editor/Panels/PreferencesPanel.cs b/Prowl.Editor/Panels/PreferencesPanel.cs index ec4528e4..6fa87f2f 100644 --- a/Prowl.Editor/Panels/PreferencesPanel.cs +++ b/Prowl.Editor/Panels/PreferencesPanel.cs @@ -31,12 +31,12 @@ public override void OnGUI(Paper paper, float width, float height) float sideW = 160f; using (paper.Column("pref_sidebar") .Width(sideW).Height(height) - .BackgroundColor(EditorTheme.Darkest) + .BackgroundColor(EditorTheme.Neutral200) .Enter()) { paper.Box("pref_sidebar_hdr") .Height(28).ChildLeft(8) - .Text("Preferences", font).TextColor(EditorTheme.Text) + .Text("Preferences", font).TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize).Alignment(TextAlignment.MiddleLeft); EditorGUI.Separator(paper, "pref_sidebar_sep"); @@ -45,7 +45,7 @@ public override void OnGUI(Paper paper, float width, float height) DrawTabBtn(paper, font, "Theme", EditorIcons.Palette, Tab.Theme); } - paper.Box("pref_div").Width(1).Height(height).BackgroundColor(EditorTheme.Border); + paper.Box("pref_div").Width(1).Height(height).BackgroundColor(EditorTheme.Ink200); float contentW = width - sideW - 1; using (ScrollView.Begin(paper, "pref_content", contentW, height)) @@ -66,10 +66,10 @@ private void DrawTabBtn(Paper paper, Prowl.Scribe.FontFile font, string label, s bool sel = _tab == tab; paper.Box($"pref_tab_{tab}") .Height(26).ChildLeft(8).Rounded(3) - .BackgroundColor(sel ? EditorTheme.Accent : Color.Transparent) - .Hovered.BackgroundColor(sel ? EditorTheme.Accent : EditorTheme.ButtonHovered).End() + .BackgroundColor(sel ? EditorTheme.Purple400 : Color.Transparent) + .Hovered.BackgroundColor(sel ? EditorTheme.Purple400 : EditorTheme.Ink200).End() .Text($"{icon} {label}", font) - .TextColor(sel ? EditorTheme.Text : EditorTheme.TextDim) + .TextColor(sel ? EditorTheme.Ink500 : EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 1) .Alignment(TextAlignment.MiddleLeft) .OnClick(tab, (t, _) => _tab = t); diff --git a/Prowl.Editor/Panels/ProjectPanel.cs b/Prowl.Editor/Panels/ProjectPanel.cs index 7c9ab929..44096509 100644 --- a/Prowl.Editor/Panels/ProjectPanel.cs +++ b/Prowl.Editor/Panels/ProjectPanel.cs @@ -33,7 +33,7 @@ public class ProjectPanel : DockPanel private const float MaxThumbSize = 128f; private const float ListThreshold = 32f; // Below this = list view - private const float ToolbarHeight = 30f; + private const float ToolbarHeight = 30; private const float FolderTreeWidth = 180f; public override void OnGUI(Paper paper, float width, float height) @@ -194,8 +194,8 @@ private void DrawFolderNode(Paper paper, Prowl.Scribe.FontFile font, string abso using (paper.Row($"proj_fn_{relativePath.GetHashCode()}") .Height(22) - .BackgroundColor(isSelected ? EditorTheme.Neutral400 : Color.Transparent) - .Hovered.BackgroundColor(EditorTheme.Neutral500).End() + .BackgroundColor(isSelected ? EditorTheme.Ink100 : Color.Transparent) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .Rounded(3) .ChildLeft(indent + 4) .OnClick(relativePath, (path, _) => _currentFolder = path) @@ -295,7 +295,7 @@ private void DrawContent(Paper paper, Prowl.Scribe.FontFile font, float width, f // Breadcrumb DrawBreadcrumb(paper, font, width, 20); - using (ScrollView.Begin(paper, "proj_content", width, height - 20)) + using (ScrollView.Begin(paper, "proj_content", width, height - 31)) { using (paper.Column("proj_content_inner") .Margin(6, 0, 0, 6) diff --git a/Prowl.Editor/Panels/ProjectSettingsPanel.cs b/Prowl.Editor/Panels/ProjectSettingsPanel.cs index df174c04..b17e9cda 100644 --- a/Prowl.Editor/Panels/ProjectSettingsPanel.cs +++ b/Prowl.Editor/Panels/ProjectSettingsPanel.cs @@ -25,7 +25,7 @@ public override void OnGUI(Paper paper, float width, float height) { paper.Box("ps_empty").Size(width, height) .Text("No settings registered", font) - .TextColor(EditorTheme.TextDisabled) + .TextColor(EditorTheme.Ink300) .FontSize(EditorTheme.FontSize) .Alignment(TextAlignment.MiddleCenter); return; @@ -39,12 +39,12 @@ public override void OnGUI(Paper paper, float width, float height) float sidebarW = 180f; using (paper.Column("ps_sidebar") .Width(sidebarW).Height(height) - .BackgroundColor(EditorTheme.Darkest) + .BackgroundColor(EditorTheme.Neutral200) .Enter()) { paper.Box("ps_sidebar_header") .Height(28).ChildLeft(8) - .Text("Settings", font).TextColor(EditorTheme.Text) + .Text("Settings", font).TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize).Alignment(TextAlignment.MiddleLeft); EditorGUI.Separator(paper, "ps_sidebar_sep"); @@ -58,10 +58,10 @@ public override void OnGUI(Paper paper, float width, float height) paper.Box($"ps_cat_{i}") .Height(26).ChildLeft(8).Rounded(3) - .BackgroundColor(isSelected ? EditorTheme.Accent : Color.Transparent) - .Hovered.BackgroundColor(isSelected ? EditorTheme.Accent : EditorTheme.ButtonHovered).End() + .BackgroundColor(isSelected ? EditorTheme.Purple400 : Color.Transparent) + .Hovered.BackgroundColor(isSelected ? EditorTheme.Purple400 : EditorTheme.Ink200).End() .Text($"{icon} {entry.Name}", font) - .TextColor(isSelected ? EditorTheme.Text : EditorTheme.TextDim) + .TextColor(isSelected ? EditorTheme.Ink500 : EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 1) .Alignment(TextAlignment.MiddleLeft) .OnClick(idx, (id, _) => _selectedIndex = id); @@ -69,7 +69,7 @@ public override void OnGUI(Paper paper, float width, float height) } // Separator - paper.Box("ps_divider").Width(1).Height(height).BackgroundColor(EditorTheme.Border); + paper.Box("ps_divider").Width(1).Height(height).BackgroundColor(EditorTheme.Ink200); // Right content — selected settings float contentW = width - sidebarW - 1; diff --git a/Prowl.Editor/Panels/SceneViewPanel.cs b/Prowl.Editor/Panels/SceneViewPanel.cs index 91d136d4..5324531e 100644 --- a/Prowl.Editor/Panels/SceneViewPanel.cs +++ b/Prowl.Editor/Panels/SceneViewPanel.cs @@ -61,45 +61,45 @@ private void DrawToolbar(Paper paper, Prowl.Scribe.FontFile font, float width) paper.Box("sv_move_btn") .Width(24).Height(24).Rounded(4) - .BackgroundColor(isTranslate ? EditorTheme.Accent : Color.Transparent) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() - .Text(EditorIcons.ArrowsUpDownLeftRight, font).TextColor(EditorTheme.Text) + .BackgroundColor(isTranslate ? EditorTheme.Purple400 : Color.Transparent) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() + .Text(EditorIcons.ArrowsUpDownLeftRight, font).TextColor(EditorTheme.Ink500) .FontSize(11f).Alignment(TextAlignment.MiddleCenter) .OnClick(0, (_, _) => SetGizmoMode(Gizmo.TransformGizmoMode.Translate)); paper.Box("sv_rotate_btn") .Width(24).Height(24).Rounded(4) - .BackgroundColor(isRotate ? EditorTheme.Accent : Color.Transparent) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() - .Text(EditorIcons.ArrowsRotate, font).TextColor(EditorTheme.Text) + .BackgroundColor(isRotate ? EditorTheme.Purple400 : Color.Transparent) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() + .Text(EditorIcons.ArrowsRotate, font).TextColor(EditorTheme.Ink500) .FontSize(11f).Alignment(TextAlignment.MiddleCenter) .OnClick(0, (_, _) => SetGizmoMode(Gizmo.TransformGizmoMode.Rotate)); paper.Box("sv_scale_btn") .Width(24).Height(24).Rounded(4) - .BackgroundColor(isScale ? EditorTheme.Accent : Color.Transparent) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() - .Text(EditorIcons.Maximize, font).TextColor(EditorTheme.Text) + .BackgroundColor(isScale ? EditorTheme.Purple400 : Color.Transparent) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() + .Text(EditorIcons.Maximize, font).TextColor(EditorTheme.Ink500) .FontSize(11f).Alignment(TextAlignment.MiddleCenter) .OnClick(0, (_, _) => SetGizmoMode(Gizmo.TransformGizmoMode.ScaleAll)); paper.Box("sv_universal_btn") .Width(24).Height(24).Rounded(4) - .BackgroundColor(isUniversal ? EditorTheme.Accent : Color.Transparent) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() - .Text(EditorIcons.Expand, font).TextColor(EditorTheme.Text) + .BackgroundColor(isUniversal ? EditorTheme.Purple400 : Color.Transparent) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() + .Text(EditorIcons.Expand, font).TextColor(EditorTheme.Ink500) .FontSize(11f).Alignment(TextAlignment.MiddleCenter) .OnClick(0, (_, _) => SetGizmoMode(Gizmo.TransformGizmoMode.Universal)); - paper.Box("sv_sep_1").Width(1).Height(18).BackgroundColor(EditorTheme.Border); + paper.Box("sv_sep_1").Width(1).Height(18).BackgroundColor(EditorTheme.Ink200); // Grid toggle bool showGrid = _editorCamera?.ShowGrid ?? true; paper.Box("sv_grid_btn") .Width(24).Height(24).Rounded(4) - .BackgroundColor(showGrid ? EditorTheme.Accent : Color.Transparent) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() - .Text(EditorIcons.TableCellsLarge, font).TextColor(EditorTheme.Text) + .BackgroundColor(showGrid ? EditorTheme.Purple400 : Color.Transparent) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() + .Text(EditorIcons.TableCellsLarge, font).TextColor(EditorTheme.Ink500) .FontSize(11f).Alignment(TextAlignment.MiddleCenter) .OnClick(0, (_, _) => { if (_editorCamera != null) _editorCamera.ShowGrid = !_editorCamera.ShowGrid; }); @@ -114,7 +114,7 @@ private void DrawToolbar(Paper paper, Prowl.Scribe.FontFile font, float width) // paper.Box("sv_cam_info") // .Width(UnitValue.Auto).Height(24) // .ChildLeft(4).ChildRight(4) - // .Text(info, font).TextColor(EditorTheme.TextDim) + // .Text(info, font).TextColor(EditorTheme.Ink400) // .FontSize(EditorTheme.FontSize - 4).Alignment(TextAlignment.MiddleRight); //} } @@ -144,7 +144,7 @@ private void DrawViewport(Paper paper, Prowl.Scribe.FontFile font, float width, paper.Box("sv_no_scene_text") .Height(30) .Text("No Scene Loaded", font) - .TextColor(EditorTheme.TextDisabled) + .TextColor(EditorTheme.Ink300) .FontSize(EditorTheme.FontSize) .Alignment(TextAlignment.MiddleCenter); @@ -237,7 +237,7 @@ private void DrawViewport(Paper paper, Prowl.Scribe.FontFile font, float width, .BackgroundColor(Color.FromArgb(150, 30, 30, 35)) .IsNotInteractable() .Text($"{EditorIcons.ArrowDown} Drop to spawn in scene", font) - .TextColor(EditorTheme.Accent) + .TextColor(EditorTheme.Purple400) .FontSize(EditorTheme.FontSize - 2) .Alignment(TextAlignment.MiddleCenter); } diff --git a/Prowl.Editor/Panels/WidgetPlaygroundPanel.cs b/Prowl.Editor/Panels/WidgetPlaygroundPanel.cs index 2684bde7..317d5bb5 100644 --- a/Prowl.Editor/Panels/WidgetPlaygroundPanel.cs +++ b/Prowl.Editor/Panels/WidgetPlaygroundPanel.cs @@ -166,7 +166,7 @@ public override void OnGUI(Paper paper, float width, float height) .FontSize(EditorTheme.FontSize) .TextField(_textValue, EditorTheme.DefaultFont!, onChange: v => _textValue = v, - textColor: EditorTheme.Text); + textColor: EditorTheme.Ink500); EditorGUI.Separator(paper, "sep_raw"); @@ -330,9 +330,9 @@ public override void OnGUI(Paper paper, float width, float height) using (paper.Box("ctx_demo_area") .Height(60) - .BackgroundColor(EditorTheme.InputBackground) + .BackgroundColor(EditorTheme.Neutral300) .Rounded(6) - .BorderColor(EditorTheme.Border).BorderWidth(1) + .BorderColor(EditorTheme.Ink200).BorderWidth(1) .ChildLeft(16).ChildTop(8) .Enter()) { @@ -340,7 +340,7 @@ public override void OnGUI(Paper paper, float width, float height) paper.Box("ctx_hint") .IsNotInteractable() .Text("Right-click here for a context menu", EditorTheme.DefaultFont) - .TextColor(EditorTheme.TextDim).FontSize(EditorTheme.FontSize); + .TextColor(EditorTheme.Ink400).FontSize(EditorTheme.FontSize); ContextMenuHelper.RightClickMenu(paper, "ctx_test", menu => { @@ -400,14 +400,14 @@ public override void OnGUI(Paper paper, float width, float height) var tooltipBtn = paper.Box("tooltip_demo") .Height(EditorTheme.RowHeight) .Width(200) - .BackgroundColor(EditorTheme.ButtonNormal) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() + .BackgroundColor(EditorTheme.Ink100) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .Rounded(3) - .BorderColor(EditorTheme.Border).BorderWidth(1) + .BorderColor(EditorTheme.Ink200).BorderWidth(1) .Tooltip("This is a tooltip! It appears after a short hover delay."); if (EditorTheme.DefaultFont != null) tooltipBtn.Text("Hover me for tooltip", EditorTheme.DefaultFont) - .TextColor(EditorTheme.Text).FontSize(EditorTheme.FontSize); + .TextColor(EditorTheme.Ink500).FontSize(EditorTheme.FontSize); EditorGUI.Separator(paper, "sep13"); diff --git a/Prowl.Editor/Program.cs b/Prowl.Editor/Program.cs index f6e26bc7..acbd0ec1 100644 --- a/Prowl.Editor/Program.cs +++ b/Prowl.Editor/Program.cs @@ -5,6 +5,6 @@ public static class Program public static void Main(string[] args) { var editor = new EditorApplication(); - editor.Run("Prowl Editor", 1600, 900); + editor.Run("Prowl Editor", 1200, 800); } } diff --git a/Prowl.Editor/Project/ProjectLauncher.cs b/Prowl.Editor/Project/ProjectLauncher.cs index 37f32ebc..54b900bf 100644 --- a/Prowl.Editor/Project/ProjectLauncher.cs +++ b/Prowl.Editor/Project/ProjectLauncher.cs @@ -52,119 +52,175 @@ public static void Draw(Paper paper, float dt, bool forceDraw = false) int h = Window.InternalWindow.Size.Y; // Full background - paper.Box("pl_bg") - .PositionType(PositionType.SelfDirected) - .Position(0, 0).Size(w, h) - .BackgroundColor(EditorTheme.Neutral100) - .OnPostLayout((handle, rect) => paper.Draw(ref handle, (canvas, r) => - { - float cx = w / 2f; - float cy = h / 2f; - float radius = Math.Max(cx, cy) * 1.2f; - float t = _animTime * 0.05f; - var transparent = Prowl.Vector.Color32.FromArgb(0, 0, 0, 0); - - // Subtle background gradients (same as editor but dimmer) - float px = cx + (float)Math.Sin(t) * cx * 0.6f; - float py = cy + (float)Math.Sin(t * 2) * cy * 0.3f; - var purple = Prowl.Vector.Color32.FromArgb(25, 140, 60, 200); - canvas.SetRadialBrush(px, py, 0, radius, purple, transparent); - canvas.BeginPath(); - canvas.Rect(0, 0, w, h); - canvas.Fill(); - - float bx = cx - (float)Math.Sin(t) * cx * 0.6f; - float by = cy - (float)Math.Sin(t * 2) * cy * 0.3f; - var blue = Prowl.Vector.Color32.FromArgb(25, 60, 140, 220); - canvas.SetRadialBrush(bx, by, 0, radius, blue, transparent); - canvas.BeginPath(); - canvas.Rect(0, 0, w, h); - canvas.Fill(); - })); + // paper.Box("pl_bg") + // .PositionType(PositionType.SelfDirected) + // .Position(0, 0) + // .Size(w, h) + // .BackgroundColor(EditorTheme.Neutral100) + // .OnPostLayout((handle, rect) => paper.Draw(ref handle, (canvas, r) => + // { + // float cx = w / 2f; + // float cy = h / 2f; + // float radius = Math.Max(cx, cy) * 1.2f; + // float t = _animTime * 0.05f; + // var transparent = Prowl.Vector.Color32.FromArgb(0, 0, 0, 0); + + // // Subtle background gradients (same as editor but dimmer) + // float px = cx + (float)Math.Sin(t) * cx * 0.6f; + // float py = cy + (float)Math.Sin(t * 2) * cy * 0.3f; + // var purple = Prowl.Vector.Color32.FromArgb(25, 140, 60, 200); + // canvas.SetRadialBrush(px, py, 0, radius, purple, transparent); + // canvas.BeginPath(); + // canvas.Rect(0, 0, w, h); + // canvas.Fill(); + + // float bx = cx - (float)Math.Sin(t) * cx * 0.6f; + // float by = cy - (float)Math.Sin(t * 2) * cy * 0.3f; + // var blue = Prowl.Vector.Color32.FromArgb(25, 60, 140, 220); + // canvas.SetRadialBrush(bx, by, 0, radius, blue, transparent); + // canvas.BeginPath(); + // canvas.Rect(0, 0, w, h); + // canvas.Fill(); + // })); // Center card - float cardW = 600f; - float cardH = 500f; + // float cardW = 600f; + // float cardH = 500f; - using (paper.Column("pl_card") - .Size(cardW, cardH) - .Margin(UnitValue.StretchOne) - .BackgroundColor(EditorTheme.Neutral300) - .BorderColor(EditorTheme.Ink200) + float sidebarW = 200f; + + using (paper.Row("root") + .PositionType(PositionType.SelfDirected) + .Position(0, 0) + .Size(w, h) + .BorderColor(EditorTheme.Ink100) .BorderWidth(1) - .Rounded(EditorTheme.Roundness) + .BackgroundColor(EditorTheme.Neutral300) .Enter()) { - // Header - using (paper.Row("pl_header") - .Height(60) - .BackgroundColor(EditorTheme.Neutral200) - .RoundedTop(EditorTheme.Roundness) - .ChildLeft(24) - .ChildRight(24) - .RowBetween(12) + using (paper.Column("sidebar") + .BackgroundColor(EditorTheme.Neutral400) + .Size(sidebarW, h) + .BorderColor(EditorTheme.Ink100) + .BorderWidth(1) .Enter()) { - paper.Box("pl_title") + + // Prowl Emblem + using (paper.Row("pl_header") .Height(60) - .Text("PROWL", boldFont) - .TextColor(EditorTheme.Ink500) - .FontSize(28f) - .Alignment(TextAlignment.MiddleLeft); - - // Spacer - paper.Box("pl_spacer"); - - paper.Box("pl_version") - .Height(60).Width(80) - .Text("v0.0.1", font) - .TextColor(EditorTheme.Ink400) - .FontSize(12f) - .Alignment(TextAlignment.MiddleRight); + .RowBetween(12) + .BackgroundColor(EditorTheme.Neutral300) + .BorderColor(EditorTheme.Ink100) + .BorderWidth(1) + .Enter()) + { + paper.Box("pl_title") + .Height(60) + .Margin(16, 16, 0, 8) + .Text("PROWL", boldFont) + .TextColor(EditorTheme.Ink500) + .FontSize(28f) + .Alignment(TextAlignment.MiddleLeft); + + // Spacer + paper.Box("pl_spacer"); + + paper.Box("pl_version") + .Height(60) + .Width(80) + .Margin(16, 16, 12, 8) + .Text("v0.0.1", font) + .TextColor(EditorTheme.Ink400) + .FontSize(12f) + .Alignment(TextAlignment.MiddleRight); + } + + paper.Box("spacer").Height(UnitValue.Stretch()); + + // Links + using (paper.Column("pl_header") + .Height(60) + .ColBetween(12) + .Margin(16, 12) + .Enter()) + { + EditorGUI.Button(paper, "yt_link", "YouTube").OnValueChanged((_) => + { + WebService.OpenUrl("https://youtube.com/@prowlengine"); + }); + + EditorGUI.Button(paper, "gh_link", "GitHub").OnValueChanged((_) => + { + WebService.OpenUrl("https://github.com/ProwlEngine/Prowl"); + }); + } } - // Toolbar: New / Open buttons - using (paper.Row("pl_toolbar") - .Height(40) - .ChildLeft(10) - .ChildRight(10) - .ChildTop(8) - .RowBetween(8) + using (paper.Column("content") + .Size(w - sidebarW, h) .Enter()) { - EditorGUI.Button(paper, "pl_btn_new", $"{EditorIcons.Plus} New Project") - .OnValueChanged(_ => _showNewProject = !_showNewProject); + // New / Open buttons + using (paper.Row("toolbar") + .Height(40) + .Margin(10, 10, 32, 0) + .RowBetween(8) + .Enter()) + { + paper.Box("tl_label") + .Width(UnitValue.Auto) + .Height(EditorTheme.RowHeight) + .Text("Projects", boldFont) + .TextColor(EditorTheme.Ink500) + .FontSize(EditorTheme.FontSize + 8) + .Alignment(TextAlignment.MiddleLeft); - EditorGUI.Button(paper, "pl_btn_open", $"{EditorIcons.FolderOpen} Open Project") - .OnValueChanged(_ => - { - FileDialog.Open(FileDialogMode.SelectFolder, path => + // Spacer + paper.Box("tl_tb_spacer"); + + // Spacer + EditorGUI.SearchBar(paper, "search", "", "Search"); + + EditorGUI.Button(paper, "tl_btn_open", $"{EditorIcons.FolderOpen} Open Project", 130) + .OnValueChanged(_ => { - if (path == null) return; - TryOpenProject(path); + FileDialog.Open(FileDialogMode.SelectFolder, path => + { + if (path == null) return; + TryOpenProject(path); + }); }); - }); - // Spacer - paper.Box("pl_tb_spacer"); + using (paper.Box("tl_btn_new") + .Height(EditorTheme.RowHeight) + .Width(120) + .BackgroundColor(EditorTheme.Blue300) + .Hovered.BackgroundColor(EditorTheme.Blue400).End() + .Rounded(3) + .BorderColor(EditorTheme.Blue400) + .BorderWidth(1) + .OnClick((_) => _showNewProject = !_showNewProject) + .Enter()) { + paper.Box($"label") + .Height(EditorTheme.RowHeight) + .Margin(EditorTheme.RowHeight / 4, 0) + .Alignment(PaperUI.TextAlignment.MiddleLeft) + .Text($" {EditorIcons.Plus} New Project", EditorTheme.DefaultFont) + .TextColor(EditorTheme.Ink500) + .FontSize(EditorTheme.FontSize); + } + } - paper.Box("pl_recent_label") - .Width(UnitValue.Auto) - .Height(EditorTheme.RowHeight) - .Text("Recent Projects", font) - .TextColor(EditorTheme.Ink300) - .FontSize(EditorTheme.FontSize - 2) - .Alignment(TextAlignment.MiddleRight); - } + // New project panel (collapsible) + if (_showNewProject) + { + DrawNewProjectPanel(paper, font); + } - // New project panel (collapsible) - if (_showNewProject) - { - DrawNewProjectPanel(paper, font); + // Recent projects list + DrawRecentProjects(paper, font, w - sidebarW, h - 60 - 40 - (_showNewProject ? 80 : 0)); } - - // Recent projects list - DrawRecentProjects(paper, font, cardW, cardH - 60 - 40 - (_showNewProject ? 80 : 0)); } } diff --git a/Prowl.Editor/Settings/TagsAndLayersSettings.cs b/Prowl.Editor/Settings/TagsAndLayersSettings.cs index 965b3c49..114af728 100644 --- a/Prowl.Editor/Settings/TagsAndLayersSettings.cs +++ b/Prowl.Editor/Settings/TagsAndLayersSettings.cs @@ -48,7 +48,7 @@ public override void OnGUI(Paper paper, float width) paper.Box($"tl_tag_name_{i}") .Height(22).ChildLeft(4) .Text(Tags[i], font) - .TextColor(isBuiltin ? EditorTheme.TextDim : EditorTheme.Text) + .TextColor(isBuiltin ? EditorTheme.Ink400 : EditorTheme.Ink500) .FontSize(EditorTheme.FontSize - 1) .Alignment(TextAlignment.MiddleLeft); @@ -56,8 +56,8 @@ public override void OnGUI(Paper paper, float width) { paper.Box($"tl_tag_del_{i}") .Width(20).Height(22).Rounded(3) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() - .Text(EditorIcons.Xmark, font).TextColor(EditorTheme.TextDim) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() + .Text(EditorIcons.Xmark, font).TextColor(EditorTheme.Ink400) .FontSize(9f).Alignment(TextAlignment.MiddleCenter) .OnClick(idx, (id, _) => { @@ -98,13 +98,13 @@ public override void OnGUI(Paper paper, float width) { paper.Box($"tl_layer_idx_{i}") .Width(24).Height(22) - .Text(i.ToString(), font).TextColor(EditorTheme.TextDim) + .Text(i.ToString(), font).TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 2) .Alignment(TextAlignment.MiddleRight); paper.Box($"tl_layer_name_{i}") .Height(22).ChildLeft(4) - .Text(Layers[i], font).TextColor(EditorTheme.TextDim) + .Text(Layers[i], font).TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 1) .Alignment(TextAlignment.MiddleLeft); } diff --git a/Prowl.Editor/WebService.cs b/Prowl.Editor/WebService.cs new file mode 100644 index 00000000..142fe17c --- /dev/null +++ b/Prowl.Editor/WebService.cs @@ -0,0 +1,34 @@ +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace Prowl.Editor; + +public static class WebService +{ + public static void OpenUrl(string url) + { + try + { + // For Windows: Launching via shell + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + Process.Start(new ProcessStartInfo(url) { UseShellExecute = true }); + } + // For macOS: Use the 'open' command + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + Process.Start("open", url); + } + // For Linux: Use 'xdg-open' + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + Process.Start("xdg-open", url); + } + } + catch (Exception ex) + { + Console.WriteLine($"Unable to open link: {ex.Message}"); + } + } +} \ No newline at end of file diff --git a/Prowl.Editor/Widgets/ColorPicker.cs b/Prowl.Editor/Widgets/ColorPicker.cs index 11365f95..9b01fa0b 100644 --- a/Prowl.Editor/Widgets/ColorPicker.cs +++ b/Prowl.Editor/Widgets/ColorPicker.cs @@ -26,8 +26,8 @@ public static void Draw(Paper paper, string id, Prowl.Vector.Color value, Action using (paper.Column(id) .Width(280) .Height(UnitValue.Auto) - .BackgroundColor(EditorTheme.PanelBackground) - .BorderColor(EditorTheme.Border).BorderWidth(1) + .BackgroundColor(EditorTheme.Neutral300) + .BorderColor(EditorTheme.Ink200).BorderWidth(1) .Rounded(6) .ChildLeft(8).ChildRight(8).ChildTop(8).ChildBottom(8) .RowBetween(6) @@ -58,16 +58,16 @@ public static void Draw(Paper paper, string id, Prowl.Vector.Color value, Action // === Preview === using (paper.Row($"{id}_prev").Height(24).RowBetween(6).Enter()) { - paper.Box($"{id}_old").Size(40, 24).Rounded(3).BorderColor(EditorTheme.Border).BorderWidth(1) + paper.Box($"{id}_old").Size(40, 24).Rounded(3).BorderColor(EditorTheme.Ink200).BorderWidth(1) .BackgroundColor(SysColor.FromArgb((int)(value.A*255),(int)(value.R*255),(int)(value.G*255),(int)(value.B*255))); var nc = HSVToColor(h, s, v, a); - paper.Box($"{id}_new").Size(40, 24).Rounded(3).BorderColor(EditorTheme.Border).BorderWidth(1) + paper.Box($"{id}_new").Size(40, 24).Rounded(3).BorderColor(EditorTheme.Ink200).BorderWidth(1) .BackgroundColor(SysColor.FromArgb((int)(nc.A*255),(int)(nc.R*255),(int)(nc.G*255),(int)(nc.B*255))); if (font != null) { int ri=(int)(nc.R*255), gi=(int)(nc.G*255), bi=(int)(nc.B*255); paper.Box($"{id}_hex").Width(UnitValue.Stretch()).Height(24).ChildLeft(4).IsNotInteractable() - .Text($"#{ri:X2}{gi:X2}{bi:X2}{(int)(a*255):X2}", font).TextColor(EditorTheme.Text).FontSize(fontSize); + .Text($"#{ri:X2}{gi:X2}{bi:X2}{(int)(a*255):X2}", font).TextColor(EditorTheme.Ink500).FontSize(fontSize); } } @@ -79,7 +79,7 @@ public static void Draw(Paper paper, string id, Prowl.Vector.Color value, Action { var nc2 = new Prowl.Vector.Color(c.R,ng,c.B,c.A); SyncHSV(paper,el,nc2); onChange(nc2); }); ChannelSlider(paper, $"{id}_b", "B", c.B, SysColor.FromArgb(255,60,60,200), font, fontSize, nb => { var nc2 = new Prowl.Vector.Color(c.R,c.G,nb,c.A); SyncHSV(paper,el,nc2); onChange(nc2); }); - ChannelSlider(paper, $"{id}_a2", "A", a, EditorTheme.Text, font, fontSize, na => + ChannelSlider(paper, $"{id}_a2", "A", a, EditorTheme.Ink500, font, fontSize, na => { paper.SetElementStorage(el,"a",na); onChange(HSVToColor(paper.GetElementStorage(el,"h",h),paper.GetElementStorage(el,"s",s),paper.GetElementStorage(el,"v",v),na)); }); // === Color Palette === @@ -95,7 +95,7 @@ static void DrawPalette(Paper paper, string id, ElementHandle el, FontFile? font if (palette == null || palette.Count == 0) return; // Separator - paper.Box($"{id}_sep").Height(1).BackgroundColor(EditorTheme.Border); + paper.Box($"{id}_sep").Height(1).BackgroundColor(EditorTheme.Ink200); // Palette grid — laid out as rows of swatches const float swatchSize = 16f; @@ -124,8 +124,8 @@ static void DrawPalette(Paper paper, string id, ElementHandle el, FontFile? font .Size(swatchSize, swatchSize) .BackgroundColor(sc) .Rounded(2) - .BorderColor(EditorTheme.Border).BorderWidth(1) - .Hovered.BorderColor(EditorTheme.Accent).End() + .BorderColor(EditorTheme.Ink200).BorderWidth(1) + .Hovered.BorderColor(EditorTheme.Purple400).End() .OnClick(idx, (ci, _) => { var c = ColorRamp.ParseHex(palette[ci]); @@ -144,10 +144,10 @@ static void DrawPalette(Paper paper, string id, ElementHandle el, FontFile? font // Add button paper.Box($"{id}_add") .Size(swatchSize, swatchSize) - .BackgroundColor(EditorTheme.ButtonNormal) + .BackgroundColor(EditorTheme.Ink100) .Rounded(2) - .BorderColor(EditorTheme.Border).BorderWidth(1) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() + .BorderColor(EditorTheme.Ink200).BorderWidth(1) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .OnPostLayout((handle, rect) => paper.Draw(ref handle, (canvas, r) => { float cx = (float)r.Min.X + (float)r.Size.X / 2f; @@ -271,7 +271,7 @@ static void ChannelSlider(Paper paper, string id, string label, float value, Sys { if (font != null) paper.Box($"{id}_l").Width(14).IsNotInteractable().Text(label, font).TextColor(labelColor).FontSize(fontSize); paper.Box($"{id}_t").Height(SliderHeight).Width(UnitValue.Stretch()) - .BackgroundColor(EditorTheme.InputBackground).Rounded(2) + .BackgroundColor(EditorTheme.Neutral300).Rounded(2) .OnClick(e => onChange(Math.Clamp((float)e.NormalizedPosition.X, 0, 1))) .OnDragging(e => onChange(Math.Clamp((float)e.NormalizedPosition.X, 0, 1))) .OnPostLayout((handle, rect) => paper.Draw(ref handle, (canvas, r) => @@ -281,7 +281,7 @@ static void ChannelSlider(Paper paper, string id, string label, float value, Sys canvas.RoundedRectFilled((float)r.Min.X,(float)r.Min.Y,fillW,(float)r.Size.Y,2,0,0,2, new Prowl.Vector.Color(labelColor.R/255f,labelColor.G/255f,labelColor.B/255f,0.7f)); })); - if (font != null) paper.Box($"{id}_v").Width(28).IsNotInteractable().Text($"{(int)(value*255)}", font).TextColor(EditorTheme.Text).FontSize(fontSize); + if (font != null) paper.Box($"{id}_v").Width(28).IsNotInteractable().Text($"{(int)(value*255)}", font).TextColor(EditorTheme.Ink500).FontSize(fontSize); } } diff --git a/Prowl.Editor/Widgets/ContextMenuBuilder.cs b/Prowl.Editor/Widgets/ContextMenuBuilder.cs index 034db863..a44c0fdb 100644 --- a/Prowl.Editor/Widgets/ContextMenuBuilder.cs +++ b/Prowl.Editor/Widgets/ContextMenuBuilder.cs @@ -72,7 +72,7 @@ public void Render(Paper paper, string id, float x, float y) continue; } - var textColor = item.IsEnabled ? EditorTheme.Text : EditorTheme.TextDisabled; + var textColor = item.IsEnabled ? EditorTheme.Ink500 : EditorTheme.Ink300; using (paper.Row($"{id}_i_{i}") .Height(EditorTheme.RowHeight) diff --git a/Prowl.Editor/Widgets/CurveEditor.cs b/Prowl.Editor/Widgets/CurveEditor.cs index a3f5b6f4..78c36455 100644 --- a/Prowl.Editor/Widgets/CurveEditor.cs +++ b/Prowl.Editor/Widgets/CurveEditor.cs @@ -33,13 +33,13 @@ public static WidgetResult CurveField(Paper paper, string id, st .Width(EditorTheme.LabelWidth).Height(40).ChildLeft(4) .IsNotInteractable() .Text(label, EditorTheme.DefaultFont) - .TextColor(EditorTheme.Text).FontSize(EditorTheme.FontSize); + .TextColor(EditorTheme.Ink500).FontSize(EditorTheme.FontSize); using (paper.Box($"{id}_preview") .Height(40).Width(UnitValue.Stretch()) - .BackgroundColor(EditorTheme.InputBackground) - .Rounded(3).BorderColor(EditorTheme.Border).BorderWidth(1) - .Hovered.BorderColor(EditorTheme.Accent).End() + .BackgroundColor(EditorTheme.Neutral300) + .Rounded(3).BorderColor(EditorTheme.Ink200).BorderWidth(1) + .Hovered.BorderColor(EditorTheme.Purple400).End() .Enter()) { bool isOpen = paper.IsParentFocusWithin; @@ -105,8 +105,8 @@ static void DrawFullEditor(Paper paper, string id, AnimationCurve curve, Action< using (paper.Column(id) .Size(editorW, editorH) - .BackgroundColor(EditorTheme.PanelBackground) - .BorderColor(EditorTheme.Border).BorderWidth(1).Rounded(6) + .BackgroundColor(EditorTheme.Neutral300) + .BorderColor(EditorTheme.Ink200).BorderWidth(1).Rounded(6) .Layer(Layer.Topmost) .ClampToScreen() .Enter()) @@ -252,7 +252,7 @@ static void DrawFullEditor(Paper paper, string id, AnimationCurve curve, Action< .PositionType(PositionType.SelfDirected) .Position(kx - 5, ky - 5).Size(10, 10) .BackgroundColor(isSelected ? Color.FromArgb(255, 255, 200, 50) : Color.FromArgb(255, 255, 255, 255)) - .Hovered.BackgroundColor(EditorTheme.Accent).End() + .Hovered.BackgroundColor(EditorTheme.Purple400).End() .Rounded(5) .StopEventPropagation() .Tooltip($"({key.Position:F2}, {key.Value:F2})") @@ -294,8 +294,8 @@ static void DrawFullEditor(Paper paper, string id, AnimationCurve curve, Action< { var fitBtn = paper.Box($"{id}_fit") .Height(22).ChildLeft(6).ChildRight(6) - .BackgroundColor(EditorTheme.ButtonNormal) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() + .BackgroundColor(EditorTheme.Ink100) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .Rounded(3) .OnClick(e => { @@ -307,13 +307,13 @@ static void DrawFullEditor(Paper paper, string id, AnimationCurve curve, Action< }); if (EditorTheme.DefaultFont != null) fitBtn.Text("Fit", EditorTheme.DefaultFont) - .TextColor(EditorTheme.Text).FontSize(EditorTheme.FontSize - 2); + .TextColor(EditorTheme.Ink500).FontSize(EditorTheme.FontSize - 2); // Save current curve to palette var saveBtn = paper.Box($"{id}_save_preset") .Height(22).ChildLeft(6).ChildRight(6) - .BackgroundColor(EditorTheme.ButtonNormal) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() + .BackgroundColor(EditorTheme.Ink100) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .Rounded(3) .OnClick(e => { @@ -332,7 +332,7 @@ static void DrawFullEditor(Paper paper, string id, AnimationCurve curve, Action< }); if (EditorTheme.DefaultFont != null) saveBtn.Text($"{EditorIcons.Plus} Save", EditorTheme.DefaultFont) - .TextColor(EditorTheme.Text).FontSize(EditorTheme.FontSize - 2); + .TextColor(EditorTheme.Ink500).FontSize(EditorTheme.FontSize - 2); } // Curve palette row @@ -382,10 +382,10 @@ static void DrawCurvePalette(Paper paper, string id, AnimationCurve curve, using (paper.Box($"{id}_p{idx}") .Size(presetW, presetH) - .BackgroundColor(EditorTheme.InputBackground) + .BackgroundColor(EditorTheme.Neutral300) .Rounded(3) - .BorderColor(EditorTheme.Border).BorderWidth(1) - .Hovered.BorderColor(EditorTheme.Accent).End() + .BorderColor(EditorTheme.Ink200).BorderWidth(1) + .Hovered.BorderColor(EditorTheme.Purple400).End() .Tooltip(preset.Name) .OnClick(idx, (ci, _) => { diff --git a/Prowl.Editor/Widgets/EditorGUI.cs b/Prowl.Editor/Widgets/EditorGUI.cs index c691084f..c3d9ff43 100644 --- a/Prowl.Editor/Widgets/EditorGUI.cs +++ b/Prowl.Editor/Widgets/EditorGUI.cs @@ -31,9 +31,9 @@ private static ElementBuilder.TextInputSettings MakeNumericSettings(Func Button(Paper paper, string id, string label, fl var el = paper.Box(id) .Height(EditorTheme.RowHeight) - .ChildLeft(EditorTheme.RowHeight/4).ChildRight(EditorTheme.RowHeight/4) - .BackgroundColor(EditorTheme.ButtonNormal) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() - .Active.BackgroundColor(EditorTheme.ButtonActive).End() + .BackgroundColor(EditorTheme.Ink100) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .Rounded(3) - .BorderColor(EditorTheme.Border).BorderWidth(1) + .BorderColor(EditorTheme.Ink200) + .BorderWidth(1) .OnClick(e => userCallback?.Invoke(true)); if (width > 0) el.Width(width); @@ -116,9 +115,11 @@ public static WidgetResult Button(Paper paper, string id, string label, fl { if (Font != null) paper.Box($"{id}_label") + .Height(EditorTheme.RowHeight) + .Margin(EditorTheme.RowHeight/4, 0) .Alignment(PaperUI.TextAlignment.MiddleLeft) .Text(label, Font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(FontSz); } @@ -132,15 +133,14 @@ public static WidgetResult ButtonSquare(Paper paper, string id, string ico paper.Box(id) .Alignment(PaperUI.TextAlignment.MiddleCenter) .Text(icon, Font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(FontSz) .Height(EditorTheme.RowHeight) .Width(EditorTheme.RowHeight) - .BackgroundColor(EditorTheme.ButtonNormal) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() - .Active.BackgroundColor(EditorTheme.ButtonActive).End() + .BackgroundColor(EditorTheme.Ink100) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .Rounded(3) - .BorderColor(EditorTheme.Border).BorderWidth(1) + .BorderColor(EditorTheme.Ink200).BorderWidth(1) .OnClick(e => userCallback?.Invoke(true)); return new WidgetResult(cb => userCallback = cb); @@ -164,19 +164,19 @@ public static WidgetResult Toggle(Paper paper, string id, string label, bo { var box = paper.Box($"{id}_box") .Size(16, 16) - .BackgroundColor(value ? EditorTheme.Accent : EditorTheme.InputBackground) - .Hovered.BackgroundColor(value ? EditorTheme.AccentDim : EditorTheme.ButtonHovered).End() + .BackgroundColor(value ? EditorTheme.Purple400 : EditorTheme.Neutral300) + .Hovered.BackgroundColor(value ? EditorTheme.Purple300 : EditorTheme.Ink200).End() .Rounded(3) .Alignment(PaperUI.TextAlignment.MiddleCenter) - .BorderColor(EditorTheme.Border).BorderWidth(1); + .BorderColor(EditorTheme.Ink200).BorderWidth(1); if (value && Font != null) - box.Text(EditorIcons.Check, Font).TextColor(EditorTheme.Text).FontSize(12f); + box.Text(EditorIcons.Check, Font).TextColor(EditorTheme.Ink500).FontSize(12f); if (Font != null) paper.Box($"{id}_lbl") .Width(UnitValue.Auto) - .Text(label, Font).TextColor(EditorTheme.Text).FontSize(FontSz); + .Text(label, Font).TextColor(EditorTheme.Ink500).FontSize(FontSz); } return new WidgetResult(cb => userCallback = cb); @@ -198,7 +198,7 @@ public static WidgetResult TextField(Paper paper, string id, string labe if (Font != null && !string.IsNullOrEmpty(label)) paper.Box($"{id}_lbl") .Width(LabelW).Height(EditorTheme.RowHeight).ChildLeft(4) - .Text(label, Font).TextColor(EditorTheme.Text).FontSize(FontSz); + .Text(label, Font).TextColor(EditorTheme.Ink500).FontSize(FontSz); using (paper.Box($"{id}_input") .Height(EditorTheme.RowHeight) @@ -209,7 +209,7 @@ public static WidgetResult TextField(Paper paper, string id, string labe .BackgroundColor(EditorTheme.Neutral200) .BorderColor(EditorTheme.Neutral100) - .Focused.BorderColor(EditorTheme.Accent).End() + .Focused.BorderColor(EditorTheme.Purple400).End() .TabIndex(0) .Enter()) @@ -223,9 +223,9 @@ public static WidgetResult TextField(Paper paper, string id, string labe .FontSize(FontSz) .TextField(value, Font!, onChange: v => userCallback?.Invoke(v), - textColor: EditorTheme.Text, + textColor: EditorTheme.Ink500, placeholder: "", - placeholderColor: EditorTheme.TextDisabled, + placeholderColor: EditorTheme.Ink300, intID: id.GetHashCode()); } } @@ -250,7 +250,7 @@ public static WidgetResult FloatField(Paper paper, string id, float value if (Font != null && !string.IsNullOrEmpty(label)) paper.Box($"{id}_lbl") .Width(UnitValue.Auto).Height(EditorTheme.RowHeight).ChildLeft(4) - .Text(label, Font).TextColor(textColor ?? EditorTheme.Text).FontSize(FontSz); + .Text(label, Font).TextColor(textColor ?? EditorTheme.Ink500).FontSize(FontSz); using (paper.Box($"{id}_input") .Height(EditorTheme.RowHeight) @@ -261,7 +261,7 @@ public static WidgetResult FloatField(Paper paper, string id, float value .BackgroundColor(EditorTheme.Neutral200) .BorderColor(EditorTheme.Neutral100) - .Focused.BorderColor(EditorTheme.Accent).End() + .Focused.BorderColor(EditorTheme.Purple400).End() .TabIndex(0) .Enter()) @@ -305,7 +305,7 @@ public static WidgetResult IntField(Paper paper, string id, int value, stri if (Font != null && !string.IsNullOrEmpty(label)) paper.Box($"{id}_lbl") .Width(UnitValue.Auto).Height(EditorTheme.RowHeight).ChildLeft(4) - .Text(label, Font).TextColor(textColor ?? EditorTheme.Text).FontSize(FontSz); + .Text(label, Font).TextColor(textColor ?? EditorTheme.Ink500).FontSize(FontSz); using (paper.Box($"{id}_input") @@ -317,7 +317,7 @@ public static WidgetResult IntField(Paper paper, string id, int value, stri .BackgroundColor(EditorTheme.Neutral200) .BorderColor(EditorTheme.Neutral100) - .Focused.BorderColor(EditorTheme.Accent).End() + .Focused.BorderColor(EditorTheme.Purple400).End() .TabIndex(0) .Enter()) @@ -362,7 +362,7 @@ public static WidgetResult Slider(Paper paper, string id, string label, f .Width(LabelW).Height(EditorTheme.RowHeight).ChildLeft(4) .IsNotInteractable() .Text(label, Font) - .TextColor(EditorTheme.Text).FontSize(FontSz); + .TextColor(EditorTheme.Ink500).FontSize(FontSz); paper.Box($"{id}_track") .Height(EditorTheme.RowHeight) @@ -398,17 +398,17 @@ public static WidgetResult Slider(Paper paper, string id, string label, f // ── Track background ────────────────────────────────── canvas.RoundedRectFilled(rx, trackY, rw, trackH, trackR, trackR, trackR, trackR, - EditorTheme.ButtonNormal); + EditorTheme.Ink100); // ── Track fill ──────────────────────────────────────── if (t > 0f) { canvas.RoundedRectFilled(rx, trackY, rw * t, trackH, trackR, trackR, trackR, trackR, - EditorTheme.Accent); + EditorTheme.Purple400); } // ── Thumb body ──────────────────────────────────────── - canvas.SetFillColor(EditorTheme.Text); + canvas.SetFillColor(EditorTheme.Ink500); canvas.BeginPath(); canvas.Circle(thumbCx, thumbCy, thumbR, 24); canvas.Fill(); @@ -435,8 +435,8 @@ public static void Foldout(Paper paper, string id, string label, Action drawCont .Row($"{id}_header") .Height(EditorTheme.RowHeight) .ChildLeft(4) - .BackgroundColor(EditorTheme.HeaderBackground) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() + .BackgroundColor(EditorTheme.Neutral300) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .Rounded(2); bool expanded = paper.GetElementStorage(header._handle, "exp", defaultValue); @@ -455,7 +455,7 @@ public static void Foldout(Paper paper, string id, string label, Action drawCont .MaxWidth(16) // .Text("\u25BC", Font) .Text(EditorIcons.ChevronDown, Font) - .TextColor(EditorTheme.TextDim) + .TextColor(EditorTheme.Ink400) .FontSize(FontSz * 0.7f); } else @@ -465,12 +465,12 @@ public static void Foldout(Paper paper, string id, string label, Action drawCont .Width(16) .MaxWidth(16) .Text(EditorIcons.ChevronRight, Font) - .TextColor(EditorTheme.TextDim) + .TextColor(EditorTheme.Ink400) .FontSize(FontSz * 0.7f); } paper.Box($"{id}_header_lbl") .Text(label, Font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(FontSz); } } @@ -501,7 +501,7 @@ public static WidgetResult Dropdown(Paper paper, string id, string label, i if (Font != null && !string.IsNullOrEmpty(label)) paper.Box($"{id}_lbl") .Width(LabelW).Height(EditorTheme.RowHeight).ChildLeft(4) - .Text(label, Font).TextColor(EditorTheme.Text).FontSize(FontSz); + .Text(label, Font).TextColor(EditorTheme.Ink500).FontSize(FontSz); PaperUI.LayoutEngine.ElementHandle btnHandle = default; @@ -510,8 +510,8 @@ public static WidgetResult Dropdown(Paper paper, string id, string label, i .Width(UnitValue.Stretch()) .BackgroundColor(EditorTheme.Neutral200) .Rounded(3) - .BorderColor(EditorTheme.Border).BorderWidth(1) - .Hovered.BorderColor(EditorTheme.Accent).End() + .BorderColor(EditorTheme.Ink200).BorderWidth(1) + .Hovered.BorderColor(EditorTheme.Purple400).End() .ChildLeft(6).ChildRight(6) .OnClick(e => { @@ -537,7 +537,7 @@ public static WidgetResult Dropdown(Paper paper, string id, string label, i paper.Box($"{id}_txt") .Width(UnitValue.Stretch()) .IsNotInteractable() - .Text(displayText, Font).TextColor(EditorTheme.Text).FontSize(FontSz); + .Text(displayText, Font).TextColor(EditorTheme.Ink500).FontSize(FontSz); // chevron down if open, right if closed if (isOpen) @@ -548,7 +548,7 @@ public static WidgetResult Dropdown(Paper paper, string id, string label, i .MaxWidth(16) // .Text("\u25BC", Font) .Text(EditorIcons.ChevronUp, Font) - .TextColor(EditorTheme.TextDim) + .TextColor(EditorTheme.Ink400) .FontSize(FontSz * 0.7f); } else @@ -559,7 +559,7 @@ public static WidgetResult Dropdown(Paper paper, string id, string label, i .MaxWidth(16) // .Text("\u25B6", Font) .Text(EditorIcons.ChevronDown, Font) - .TextColor(EditorTheme.TextDim) + .TextColor(EditorTheme.Ink400) .FontSize(FontSz * 0.7f); } } @@ -572,8 +572,8 @@ public static WidgetResult Dropdown(Paper paper, string id, string label, i .Position(0, EditorTheme.RowHeight - 1) .Width(UnitValue.Stretch()) .Height(UnitValue.Auto) - .BackgroundColor(EditorTheme.PanelBackground) - .BorderColor(EditorTheme.Border).BorderWidth(1) + .BackgroundColor(EditorTheme.Neutral300) + .BorderColor(EditorTheme.Ink200).BorderWidth(1) .Rounded(4) .ChildTop(2).ChildBottom(2).ChildLeft(2).ChildRight(2) .HookToParent() @@ -589,8 +589,8 @@ public static WidgetResult Dropdown(Paper paper, string id, string label, i var opt = paper.Box($"{id}_o_{i}") .Height(EditorTheme.RowHeight) .ChildLeft(6) - .BackgroundColor(isSel ? EditorTheme.AccentDim : Color.Transparent) - .Hovered.BackgroundColor(EditorTheme.Accent).End() + .BackgroundColor(isSel ? EditorTheme.Purple300 : Color.Transparent) + .Hovered.BackgroundColor(EditorTheme.Purple400).End() .Rounded(3) .HookToParent() .OnClick(e => @@ -600,7 +600,7 @@ public static WidgetResult Dropdown(Paper paper, string id, string label, i }); if (Font != null) - opt.Text(options[i], Font).TextColor(EditorTheme.Text).FontSize(FontSz); + opt.Text(options[i], Font).TextColor(EditorTheme.Ink500).FontSize(FontSz); } } } @@ -621,18 +621,17 @@ public static WidgetResult ToggleButton(Paper paper, string id, string lab using (paper.Box(id) .Height(EditorTheme.RowHeight) .ChildLeft(EditorTheme.RowHeight/4).ChildRight(EditorTheme.RowHeight/4) - .BackgroundColor(value ? EditorTheme.Accent : EditorTheme.ButtonNormal) - .Hovered.BackgroundColor(value ? EditorTheme.AccentDim : EditorTheme.ButtonHovered).End() - .Active.BackgroundColor(EditorTheme.ButtonActive).End() + .BackgroundColor(value ? EditorTheme.Purple400 : EditorTheme.Ink100) + .Hovered.BackgroundColor(value ? EditorTheme.Purple300 : EditorTheme.Ink200).End() .Rounded(3) - .BorderColor(EditorTheme.Border).BorderWidth(1) + .BorderColor(EditorTheme.Ink200).BorderWidth(1) .OnClick(e => userCallback?.Invoke(!value)).Enter()) { if (Font != null) paper.Box($"{id}_label") .Alignment(PaperUI.TextAlignment.MiddleLeft) .Text(label, Font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(FontSz); } @@ -655,7 +654,7 @@ public static WidgetResult SearchBar(Paper paper, string id, string valu .BackgroundColor(EditorTheme.Neutral200) .BorderColor(EditorTheme.Neutral100) - .Focused.BorderColor(EditorTheme.Accent).End() + .Focused.BorderColor(EditorTheme.Purple400).End() .ChildLeft(6).ChildRight(4) .RowBetween(4) @@ -666,7 +665,7 @@ public static WidgetResult SearchBar(Paper paper, string id, string valu paper.Box($"{id}_icon") .Width(16) .Margin(EditorTheme.RowHeight / 4, 0, EditorTheme.RowHeight / 8, 0) - .Text(EditorIcons.MagnifyingGlass, Font).TextColor(EditorTheme.TextDim).FontSize(FontSz * 0.7f); + .Text(EditorIcons.MagnifyingGlass, Font).TextColor(EditorTheme.Ink400).FontSize(FontSz * 0.7f); paper.Box($"{id}_tf") .Height(EditorTheme.RowHeight) @@ -677,9 +676,9 @@ public static WidgetResult SearchBar(Paper paper, string id, string valu .Alignment(PaperUI.TextAlignment.MiddleLeft) .TextField(value, Font, onChange: v => userCallback?.Invoke(v), - textColor: EditorTheme.Text, + textColor: EditorTheme.Ink500, placeholder: placeholder, - placeholderColor: EditorTheme.TextDisabled, + placeholderColor: EditorTheme.Ink300, intID: id.GetHashCode()); if (!string.IsNullOrEmpty(value)) @@ -687,8 +686,8 @@ public static WidgetResult SearchBar(Paper paper, string id, string valu var clearBtn = paper.Box($"{id}_clear") .Rounded(8) .Size(16).Margin(2, UnitValue.StretchOne) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() - .Text(EditorIcons.Xmark, Font).TextColor(EditorTheme.TextDim).FontSize(14).Alignment(PaperUI.TextAlignment.MiddleCenter) + .Hovered.BackgroundColor(EditorTheme.Ink200).End() + .Text(EditorIcons.Xmark, Font).TextColor(EditorTheme.Ink400).FontSize(14).Alignment(PaperUI.TextAlignment.MiddleCenter) .OnClick(e => userCallback?.Invoke("")); } } @@ -748,7 +747,7 @@ public static WidgetResult IntSlider(Paper paper, string id, string label, if (Font != null && !string.IsNullOrEmpty(label)) paper.Box($"{id}_lbl") .Width(LabelW).Height(EditorTheme.RowHeight).ChildLeft(4) - .Text(label, Font).TextColor(EditorTheme.Text).FontSize(FontSz); + .Text(label, Font).TextColor(EditorTheme.Ink500).FontSize(FontSz); // X FloatField(paper, $"{id}_x", (float)current.X, "X", Color.FromArgb(255, 200, 80, 80)) @@ -779,7 +778,7 @@ public static WidgetResult IntSlider(Paper paper, string id, string label, if (Font != null && !string.IsNullOrEmpty(label)) paper.Box($"{id}_lbl") .Width(LabelW).Height(EditorTheme.RowHeight).ChildLeft(4) - .Text(label, Font).TextColor(EditorTheme.Text).FontSize(FontSz); + .Text(label, Font).TextColor(EditorTheme.Ink500).FontSize(FontSz); // X FloatField(paper, $"{id}_x", (float)current.X, "X", Color.FromArgb(255, 200, 80, 80)) @@ -814,7 +813,7 @@ public static WidgetResult IntSlider(Paper paper, string id, string label, if (Font != null && !string.IsNullOrEmpty(label)) paper.Box($"{id}_lbl") .Width(LabelW).Height(EditorTheme.RowHeight).ChildLeft(4) - .Text(label, Font).TextColor(EditorTheme.Text).FontSize(FontSz); + .Text(label, Font).TextColor(EditorTheme.Ink500).FontSize(FontSz); // X FloatField(paper, $"{id}_x", (float)current.X, "X", Color.FromArgb(255, 200, 80, 80)) @@ -856,7 +855,7 @@ public static WidgetResult IntSlider(Paper paper, string id, string label, .IsNotInteractable() .Alignment(PaperUI.TextAlignment.MiddleLeft) .Text(label, Font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(FontSz); // Color swatch (FocusWithin-based popup using cached ancestor set) @@ -869,8 +868,8 @@ public static WidgetResult IntSlider(Paper paper, string id, string label, (int)(value.G * 255), (int)(value.B * 255))) .Rounded(3) - .BorderColor(EditorTheme.Border).BorderWidth(1) - .Hovered.BorderColor(EditorTheme.Accent).End() + .BorderColor(EditorTheme.Ink200).BorderWidth(1) + .Hovered.BorderColor(EditorTheme.Purple400).End() .Enter()) { bool isOpen = paper.IsParentFocusWithin; @@ -888,7 +887,7 @@ public static WidgetResult IntSlider(Paper paper, string id, string label, .IsNotInteractable() .Alignment(PaperUI.TextAlignment.MiddleLeft) .Text($"#{r:X2}{g:X2}{b:X2}", Font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(FontSz - 1); } @@ -925,7 +924,7 @@ public static void ProgressBar(Paper paper, string id, string label, float progr paper.Box($"{id}_lbl") .Width(LabelW).Height(EditorTheme.RowHeight).ChildLeft(4) .IsNotInteractable() - .Text(label, Font).TextColor(EditorTheme.Text).FontSize(FontSz); + .Text(label, Font).TextColor(EditorTheme.Ink500).FontSize(FontSz); paper.Box($"{id}_track") .Height(EditorTheme.RowHeight) @@ -944,12 +943,12 @@ public static void ProgressBar(Paper paper, string id, string label, float progr // ── Track background ────────────────────────────────── canvas.RoundedRectFilled(rx, trackY, rw, trackH, trackR, trackR, trackR, trackR, - EditorTheme.ButtonNormal); + EditorTheme.Ink100); // ── Track fill ──────────────────────────────────────── if (progress > 0f) canvas.RoundedRectFilled(rx, trackY, rw * progress, trackH, trackR, trackR, trackR, trackR, - EditorTheme.Accent); + EditorTheme.Purple400); })); if (Font != null) @@ -957,7 +956,7 @@ public static void ProgressBar(Paper paper, string id, string label, float progr .Width(40).Height(EditorTheme.RowHeight) .IsNotInteractable() .Text($"{(int)(progress * 100)}%", Font) - .TextColor(EditorTheme.Text).FontSize(FontSz); + .TextColor(EditorTheme.Ink500).FontSize(FontSz); } } diff --git a/Prowl.Editor/Widgets/FileDialog.cs b/Prowl.Editor/Widgets/FileDialog.cs index 715c1402..2f82f69a 100644 --- a/Prowl.Editor/Widgets/FileDialog.cs +++ b/Prowl.Editor/Widgets/FileDialog.cs @@ -254,8 +254,8 @@ public static void Draw(Paper paper) using (paper.Column("fd_window") .Size(DialogWidth, DialogHeight) .Margin(UnitValue.StretchOne) - .BackgroundColor(EditorTheme.Normal) - .BorderColor(EditorTheme.Bright).BorderWidth(1).Rounded(8) + .BackgroundColor(EditorTheme.Neutral300) + .BorderColor(EditorTheme.Ink200).BorderWidth(1).Rounded(8) .Layer(Layer.Overlay) .Enter()) { @@ -269,53 +269,53 @@ private static void DrawToolbar(Paper paper, Prowl.Scribe.FontFile font) { using (paper.Row("fd_toolbar") .Height(ToolbarHeight) - .BackgroundColor(EditorTheme.Darkest) + .BackgroundColor(EditorTheme.Neutral200) .ChildLeft(6).ChildRight(6).RowBetween(4) .Enter()) { float btnW = 28f; // Back - var backColor = _historyIndex > 0 ? EditorTheme.Text : EditorTheme.TextDisabled; + var backColor = _historyIndex > 0 ? EditorTheme.Ink500 : EditorTheme.Ink300; paper.Box("fd_back").Width(btnW).Height(ToolbarHeight) .Text(EditorIcons.ArrowLeft, font).TextColor(backColor).FontSize(14f) .Alignment(TextAlignment.MiddleCenter) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .Rounded(4) .OnClick(0, (_, _) => NavigateBack()); // Forward - var fwdColor = _historyIndex < _pathHistory.Count - 1 ? EditorTheme.Text : EditorTheme.TextDisabled; + var fwdColor = _historyIndex < _pathHistory.Count - 1 ? EditorTheme.Ink500 : EditorTheme.Ink300; paper.Box("fd_fwd").Width(btnW).Height(ToolbarHeight) .Text(EditorIcons.ArrowRight, font).TextColor(fwdColor).FontSize(14f) .Alignment(TextAlignment.MiddleCenter) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .Rounded(4) .OnClick(0, (_, _) => NavigateForward()); // Up paper.Box("fd_up").Width(btnW).Height(ToolbarHeight) - .Text(EditorIcons.ArrowUp, font).TextColor(EditorTheme.Text).FontSize(14f) + .Text(EditorIcons.ArrowUp, font).TextColor(EditorTheme.Ink500).FontSize(14f) .Alignment(TextAlignment.MiddleCenter) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .Rounded(4) .OnClick(0, (_, _) => NavigateUp()); // Breadcrumb path paper.Box("fd_path") .Height(ToolbarHeight) - .BackgroundColor(EditorTheme.InputBackground) + .BackgroundColor(EditorTheme.Neutral300) .Rounded(4) .ChildLeft(8) - .Text(_currentPath, font).TextColor(EditorTheme.Text) + .Text(_currentPath, font).TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize - 3) .Alignment(TextAlignment.MiddleLeft); // New folder button paper.Box("fd_newfolder").Width(btnW).Height(ToolbarHeight) - .Text(EditorIcons.FolderPlus, font).TextColor(EditorTheme.Text).FontSize(14f) + .Text(EditorIcons.FolderPlus, font).TextColor(EditorTheme.Ink500).FontSize(14f) .Alignment(TextAlignment.MiddleCenter) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .Rounded(4) .OnClick(0, (_, _) => { @@ -347,13 +347,13 @@ private static void DrawSidebar(Paper paper, Prowl.Scribe.FontFile font) { using (paper.Column("fd_sidebar") .Width(SidebarWidth) - .BackgroundColor(EditorTheme.Darkest) + .BackgroundColor(EditorTheme.Neutral200) .ChildTop(8).ChildLeft(4).ChildRight(4).ColBetween(2) .Enter()) { // Quick access paper.Box("fd_qa_label").Height(20) - .Text("Quick Access", font).TextColor(EditorTheme.TextDim) + .Text("Quick Access", font).TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 3).Alignment(TextAlignment.MiddleLeft) .ChildLeft(8); @@ -362,22 +362,22 @@ private static void DrawSidebar(Paper paper, Prowl.Scribe.FontFile font) string qPath = pathFn(); bool isCurrent = _currentPath.Equals(qPath, StringComparison.OrdinalIgnoreCase); paper.Box($"fd_qa_{label}").Height(24) - .BackgroundColor(isCurrent ? EditorTheme.Accent : Color.Transparent) - .Hovered.BackgroundColor(isCurrent ? EditorTheme.Accent : EditorTheme.ButtonHovered).End() + .BackgroundColor(isCurrent ? EditorTheme.Purple400 : Color.Transparent) + .Hovered.BackgroundColor(isCurrent ? EditorTheme.Purple400 : EditorTheme.Ink200).End() .Rounded(4) .ChildLeft(8) - .Text($"{icon} {label}", font).TextColor(EditorTheme.Text) + .Text($"{icon} {label}", font).TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize - 2).Alignment(TextAlignment.MiddleLeft) .OnClick(qPath, (p, _) => NavigateTo(p)); } // Separator paper.Box("fd_qa_sep").Height(1).Margin(4, 8, 4, 8) - .BackgroundColor(EditorTheme.Border); + .BackgroundColor(EditorTheme.Ink200); // Drives paper.Box("fd_drv_label").Height(20) - .Text("Drives", font).TextColor(EditorTheme.TextDim) + .Text("Drives", font).TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 3).Alignment(TextAlignment.MiddleLeft) .ChildLeft(8); @@ -389,11 +389,11 @@ private static void DrawSidebar(Paper paper, Prowl.Scribe.FontFile font) string dLabel = $"{EditorIcons.HardDrive} {dName}"; bool isCurrent = _currentPath.StartsWith(dName, StringComparison.OrdinalIgnoreCase); paper.Box($"fd_drv_{dName}").Height(24) - .BackgroundColor(isCurrent ? EditorTheme.Accent : Color.Transparent) - .Hovered.BackgroundColor(isCurrent ? EditorTheme.Accent : EditorTheme.ButtonHovered).End() + .BackgroundColor(isCurrent ? EditorTheme.Purple400 : Color.Transparent) + .Hovered.BackgroundColor(isCurrent ? EditorTheme.Purple400 : EditorTheme.Ink200).End() .Rounded(4) .ChildLeft(8) - .Text(dLabel, font).TextColor(EditorTheme.Text) + .Text(dLabel, font).TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize - 2).Alignment(TextAlignment.MiddleLeft) .OnClick(dName, (p, _) => NavigateTo(p)); } @@ -406,7 +406,7 @@ private static void DrawColumnHeaders(Paper paper, Prowl.Scribe.FontFile font) { using (paper.Row("fd_headers") .Height(HeaderHeight) - .BackgroundColor(EditorTheme.Darkest) + .BackgroundColor(EditorTheme.Neutral200) .ChildLeft(4).RowBetween(0) .Enter()) { @@ -416,9 +416,9 @@ void ColHeader(string id, string label, int col, float? width = null) if (width.HasValue) el.Width(width.Value); el.ChildLeft(8) .Text(label + (_sortColumn == col ? (_sortAscending ? " \u25B4" : " \u25BE") : ""), font) - .TextColor(EditorTheme.TextDim).FontSize(EditorTheme.FontSize - 3) + .TextColor(EditorTheme.Ink400).FontSize(EditorTheme.FontSize - 3) .Alignment(TextAlignment.MiddleLeft) - .Hovered.BackgroundColor(EditorTheme.ButtonHovered).End() + .Hovered.BackgroundColor(EditorTheme.Ink200).End() .OnClick(col, (c, _) => { if (_sortColumn == c) _sortAscending = !_sortAscending; @@ -445,12 +445,12 @@ private static void DrawFileList(Paper paper, Prowl.Scribe.FontFile font) { using (paper.Row("fd_newfolder_row") .Height(RowHeight) - .BackgroundColor(EditorTheme.Accent) + .BackgroundColor(EditorTheme.Purple400) .ChildLeft(8).RowBetween(8) .Enter()) { paper.Box("fd_nf_ico").Width(20).Height(RowHeight) - .Text(EditorIcons.Folder, font).TextColor(EditorTheme.Text) + .Text(EditorIcons.Folder, font).TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize - 2).Alignment(TextAlignment.MiddleCenter); EditorGUI.TextField(paper, "fd_nf_name", "Name", _newFolderName) @@ -487,8 +487,8 @@ private static void DrawFileList(Paper paper, Prowl.Scribe.FontFile font) using (paper.Row($"fd_row_{i}") .Height(RowHeight) - .BackgroundColor(isSelected ? EditorTheme.Accent : (i % 2 == 0 ? Color.Transparent : Color.FromArgb(15, 255, 255, 255))) - .Hovered.BackgroundColor(isSelected ? EditorTheme.Accent : EditorTheme.ButtonHovered).End() + .BackgroundColor(isSelected ? EditorTheme.Purple400 : (i % 2 == 0 ? Color.Transparent : Color.FromArgb(15, 255, 255, 255))) + .Hovered.BackgroundColor(isSelected ? EditorTheme.Purple400 : EditorTheme.Ink200).End() .ChildLeft(8).RowBetween(0) .OnClick(entry, (e, ev) => { @@ -508,7 +508,7 @@ private static void DrawFileList(Paper paper, Prowl.Scribe.FontFile font) { // Icon + Name string icon = entry.IsDirectory ? EditorIcons.Folder : GetFileIcon(entry.Name); - var iconColor = entry.IsDirectory ? Color.FromArgb(255, 220, 180, 80) : EditorTheme.TextDim; + var iconColor = entry.IsDirectory ? Color.FromArgb(255, 220, 180, 80) : EditorTheme.Ink400; paper.Box($"fd_ico_{i}").Width(20).Height(RowHeight) .Text(icon, font).TextColor(iconColor) @@ -516,20 +516,20 @@ private static void DrawFileList(Paper paper, Prowl.Scribe.FontFile font) paper.Box($"fd_name_{i}").Height(RowHeight) .ChildLeft(4) - .Text(entry.Name, font).TextColor(EditorTheme.Text) + .Text(entry.Name, font).TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize - 2).Alignment(TextAlignment.MiddleLeft); // Size string sizeText = entry.IsDirectory ? "" : FormatSize(entry.Size); paper.Box($"fd_size_{i}").Width(80).Height(RowHeight) - .Text(sizeText, font).TextColor(EditorTheme.TextDim) + .Text(sizeText, font).TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 3).Alignment(TextAlignment.MiddleRight) .ChildRight(8); // Date paper.Box($"fd_date_{i}").Width(140).Height(RowHeight) .Text(entry.LastModified.ToString("yyyy-MM-dd HH:mm"), font) - .TextColor(EditorTheme.TextDim) + .TextColor(EditorTheme.Ink400) .FontSize(EditorTheme.FontSize - 3).Alignment(TextAlignment.MiddleRight) .ChildRight(8); } @@ -538,7 +538,7 @@ private static void DrawFileList(Paper paper, Prowl.Scribe.FontFile font) if (displayEntries.Count == 0) { paper.Box("fd_empty").Height(60) - .Text("This folder is empty", font).TextColor(EditorTheme.TextDisabled) + .Text("This folder is empty", font).TextColor(EditorTheme.Ink300) .FontSize(EditorTheme.FontSize).Alignment(TextAlignment.MiddleCenter); } } @@ -548,7 +548,7 @@ private static void DrawBottomBar(Paper paper, Prowl.Scribe.FontFile font) { using (paper.Column("fd_bottom") .Height(BottomBarHeight) - .BackgroundColor(EditorTheme.Darkest) + .BackgroundColor(EditorTheme.Neutral200) .ChildLeft(8).ChildRight(8).ChildTop(6).ChildBottom(6).ColBetween(6) .Enter()) { @@ -559,7 +559,7 @@ private static void DrawBottomBar(Paper paper, Prowl.Scribe.FontFile font) { paper.Box("fd_name_lbl").Width(70).Height(24) .Text(_mode == FileDialogMode.SelectFolder ? "Folder:" : "File name:", font) - .TextColor(EditorTheme.TextDim).FontSize(EditorTheme.FontSize - 2) + .TextColor(EditorTheme.Ink400).FontSize(EditorTheme.FontSize - 2) .Alignment(TextAlignment.MiddleRight); EditorGUI.TextField(paper, "fd_filename", "", _fileName) @@ -588,10 +588,10 @@ private static void DrawBottomBar(Paper paper, Prowl.Scribe.FontFile font) _ => "Open" }; - EditorGUI.Button(paper, "fd_btn_ok", confirmLabel, width: 90) + EditorGUI.Button(paper, "fd_btn_ok", confirmLabel, width: 101) .OnValueChanged(_ => ConfirmSelection()); - EditorGUI.Button(paper, "fd_btn_cancel", "Cancel", width: 90) + EditorGUI.Button(paper, "fd_btn_cancel", "Cancel", width: 60) .OnValueChanged(_ => Close(null)); } } diff --git a/Prowl.Editor/Widgets/ModalDialog.cs b/Prowl.Editor/Widgets/ModalDialog.cs index 8e666302..3d7f0e93 100644 --- a/Prowl.Editor/Widgets/ModalDialog.cs +++ b/Prowl.Editor/Widgets/ModalDialog.cs @@ -112,8 +112,8 @@ public static void Draw(Paper paper) dialogBuilder.Height(UnitValue.Auto); using (dialogBuilder - .BackgroundColor(EditorTheme.PanelBackground) - .BorderColor(EditorTheme.Border).BorderWidth(1) + .BackgroundColor(EditorTheme.Neutral300) + .BorderColor(EditorTheme.Ink200).BorderWidth(1) .Rounded(8) .BoxShadow(0, 4, 20, 0, Color.FromArgb(80, 0, 0, 0)) .Layer(Layer.Overlay) @@ -124,11 +124,11 @@ public static void Draw(Paper paper) { paper.Box("modal_title") .Height(32) - .BackgroundColor(EditorTheme.HeaderBackground) + .BackgroundColor(EditorTheme.Neutral300) .Rounded(8) .ChildLeft(12) .Text(modal.Title, font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize + 1); } diff --git a/Prowl.Editor/Widgets/PropertyGrid.cs b/Prowl.Editor/Widgets/PropertyGrid.cs index d6eec800..af6e1c53 100644 --- a/Prowl.Editor/Widgets/PropertyGrid.cs +++ b/Prowl.Editor/Widgets/PropertyGrid.cs @@ -29,7 +29,7 @@ public static void Draw(Paper paper, string id, object target, Action? o { if (target == null) return; - if (depth > 10) { EditorGUI.Label(paper, $"{id}_deep", "(max depth)", EditorTheme.TextDim); return; } + if (depth > 10) { EditorGUI.Label(paper, $"{id}_deep", "(max depth)", EditorTheme.Ink400); return; } var type = target.GetType(); var fields = GetSerializableFields(type); @@ -150,7 +150,7 @@ public static void DrawField(Paper paper, string id, string label, Type type, ob } // 7. Fallback - EditorGUI.Label(paper, id, $"{label}: {value ?? "(null)"}", EditorTheme.TextDim); + EditorGUI.Label(paper, id, $"{label}: {value ?? "(null)"}", EditorTheme.Ink400); } // ================================================================ @@ -213,7 +213,7 @@ static void DrawTypePicker(Paper paper, string id, Type baseType, object? curren if (types.Length == 0) { - EditorGUI.Label(paper, $"{id}_none", "(no implementations)", EditorTheme.TextDim); + EditorGUI.Label(paper, $"{id}_none", "(no implementations)", EditorTheme.Ink400); return; } diff --git a/Prowl.Editor/Widgets/Tooltip.cs b/Prowl.Editor/Widgets/Tooltip.cs index ef9499ff..4725369d 100644 --- a/Prowl.Editor/Widgets/Tooltip.cs +++ b/Prowl.Editor/Widgets/Tooltip.cs @@ -67,13 +67,13 @@ public static void Draw(Paper paper) .Height(UnitValue.Auto) .Width(UnitValue.Auto) .BackgroundColor(Color.FromArgb(230, 40, 40, 43)) - .BorderColor(EditorTheme.Border).BorderWidth(1) + .BorderColor(EditorTheme.Ink200).BorderWidth(1) .Rounded(4) .ChildLeft(8).ChildRight(8).ChildTop(4).ChildBottom(4) .Layer(Layer.Topmost) .IsNotInteractable() .Text(_pendingText, font) - .TextColor(EditorTheme.Text) + .TextColor(EditorTheme.Ink500) .FontSize(EditorTheme.FontSize - 1); _pendingText = null;