[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenetwork/knewsticker
From:       Frerich Raabe <raabe () kde ! org>
Date:       2003-12-11 2:35:02
[Download RAW message or body]

CVS commit by raabe: 

- Fixed height of newsticker for vertical panels
CCMAIL:70077-done@bugs.kde.org


  M +2 -2      knewsticker.cpp   1.165
  M +5 -0      newsscroller.cpp   1.98
  M +1 -0      newsscroller.h   1.45


--- kdenetwork/knewsticker/knewsticker.cpp  #1.164:1.165
@@ -95,10 +95,10 @@ KNewsTicker::~KNewsTicker()
 int KNewsTicker::heightForWidth(int) const
 {
-        return m_scroller->height();
+        return m_scroller->sizeHint().height() + m_arrowButton->height();
 }
 
 int KNewsTicker::widthForHeight(int) const
 {
-        return QFontMetrics(m_cfg->font()).width(QString::fromLatin1("X")) * 20 + \
m_arrowButton->width(); +        return m_scroller->sizeHint().width() + \
m_arrowButton->width();  }
 

--- kdenetwork/knewsticker/newsscroller.cpp  #1.97:1.98
@@ -151,4 +151,9 @@ NewsScroller::NewsScroller(QWidget *pare
 }
 
+QSize NewsScroller::sizeHint() const
+{
+        return QSize(fontMetrics().width(QString::fromLatin1("X")) * 20, \
fontMetrics().height() * 2); +}
+
 QSizePolicy NewsScroller::sizePolicy() const
 {

--- kdenetwork/knewsticker/newsscroller.h  #1.44:1.45
@@ -36,4 +36,5 @@ class NewsScroller : public QFrame
                 NewsScroller(QWidget *, ConfigAccess *, const char * = 0);
 
+                virtual QSize sizeHint() const;
                 virtual QSizePolicy sizePolicy() const;
         


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic