[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdevelop/lib/qextmdi/src
From: Roberto Raggi <roberto () kdevelop ! org>
Date: 2003-08-22 1:19:37
[Download RAW message or body]
CVS commit by raggi:
updated kmultitabbar
M +27 -28 kmultitabbar.cpp 1.3
--- kdevelop/lib/qextmdi/src/kmultitabbar.cpp #1.2:1.3
@@ -48,4 +48,5 @@
KMultiTabBarInternal::KMultiTabBarInternal(QWidget *parent, \
KMultiTabBar::KMultiTabBarMode bm):QScrollView(parent) {
+ m_expandedTabSize=-1;
m_showActiveTabTexts=false;
m_tabs.setAutoDelete(true);
@@ -153,16 +154,14 @@ int KMultiTabBarInternal::appendTab(cons
m_tabs.append(tab= new KMultiTabBarTab(pic,text,id,box,m_position,m_style));
tab->showActiveTabText(m_showActiveTabTexts);
- if (m_showActiveTabTexts)
- {
- int size=0;
- unsigned int i;
- for (i=0;i<m_tabs.count();i++)
+
+ if (m_style==KMultiTabBar::KONQSBC)
{
- int tmp=m_tabs.at(i)->neededSize();
- size=(size<tmp)?tmp:size;
- }
- for (i=0;i<m_tabs.count();i++)
- m_tabs.at(i)->setSize(size);
- }
+ if (m_expandedTabSize<tab->neededSize()) {
+ m_expandedTabSize=tab->neededSize();
+ for (uint i=0;i<m_tabs.count();i++)
+ m_tabs.at(i)->setSize(m_expandedTabSize);
+
+ } else tab->setSize(m_expandedTabSize);
+ } else tab->updateState();
tab->show();
return 0;
@@ -273,5 +272,5 @@ void KMultiTabBarTab::updateState()
QPushButton::setText(m_text);
} else {
- //kdDebug()<<"KMultiTabBarTab::updateState(): setting text \
to an empty QString"<<endl; + \
kdDebug()<<"KMultiTabBarTab::updateState(): setting text to an empty \
QString***************"<<endl; QPushButton::setText(QString::null);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic