@@ -46,26 +46,23 @@ public IBrush PrefixBackground
4646 set => SetValue ( PrefixBackgroundProperty , value ) ;
4747 }
4848
49- public static readonly StyledProperty < string > MessageProperty =
50- AvaloniaProperty . Register < StashSubjectPresenter , string > ( nameof ( Message ) ) ;
49+ public static readonly StyledProperty < string > SubjectProperty =
50+ AvaloniaProperty . Register < StashSubjectPresenter , string > ( nameof ( Subject ) ) ;
5151
52- public string Message
52+ public string Subject
5353 {
54- get => GetValue ( MessageProperty ) ;
55- set => SetValue ( MessageProperty , value ) ;
54+ get => GetValue ( SubjectProperty ) ;
55+ set => SetValue ( SubjectProperty , value ) ;
5656 }
5757
5858 public override void Render ( DrawingContext context )
5959 {
6060 base . Render ( context ) ;
6161
62- var message = Message ?? string . Empty ;
63- if ( string . IsNullOrEmpty ( message ) )
62+ var subject = Subject ;
63+ if ( string . IsNullOrEmpty ( subject ) )
6464 return ;
6565
66- var subjectIdx = message . IndexOf ( '\n ' , StringComparison . Ordinal ) ;
67- var subject = subjectIdx > 0 ? message . Substring ( 0 , subjectIdx ) . Trim ( ) : message ;
68-
6966 var typeface = new Typeface ( FontFamily , FontStyle . Normal , FontWeight . Normal ) ;
7067 var foreground = Foreground ;
7168 var x = 0.0 ;
@@ -108,7 +105,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
108105 {
109106 base . OnPropertyChanged ( change ) ;
110107
111- if ( change . Property == MessageProperty ||
108+ if ( change . Property == SubjectProperty ||
112109 change . Property == FontFamilyProperty ||
113110 change . Property == FontSizeProperty ||
114111 change . Property == ForegroundProperty ||
0 commit comments