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

List:       kde-commits
Subject:    branches/KDE/4.4/kdebase/apps/konsole/src
From:       Christoph Feck <christoph () maxiom ! de>
Date:       2010-01-07 0:02:58
Message-ID: 1262822578.557188.29120.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1070888 by cfeck:

Use sizeHint() instead of pixelMetric() to get scroll bar size (backport r1070887)

CCBUG: 194088


 M  +2 -4      TerminalDisplay.cpp  


--- branches/KDE/4.4/kdebase/apps/konsole/src/TerminalDisplay.cpp #1070887:1070888
@@ -2708,8 +2708,7 @@
 
 void TerminalDisplay::calcGeometry()
 {
-  _scrollBar->resize(QApplication::style()->pixelMetric(QStyle::PM_ScrollBarExtent),
-                    contentsRect().height());
+  _scrollBar->resize(_scrollBar->sizeHint().width(), contentsRect().height());
   switch(_scrollbarLocation)
   {
     case NoScrollBar :
@@ -2764,8 +2763,7 @@
 // calculate the needed size, this must be synced with calcGeometry()
 void TerminalDisplay::setSize(int columns, int lines)
 {
-  int scrollBarWidth = _scrollBar->isHidden() ? 0 :  
-                        style()->pixelMetric(QStyle::PM_ScrollBarExtent);
+  int scrollBarWidth = _scrollBar->isHidden() ? 0 : _scrollBar->sizeHint().width();
   int horizontalMargin = 2 * DEFAULT_LEFT_MARGIN;
   int verticalMargin = 2 * DEFAULT_TOP_MARGIN;
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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