스타일 가이드 1차 완성
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user