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

List:       kde-commits
Subject:    KDE/kdevplatform/sublime
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2009-07-25 20:45:38
Message-ID: 1248554738.001739.30304.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1002385 by apaku:

Also show the status icon without a tabbar.

 M  +7 -0      container.cpp  


--- trunk/KDE/kdevplatform/sublime/container.cpp #1002384:1002385
@@ -50,6 +50,7 @@
     KTabBar *tabBar;
     QStackedWidget *stack;
     QLabel *fileNameCorner;
+    QLabel *fileStatus;
     QLabel *statusCorner;
     QPointer<QWidget> leftCornerWidget;
 
@@ -135,6 +136,9 @@
 
     d->tabBar = new KTabBar(this);
     m_tabBarLayout->addWidget(d->tabBar);
+    d->fileStatus = new QLabel( this );
+    d->fileStatus->setFixedSize( QSize( 16, 16 ) );
+    m_tabBarLayout->addWidget(d->fileStatus);
     d->fileNameCorner = new UnderlinedLabel(d->tabBar, this);
     m_tabBarLayout->addWidget(d->fileNameCorner);
     d->statusCorner = new StatusLabel(d->tabBar, this);
@@ -254,6 +258,7 @@
     QMapIterator<QWidget*, View*> it = d->viewForWidget;
     while (it.hasNext()) {
         if (it.next().value()->document() == doc) {
+            d->fileStatus->setPixmap( doc->statusIcon().pixmap( QSize( 16,16 ) ) );
             int tabIndex = d->stack->indexOf(it.key());
             if (tabIndex != -1) {
                 d->tabBar->setTabIcon(tabIndex, doc->statusIcon());
@@ -341,10 +346,12 @@
     {
         d->tabBar->hide();
         d->fileNameCorner->show();
+        d->fileStatus->show();
     }
     else
     {
         d->fileNameCorner->hide();
+        d->fileStatus->hide();
         d->tabBar->show();
     }
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

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