diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 19f928621..fc8a9f192 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -566,11 +566,14 @@ namespace Flow.Launcher FillBehavior = FillBehavior.HoldEnd }; - double TargetIconOpacity = SearchIcon.Opacity; + double TargetIconOpacity = GetOpacityFromStyle(SearchIcon, SearchIcon.Style, 1.0); // 스타일에서 Opacity 가져오기 + + System.Diagnostics.Debug.WriteLine("스타일에서 가져온 투명도: " + TargetIconOpacity); + var IconOpacity = new DoubleAnimation { From = 0, - To = 1, + To = TargetIconOpacity, EasingFunction = easing, Duration = TimeSpan.FromMilliseconds(animationLength), FillBehavior = FillBehavior.HoldEnd @@ -626,6 +629,23 @@ namespace Flow.Launcher windowsb.Begin(FlowMainWindow); } + private double GetOpacityFromStyle(UIElement element, Style style, double defaultOpacity = 1.0) + { + if (style == null) + return defaultOpacity; + + foreach (Setter setter in style.Setters) + { + if (setter.Property == UIElement.OpacityProperty) + { + return setter.Value is double opacity ? opacity : defaultOpacity; + } + } + + return defaultOpacity; + } + + private bool _isClockPanelAnimating = false; // 애니메이션 실행 중인지 여부 private void UpdateClockPanelVisibility() diff --git a/Flow.Launcher/Themes/Base.xaml b/Flow.Launcher/Themes/Base.xaml index 44850e94e..9df935b8d 100644 --- a/Flow.Launcher/Themes/Base.xaml +++ b/Flow.Launcher/Themes/Base.xaml @@ -165,6 +165,29 @@ BasedOn="{StaticResource BaseClockPanel}" TargetType="{x:Type StackPanel}"> + +