From 93b955c3e634530a1910c522a3c973ba031df6bb Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 17 Feb 2009 22:24:14 +0000 Subject: assure that the size hint calculation and the painting code are consistent svn path=/trunk/KDE/kdebase/apps/; revision=927623 --- src/panels/information/metatextlabel.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/panels/information/metatextlabel.h') diff --git a/src/panels/information/metatextlabel.h b/src/panels/information/metatextlabel.h index 36ae88e99..e1486c675 100644 --- a/src/panels/information/metatextlabel.h +++ b/src/panels/information/metatextlabel.h @@ -40,6 +40,7 @@ public: protected: virtual void paintEvent(QPaintEvent* event); + virtual void resizeEvent(QResizeEvent* event); private: enum { Spacing = 2 }; @@ -57,6 +58,13 @@ private: * fit into the available width of the widget. */ int requiredHeight(const MetaInfo& metaInfo) const; + + /** + * Returns the maximum height in pixels for the text of + * one added line. The returned value does not contain + * any additional spacing between texts. + */ + int maxHeightPerLine() const; }; #endif -- cgit v1.3.1