Bug 77528 - Resize tab size when the number of tabs does not with on the toolbar
Summary: Resize tab size when the number of tabs does not with on the toolbar
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 1.3
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-13 22:05 UTC by Richard Bos
Modified: 2005-02-05 21:39 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Configurable setAutoResize for tabs (3.06 KB, patch)
2005-01-31 03:08 UTC, Kurt Hindenburg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Bos 2004-03-13 22:05:40 UTC
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
Comment 1 Kurt Hindenburg 2005-01-29 17:45:36 UTC
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
Comment 2 Kurt Hindenburg 2005-01-31 03:08:08 UTC
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.
Comment 3 Kurt Hindenburg 2005-01-31 20:00:40 UTC
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;


Comment 4 Stephan Binner 2005-02-01 18:05:10 UTC
I think additionally autoresizing should be turned off when selecting icon only-mode (see 'minimumTabWidth problem' posting on kde-cvs).
Comment 5 Kurt Hindenburg 2005-02-04 07:40:23 UTC
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.
Comment 6 Stephan Binner 2005-02-05 21:39:37 UTC
You think the user will get the connection? Apparently even developers have problems with that. :-)