스타일 가이드 1차 완성

This commit is contained in:
logonkhi
2026-01-29 20:14:39 +09:00
parent 097436a8b0
commit f2d0f3d423
29 changed files with 297 additions and 247 deletions

View File

@@ -94,11 +94,11 @@ namespace UVC.UIToolkit
/// var circleBtn6 = new UTKButton("", UTKMaterialIcons.Edit, ButtonVariant.Text, 12) { IconOnly = true };
///
/// // UXML 태그
/// // <utk:UTKButton icon="home;" icon-only="true" icon-size="12" variant="Text" />
/// // <utk:UTKButton icon="close;" icon-only="true" icon-size="12" variant="Text" />
/// // <utk:UTKButton icon="check;" icon-only="true" icon-size="12" variant="Text" />
/// // <utk:UTKButton icon="search;" icon-only="true" icon-size="12" variant="Text" />
/// // <utk:UTKButton icon="edit;" icon-only="true" icon-size="12" variant="Text" />
/// // <utk:UTKButton icon="home" icon-only="true" icon-size="12" variant="Text" />
/// // <utk:UTKButton icon="close" icon-only="true" icon-size="12" variant="Text" />
/// // <utk:UTKButton icon="check" icon-only="true" icon-size="12" variant="Text" />
/// // <utk:UTKButton icon="search" icon-only="true" icon-size="12" variant="Text" />
/// // <utk:UTKButton icon="edit" icon-only="true" icon-size="12" variant="Text" />
/// </code>
///
/// <para><b>7. Disabled (비활성화)</b></para>
@@ -303,7 +303,6 @@ namespace UVC.UIToolkit
//if(iconSizeValue == value) return;
iconSizeValue = value;
string iconChar = UTKMaterialIcons.GetIcon(iconValue);
Debug.Log($"[UTKButton] Update Icon Size: {iconSizeValue} {iconValue} -> {iconChar}");
if (iconChar != string.Empty)
{
UpdateMaterialIconSize(iconSizeValue);
@@ -473,10 +472,21 @@ namespace UVC.UIToolkit
private void SubscribeToThemeChanges()
{
UTKThemeManager.Instance.OnThemeChanged += OnThemeChanged;
RegisterCallback<DetachFromPanelEvent>(_ =>
{
UTKThemeManager.Instance.OnThemeChanged -= OnThemeChanged;
});
RegisterCallback<DetachFromPanelEvent>(OnDetachFromPanel);
RegisterCallback<AttachToPanelEvent>(OnReattachToPanel);
}
private void OnDetachFromPanel(DetachFromPanelEvent evt)
{
UTKThemeManager.Instance.OnThemeChanged -= OnThemeChanged;
}
private void OnReattachToPanel(AttachToPanelEvent evt)
{
// TreeView 가상화로 인해 재연결 시 테마 재적용
UTKThemeManager.Instance.OnThemeChanged -= OnThemeChanged; // 중복 방지
UTKThemeManager.Instance.OnThemeChanged += OnThemeChanged;
UTKThemeManager.Instance.ApplyThemeToElement(this);
}
private void OnThemeChanged(UTKTheme theme)
@@ -641,11 +651,7 @@ namespace UVC.UIToolkit
{
ClearImageIcon();
Icon = icon;
if (_iconLabel != null)
{
UTKMaterialIcons.ApplyIconStyle(_iconLabel, fontSize ?? GetDefaultIconSize());
}
UpdateMaterialIconSize(fontSize);
}
private void UpdateMaterialIconSize(int? fontSize)