From 6c5c4d84373e75f3f8486a9a4a8ceda446ebadd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sun, 8 Sep 2013 18:41:08 +0200 Subject: [PATCH] HaikuDepot: Added TextView::ParagraphStyle() ... ... to get the initial/default paragraph style. --- src/apps/haiku-depot/textview/TextView.cpp | 4 ++-- src/apps/haiku-depot/textview/TextView.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/apps/haiku-depot/textview/TextView.cpp b/src/apps/haiku-depot/textview/TextView.cpp index 836b401de3..6469f2a234 100644 --- a/src/apps/haiku-depot/textview/TextView.cpp +++ b/src/apps/haiku-depot/textview/TextView.cpp @@ -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); diff --git a/src/apps/haiku-depot/textview/TextView.h b/src/apps/haiku-depot/textview/TextView.h index 109a0111f7..890ab28809 100644 --- a/src/apps/haiku-depot/textview/TextView.h +++ b/src/apps/haiku-depot/textview/TextView.h @@ -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;