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

List:       kde-commits
Subject:    KDE/kdepim/kontact/src
From:       Rafael Fernández López <ereslibre () kde ! org>
Date:       2008-06-30 23:51:58
Message-ID: 1214869918.931917.25162.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 826566 by ereslibre:

This saves space from my side (the sidebar widget). Also, as requested on IRC (don't \
remember who), the itemview does not get the focus.

BUG: 165419


 M  +13 -5     iconsidepane.cpp  
 M  +3 -0      iconsidepane.h  


--- trunk/KDE/kdepim/kontact/src/iconsidepane.cpp #826565:826566
@@ -88,6 +88,11 @@
     {
     }
 
+    void emitLayoutChanged()
+    {
+        emit layoutChanged();
+    }
+
     void setPluginList( const QList<Kontact::Plugin*> &list ) {
       pluginList = list;
     }
@@ -344,10 +349,6 @@
     maxWidth = qMax( maxWidth, sizeHintForIndex( index ).width() );
   }
 
-  if ( !verticalScrollBar()->isVisible() ) {
-    maxWidth += style()->pixelMetric( QStyle::PM_ScrollBarExtent ) * 2;
-  }
-
   int viewHeight = QListView::sizeHint().height();
 
   return QSize( maxWidth + rect().width() - contentsRect().width(), viewHeight );
@@ -452,7 +453,7 @@
   Prefs::self()->setSidePaneShowIcons( mShowIcons );
   Prefs::self()->setSidePaneShowText( mShowText );
 
-  scheduleDelayedItemsLayout();
+  mModel->emitLayoutChanged();
 
   parentWidget()->setMaximumWidth( sizeHint().width() );
   parentWidget()->setMinimumWidth( sizeHint().width() );
@@ -462,6 +463,7 @@
   : SidePaneBase( core, parent )
 {
   mNavigator = new Navigator( this );
+  mNavigator->setFocusPolicy( Qt::NoFocus );
   connect( mNavigator, SIGNAL(pluginActivated(Kontact::Plugin*)),
            SIGNAL(pluginSelected(Kontact::Plugin*)) );
 }
@@ -480,8 +482,14 @@
   mNavigator->updatePlugins( core()->pluginList() );
 }
 
+void IconSidePane::resizeEvent( QResizeEvent *event )
+{
+  setMaximumWidth( mNavigator->sizeHint().width() );
+  setMinimumWidth( mNavigator->sizeHint().width() );
 }
 
+}
+
 #include "iconsidepane.moc"
 
 // vim: sw=2 sts=2 et tw=80
--- trunk/KDE/kdepim/kontact/src/iconsidepane.h #826565:826566
@@ -111,6 +111,9 @@
   public slots:
     virtual void updatePlugins();
 
+  protected:
+    virtual void resizeEvent( QResizeEvent *event ); 
+
   private:
     Navigator *mNavigator;
 };


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

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