@@ -236,36 +236,36 @@ public void SetWindowCornerPreference(string cornerType)
236236 }
237237
238238
239- public void SetCornerForWindow ( )
240- {
241- Application . Current . Dispatcher . Invoke ( ( ) =>
242- {
243- var dict = GetThemeResourceDictionary ( _settings . Theme ) ;
244- if ( dict == null )
245- return ;
246-
247- System . Windows . Window mainWindow = Application . Current . MainWindow ;
248- if ( mainWindow == null )
249- return ;
250-
251- if ( dict . Contains ( "CornerType" ) && dict [ "CornerType" ] is string cornerMode )
252- {
253- DWM_WINDOW_CORNER_PREFERENCE preference = cornerMode switch
254- {
255- "DoNotRound" => DWM_WINDOW_CORNER_PREFERENCE . DoNotRound ,
256- "Round" => DWM_WINDOW_CORNER_PREFERENCE . Round ,
257- "RoundSmall" => DWM_WINDOW_CORNER_PREFERENCE . RoundSmall ,
258- _ => DWM_WINDOW_CORNER_PREFERENCE . Default ,
259- } ;
260-
261- SetWindowCornerPreference ( mainWindow , preference ) ;
262- }
263- else
264- {
265- SetWindowCornerPreference ( mainWindow , DWM_WINDOW_CORNER_PREFERENCE . Default ) ;
266- }
267- } , DispatcherPriority . Normal ) ;
268- }
239+ // public void SetCornerForWindow()
240+ // {
241+ // Application.Current.Dispatcher.Invoke(() =>
242+ // {
243+ // var dict = GetThemeResourceDictionary(_settings.Theme);
244+ // if (dict == null)
245+ // return;
246+
247+ // System.Windows.Window mainWindow = Application.Current.MainWindow;
248+ // if (mainWindow == null)
249+ // return;
250+
251+ // if (dict.Contains("CornerType") && dict["CornerType"] is string cornerMode)
252+ // {
253+ // DWM_WINDOW_CORNER_PREFERENCE preference = cornerMode switch
254+ // {
255+ // "DoNotRound" => DWM_WINDOW_CORNER_PREFERENCE.DoNotRound,
256+ // "Round" => DWM_WINDOW_CORNER_PREFERENCE.Round,
257+ // "RoundSmall" => DWM_WINDOW_CORNER_PREFERENCE.RoundSmall,
258+ // _ => DWM_WINDOW_CORNER_PREFERENCE.Default,
259+ // };
260+
261+ // SetWindowCornerPreference(mainWindow, preference);
262+ // }
263+ // else
264+ // {
265+ // SetWindowCornerPreference(mainWindow, DWM_WINDOW_CORNER_PREFERENCE.Default);
266+ // }
267+ // }, DispatcherPriority.Normal);
268+ // }
269269
270270
271271 /// <summary>
@@ -389,7 +389,7 @@ private void ApplyPreviewBackground(Color? bgColor = null)
389389
390390 Application . Current . Dispatcher . Invoke ( ( ) =>
391391 {
392- // 1. 기존 WindowBorderStyle을 복사
392+ // ✅ 기존 WindowBorderStyle을 복사
393393 var previewStyle = new Style ( typeof ( Border ) ) ;
394394 if ( Application . Current . Resources . Contains ( "WindowBorderStyle" ) )
395395 {
@@ -403,16 +403,23 @@ private void ApplyPreviewBackground(Color? bgColor = null)
403403 }
404404 }
405405
406- // 2. 투명도 제거 후 background 적용
406+ // ✅ 배경색 적용 (투명도 제거)
407407 Color backgroundColor = Color . FromRgb ( bgColor . Value . R , bgColor . Value . G , bgColor . Value . B ) ;
408408 previewStyle . Setters . Add ( new Setter ( Border . BackgroundProperty , new SolidColorBrush ( backgroundColor ) ) ) ;
409409
410- // 3. 기타 설정 추가
411- previewStyle . Setters . Add ( new Setter ( Border . BorderThicknessProperty , new Thickness ( 0 ) ) ) ;
412- previewStyle . Setters . Add ( new Setter ( Border . CornerRadiusProperty , new CornerRadius ( 5 ) ) ) ;
413- previewStyle . Setters . Add ( new Setter ( Border . UseLayoutRoundingProperty , true ) ) ;
414- previewStyle . Setters . Add ( new Setter ( Border . SnapsToDevicePixelsProperty , true ) ) ;
410+ // ✅ 블러 테마면 CornerRadius = 5, 비블러 테마면 기존 스타일 유지
411+ if ( BlurEnabled )
412+ {
413+ previewStyle . Setters . Add ( new Setter ( Border . CornerRadiusProperty , new CornerRadius ( 5 ) ) ) ;
414+ previewStyle . Setters . Add ( new Setter ( Border . BorderThicknessProperty , new Thickness ( 1 ) ) ) ;
415+ }
416+
417+ // ✅ 기타 설정 추가
418+ //previewStyle.Setters.Add(new Setter(Border.BorderThicknessProperty, new Thickness(1)));
419+ //previewStyle.Setters.Add(new Setter(Border.UseLayoutRoundingProperty, true));
420+ //reviewStyle.Setters.Add(new Setter(Border.SnapsToDevicePixelsProperty, true));
415421
422+ // ✅ 최종 적용
416423 Application . Current . Resources [ "PreviewWindowBorderStyle" ] = previewStyle ;
417424 } , DispatcherPriority . Render ) ;
418425 }
0 commit comments