@@ -535,6 +535,45 @@ public string UserMessagePlaceholder
535535 // Tab items — built once and reused.
536536 private readonly List < string > _tabs = new ( ) ;
537537
538+ static CrashReportDialog ( )
539+ {
540+ CornerRadiusProperty . Changed . AddClassHandler < CrashReportDialog > ( ( x , e ) => x . OnCornerRadiusChanged ( e ) ) ;
541+ }
542+
543+ private void OnCornerRadiusChanged ( AvaloniaPropertyChangedEventArgs e )
544+ {
545+ try
546+ {
547+ if ( IsVGUIActive ( ) )
548+ {
549+ System . Diagnostics . Debug . WriteLine ( "[CrashReportDialog] VGUI theme active, setting CornerRadius to 0" ) ;
550+ SetValue ( CornerRadiusProperty , new CornerRadius ( 0 ) ) ;
551+ }
552+ }
553+ catch ( Exception ex )
554+ {
555+ System . Diagnostics . Debug . WriteLine ( $ "[CrashReportDialog] Error in OnCornerRadiusChanged: { ex . Message } ") ;
556+ }
557+ }
558+
559+ /// <summary>
560+ /// Checks if the VGUI theme is currently active.
561+ /// </summary>
562+ protected static bool IsVGUIActive ( )
563+ {
564+ try
565+ {
566+ var isActive = PleasantUI . Core . PleasantSettings . Current ? . Theme == "VGUI" ;
567+ System . Diagnostics . Debug . WriteLine ( $ "[CrashReportDialog] IsVGUIActive: { isActive } ") ;
568+ return isActive ;
569+ }
570+ catch ( Exception ex )
571+ {
572+ System . Diagnostics . Debug . WriteLine ( $ "[CrashReportDialog] Error checking VGUI status: { ex . Message } ") ;
573+ return false ;
574+ }
575+ }
576+
538577 // ── Convenience factory ───────────────────────────────────────────────────
539578
540579 /// <summary>
@@ -571,6 +610,19 @@ protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
571610 {
572611 base . OnApplyTemplate ( e ) ;
573612
613+ try
614+ {
615+ if ( IsVGUIActive ( ) )
616+ {
617+ System . Diagnostics . Debug . WriteLine ( "[CrashReportDialog] OnApplyTemplate: VGUI theme active, setting CornerRadius to 0" ) ;
618+ CornerRadius = new CornerRadius ( 0 ) ;
619+ }
620+ }
621+ catch ( Exception ex )
622+ {
623+ System . Diagnostics . Debug . WriteLine ( $ "[CrashReportDialog] Error in OnApplyTemplate: { ex . Message } ") ;
624+ }
625+
574626 DetachHandlers ( ) ;
575627
576628 _sendButton = e . NameScope . Find < Button > ( PART_SendButton ) ;
0 commit comments