Version: 1.3 (using KDE KDE 3.2.1) Installed from: SuSE RPMs OS: Linux Resize tab size when the number of tabs does not with on the toolbar. Which would be the same behaviour as the tabs in konqueror have. Related wishes are: http://bugs.kde.org/show_bug.cgi?id=72468 http://bugs.kde.org/show_bug.cgi?id=76592
This was commited to CVS a few days ago. However, there is some discussion on kde-cvs as to whether this should be configurable and default on/off. CVS commit by jriddell: Make tabs automaticly resize when window is too small to show them all M +7 -0 konsole.cpp 1.503
Created attachment 9363 [details] Configurable setAutoResize for tabs Adds a 'Auto Resize Tabs' in the RMB of the 'new' button. I'll update the Help file and perhaps Tip file.
CVS commit by hindenburg: BUG: 77528 Allow user to set automatic resizing of tabs. M +18 -1 konsole.cpp 1.504 M +2 -0 konsole.h 1.194 --- kdebase/konsole/konsole/konsole.cpp #1.503:1.504 @@ -248,4 +248,5 @@ Konsole::Konsole(const char* name, int h ,m_tabViewMode(ShowIconAndText) ,b_dynamicTabHide(false) +,b_autoResizeTabs(false) ,b_fullscreen(false) ,m_menuCreated(false) @@ -837,4 +838,9 @@ void Konsole::makeGUI() dynamicTabHideOption->setChecked(b_dynamicTabHide); dynamicTabHideOption->plug(m_tabbarPopupMenu); + + KToggleAction *m_autoResizeTabs = new KToggleAction( i18n("Auto Resize Tabs"), + 0, this, SLOT( slotToggleAutoResizeTabs() ), this); + m_autoResizeTabs->setChecked(b_autoResizeTabs); + m_autoResizeTabs->plug(m_tabbarPopupMenu); } @@ -868,5 +874,6 @@ void Konsole::makeTabWidget() tabwidget = new KTabWidget(this); tabwidget->setTabReorderingEnabled(true); - tabwidget->setAutomaticResizeTabs(true); + tabwidget->setAutomaticResizeTabs( b_autoResizeTabs ); + if (n_tabbar==TabTop) tabwidget->setTabPosition(QTabWidget::Top); @@ -1342,4 +1349,11 @@ void Konsole::slotTabSetViewOptions(int } +void Konsole::slotToggleAutoResizeTabs() +{ + b_autoResizeTabs = !b_autoResizeTabs; + + tabwidget->setAutomaticResizeTabs( b_autoResizeTabs ); +} + void Konsole::slotTabbarToggleDynamicHide() { @@ -1444,4 +1458,5 @@ void Konsole::saveProperties(KConfig* co config->writeEntry("TabViewMode", int(m_tabViewMode)); config->writeEntry("DynamicTabHide", b_dynamicTabHide); + config->writeEntry("AutoResizeTabs", b_autoResizeTabs); if (se) { @@ -1571,4 +1586,5 @@ void Konsole::readProperties(KConfig* co m_tabViewMode = TabViewModes(config->readNumEntry("TabViewMode", ShowIconAndText)); b_dynamicTabHide = config->readBoolEntry("DynamicTabHide", false); + b_autoResizeTabs = config->readBoolEntry("AutoResizeTabs", false); } @@ -1594,4 +1610,5 @@ void Konsole::applySettingsToGUI() } updateKeytabMenu(); + tabwidget->setAutomaticResizeTabs( b_autoResizeTabs ); } --- kdebase/konsole/konsole/konsole.h #1.193:1.194 @@ -234,4 +234,5 @@ private slots: void slotTabSetViewOptions(int); void slotTabbarToggleDynamicHide(); + void slotToggleAutoResizeTabs(); void slotSetEncoding(); @@ -387,4 +388,5 @@ private: TabViewModes m_tabViewMode; bool b_dynamicTabHide; + bool b_autoResizeTabs; bool b_framevis:1;
I think additionally autoresizing should be turned off when selecting icon only-mode (see 'minimumTabWidth problem' posting on kde-cvs).
Yes, it is ugly with IconOnly and autoresizing on. It shouldn't be too hard to set autoresizing off when IconOnly selected. However, the user can still do this themselves.
You think the user will get the connection? Apparently even developers have problems with that. :-)