[Digikam-devel] [Bug 115460] opening and closing right pane with tag filter also changes width of left pane and vv

Gilles Caulier caulier.gilles at free.fr
Fri Mar 31 20:20:38 BST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=115460         




------- Additional Comments From caulier.gilles free fr  2006-03-31 21:20 -------
SVN commit 525080 by cgilles:

digikam from stable : fix sidebar sizes and splitter border attributes from main interface.

CCBUGS: 115460


 M  +20 -26    digikamview.cpp  


--- branches/stable/extragear/graphics/digikam/digikam/digikamview.cpp #525079:525080
 @ -68,26 +68,30  @
 DigikamView::DigikamView(QWidget *parent)
     : QHBox(parent)
 {
-    mParent = static_cast<DigikamApp *>(parent);
+    mParent      = static_cast<DigikamApp *>(parent);
+    mAlbumMan    = AlbumManager::instance();
+    mMainSidebar = new Digikam::Sidebar(this, Digikam::Sidebar::Left);
 
-    mAlbumMan = AlbumManager::instance();
+    mSplitter    = new QSplitter(this);
+    msplitter->setFrameStyle( QFrame::NoFrame );
+    msplitter->setFrameShadow( QFrame::Plain );
+    msplitter->setFrameShape( QFrame::NoFrame );
+    mSplitter->setOpaqueResize(false);
 
-    mMainSidebar = new Digikam::Sidebar(this, Digikam::Sidebar::Left);
-    
-    mSplitter = new QSplitter(this);
-    
     mMainSidebar->setSplitter(mSplitter);
     
     mIconView = new AlbumIconView(mSplitter);
+    QSizePolicy rightSzPolicy(QSizePolicy::Preferred, QSizePolicy::Expanding, 2, 1);
+    mIconView->setSizePolicy(rightSzPolicy);
     
     mRightSidebar = new Digikam::Sidebar(this, Digikam::Sidebar::Right, true);
     mRightSidebar->setSplitter(mSplitter);    
     
-    mFolderView = new AlbumFolderView(this);
-    mDateFolderView = new DateFolderView(this);
-    mTagFolderView = new TagFolderView(this);
+    mFolderView       = new AlbumFolderView(this);
+    mDateFolderView   = new DateFolderView(this);
+    mTagFolderView    = new TagFolderView(this);
     mSearchFolderView = new SearchFolderView(this);
-    mTagFilterView = new TagFilterView(this);    
+    mTagFilterView    = new TagFilterView(this);    
     
     mMainSidebar->appendTab(mFolderView, SmallIcon("folder"), i18n("Albums"));    
     mMainSidebar->appendTab(mDateFolderView, SmallIcon("date"), i18n("Dates"));
 @ -124,10 +128,13  @
 
     connect(mAlbumMan, SIGNAL(signalAlbumCurrentChanged(Album*)),
             this, SLOT(slot_albumSelected(Album*)));
+
     connect(mAlbumMan, SIGNAL(signalAlbumsCleared()),
             this, SLOT(slot_albumsCleared()));
+
     connect(mAlbumMan, SIGNAL(signalAlbumDeleted(Album*)),
             this, SLOT(slotAlbumDeleted(Album*)));
+
     connect(mAlbumMan, SIGNAL(signalAllAlbumsLoaded()),
             this, SLOT(slotAllAlbumsLoaded()));    
     
 @ -151,31 +158,18  @
     // -- Sidebar Connections -------------------------------------
 
     connect(mMainSidebar, SIGNAL(signalChangedTab(QWidget*)),
-            SLOT(slotLeftSidebarChangedTab(QWidget*)));
-
+            this, SLOT(slotLeftSidebarChangedTab(QWidget*)));
 }
 
 void DigikamView::loadViewState()
 {
-    QSizePolicy leftSzPolicy(QSizePolicy::Preferred,
-                             QSizePolicy::Expanding,
-                             1, 1);
-    QSizePolicy rightSzPolicy(QSizePolicy::Preferred,
-                              QSizePolicy::Expanding,
-                              2, 1);
     KConfig *config = kapp->config();
     config->setGroup("MainWindow");
+
     if(config->hasKey("SplitterSizes"))
-    {
         mSplitter->setSizes(config->readIntListEntry("SplitterSizes"));
-    }
-    else 
-    {
-        mIconView->setSizePolicy(rightSzPolicy);
-    }    
     
-    mInitialAlbumID = config->readNumEntry("InitialAlbumID", 0);
-    
+    mInitialAlbumID = config->readNumEntry("InitialAlbumID", 0);    
 }
 
 void DigikamView::saveViewState()



More information about the Digikam-devel mailing list