diff --git a/Editor/UIToolkit/Controls/ButtonStrip/ButtonStrip.cs b/Editor/UIToolkit/Controls/ButtonStrip/ButtonStrip.cs index bdcbb4d..6bb4b5e 100644 --- a/Editor/UIToolkit/Controls/ButtonStrip/ButtonStrip.cs +++ b/Editor/UIToolkit/Controls/ButtonStrip/ButtonStrip.cs @@ -4,6 +4,7 @@ using System.Linq; using JetBrains.Annotations; using StansAssets.Foundation.Editor; +using UnityEditor; using UnityEngine; using UnityEngine.UIElements; @@ -35,7 +36,8 @@ public sealed class ButtonStrip : VisualElement const string k_ButtonMidClassName = k_ButtonClassName + "--mid"; const string k_ButtonRightClassName = k_ButtonClassName + "--right"; const string k_ButtonIconClassName = UssClassName + "__button-icon"; - const string k_ButtonActiveClassName = k_ButtonClassName + "--active"; + const string k_ButtonActiveClassNameDark = k_ButtonClassName + "--active-dark"; + const string k_ButtonActiveClassNameLight = k_ButtonClassName + "--active-light"; readonly List m_Choices = new List(); readonly List m_Labels = new List(); @@ -209,10 +211,11 @@ void ToggleButtonStates(Button button) { foreach (var btn in m_Buttons) { - btn.RemoveFromClassList(k_ButtonActiveClassName); + btn.RemoveFromClassList(k_ButtonActiveClassNameDark); + btn.RemoveFromClassList(k_ButtonActiveClassNameLight); } - button.AddToClassList(k_ButtonActiveClassName); + button.AddToClassList(EditorGUIUtility.isProSkin ? k_ButtonActiveClassNameDark : k_ButtonActiveClassNameLight); } } } diff --git a/Editor/UIToolkit/Controls/ButtonStrip/ButtonStrip.uss b/Editor/UIToolkit/Controls/ButtonStrip/ButtonStrip.uss index 8f67514..bba4e46 100644 --- a/Editor/UIToolkit/Controls/ButtonStrip/ButtonStrip.uss +++ b/Editor/UIToolkit/Controls/ButtonStrip/ButtonStrip.uss @@ -10,10 +10,14 @@ padding-top: 2px; } -.stansassets-button-strip__button--active { +.stansassets-button-strip__button--active-dark { color: aqua; } +.stansassets-button-strip__button--active-light { + color: #006f6f; +} + .stansassets-button-strip__button--left { padding-left: 4px; margin-right: 0; diff --git a/Editor/UIToolkit/Controls/Hyperlink/Hyperlink.uss b/Editor/UIToolkit/Controls/Hyperlink/Hyperlink.uss index cf20851..35c9753 100644 --- a/Editor/UIToolkit/Controls/Hyperlink/Hyperlink.uss +++ b/Editor/UIToolkit/Controls/Hyperlink/Hyperlink.uss @@ -12,6 +12,7 @@ .stansassets-hyperlink-block:hover Label, .stansassets-hyperlink-block:hover VisualElement { -unity-background-image-tint-color: cornflowerblue; + border-color: cornflowerblue; color: cornflowerblue; cursor: link; } \ No newline at end of file