[Scummvm-cvs-logs] SF.net SVN: scummvm:[43423] scummvm/branches/branch-1-0-0/gui/TabWidget.cpp

agent-q at users.sourceforge.net agent-q at users.sourceforge.net
Sun Aug 16 04:20:16 CEST 2009


Revision: 43423
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43423&view=rev
Author:   agent-q
Date:     2009-08-16 02:20:16 +0000 (Sun, 16 Aug 2009)

Log Message:
-----------
Backport of #39266: Allow the tab headings to automatically expand even when a width isn't specified in the theme.

Modified Paths:
--------------
    scummvm/branches/branch-1-0-0/gui/TabWidget.cpp

Modified: scummvm/branches/branch-1-0-0/gui/TabWidget.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/gui/TabWidget.cpp	2009-08-16 01:49:17 UTC (rev 43422)
+++ scummvm/branches/branch-1-0-0/gui/TabWidget.cpp	2009-08-16 02:20:16 UTC (rev 43423)
@@ -217,16 +217,17 @@
 
 	if (_tabWidth == 0) {
 		_tabWidth = 40;
-		int maxWidth = _w / _tabs.size();
+	}
 
-		for (uint i = 0; i < _tabs.size(); ++i) {
-			// Determine the new tab width
-			int newWidth = g_gui.getStringWidth(_tabs[i].title) + 2 * 3;
-			if (_tabWidth < newWidth)
-				_tabWidth = newWidth;
-			if (_tabWidth > maxWidth)
-				_tabWidth = maxWidth;
-		}
+	int maxWidth = _w / _tabs.size();
+
+	for (uint i = 0; i < _tabs.size(); ++i) {
+		// Determine the new tab width
+		int newWidth = g_gui.getStringWidth(_tabs[i].title) + 2 * 3;
+		if (_tabWidth < newWidth)
+			_tabWidth = newWidth;
+		if (_tabWidth > maxWidth)
+			_tabWidth = maxWidth;
 	}
 
 	_butRP = g_gui.xmlEval()->getVar("Globals.TabWidget.NavButton.PaddingRight", 0);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list