HaikuDepot: Added TextView::ParagraphStyle() ...
... to get the initial/default paragraph style.
This commit is contained in:
@@ -16,7 +16,7 @@ TextView::TextView(const char* name)
|
||||
BFont font;
|
||||
GetFont(&font);
|
||||
|
||||
ParagraphStyle style;
|
||||
::ParagraphStyle style;
|
||||
style.SetLineSpacing(ceilf(font.Size() * 0.2));
|
||||
|
||||
SetParagraphStyle(style);
|
||||
@@ -115,7 +115,7 @@ TextView::SetText(const BString& text)
|
||||
|
||||
|
||||
void
|
||||
TextView::SetParagraphStyle(const ParagraphStyle& style)
|
||||
TextView::SetParagraphStyle(const ::ParagraphStyle& style)
|
||||
{
|
||||
fText.SetStyle(style);
|
||||
fTextLayout.SetParagraph(fText);
|
||||
|
||||
@@ -31,7 +31,9 @@ public:
|
||||
float* max, float* preferred);
|
||||
|
||||
void SetText(const BString& text);
|
||||
void SetParagraphStyle(const ParagraphStyle& style);
|
||||
void SetParagraphStyle(const ::ParagraphStyle& style);
|
||||
const ::ParagraphStyle& ParagraphStyle() const
|
||||
{ return fText.Style(); }
|
||||
|
||||
private:
|
||||
Paragraph fText;
|
||||
|
||||
Reference in New Issue
Block a user