Permalink
Browse files

HaikuDepot: Added TextView::ParagraphStyle() ...

 ... to get the initial/default paragraph style.
  • Loading branch information...
1 parent cb97f23 commit 6c5c4d84373e75f3f8486a9a4a8ceda446ebadd4 @stippi stippi committed Sep 8, 2013
Showing with 5 additions and 3 deletions.
  1. +2 −2 src/apps/haiku-depot/textview/TextView.cpp
  2. +3 −1 src/apps/haiku-depot/textview/TextView.h
@@ -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 @@ class TextView : public BView {
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;

0 comments on commit 6c5c4d8

Please sign in to comment.