@@ -46,26 +46,23 @@ public IBrush PrefixBackground
46
46
set => SetValue ( PrefixBackgroundProperty , value ) ;
47
47
}
48
48
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 ) ) ;
51
51
52
- public string Message
52
+ public string Subject
53
53
{
54
- get => GetValue ( MessageProperty ) ;
55
- set => SetValue ( MessageProperty , value ) ;
54
+ get => GetValue ( SubjectProperty ) ;
55
+ set => SetValue ( SubjectProperty , value ) ;
56
56
}
57
57
58
58
public override void Render ( DrawingContext context )
59
59
{
60
60
base . Render ( context ) ;
61
61
62
- var message = Message ?? string . Empty ;
63
- if ( string . IsNullOrEmpty ( message ) )
62
+ var subject = Subject ;
63
+ if ( string . IsNullOrEmpty ( subject ) )
64
64
return ;
65
65
66
- var subjectIdx = message . IndexOf ( '\n ' , StringComparison . Ordinal ) ;
67
- var subject = subjectIdx > 0 ? message . Substring ( 0 , subjectIdx ) . Trim ( ) : message ;
68
-
69
66
var typeface = new Typeface ( FontFamily , FontStyle . Normal , FontWeight . Normal ) ;
70
67
var foreground = Foreground ;
71
68
var x = 0.0 ;
@@ -108,7 +105,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
108
105
{
109
106
base . OnPropertyChanged ( change ) ;
110
107
111
- if ( change . Property == MessageProperty ||
108
+ if ( change . Property == SubjectProperty ||
112
109
change . Property == FontFamilyProperty ||
113
110
change . Property == FontSizeProperty ||
114
111
change . Property == ForegroundProperty ||
0 commit comments