[Scummvm-cvs-logs] SF.net SVN: scummvm: [21793] scummvm/trunk/gui/PopUpWidget.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Tue Apr 11 08:46:04 CEST 2006


Revision: 21793
Author:   lordhoto
Date:     2006-04-11 08:45:21 -0700 (Tue, 11 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21793&view=rev

Log Message:
-----------
Fixes cutted texts with --force-1x-overlay.

Modified Paths:
--------------
    scummvm/trunk/gui/PopUpWidget.cpp
Modified: scummvm/trunk/gui/PopUpWidget.cpp
===================================================================
--- scummvm/trunk/gui/PopUpWidget.cpp	2006-04-11 15:34:07 UTC (rev 21792)
+++ scummvm/trunk/gui/PopUpWidget.cpp	2006-04-11 15:45:21 UTC (rev 21793)
@@ -322,7 +322,7 @@
 		// Draw a separator
 		g_gui.theme()->drawLineSeparator(Common::Rect(x, y, x+w, y+kLineHeight));
 	} else {
-		g_gui.theme()->drawText(Common::Rect(x+1, y+2, x+w-1, y+kLineHeight), name,	hilite ? Theme::kStateHighlight : Theme::kStateEnabled,
+		g_gui.theme()->drawText(Common::Rect(x+1, y+2, x+w, y+2+kLineHeight), name,	hilite ? Theme::kStateHighlight : Theme::kStateEnabled,
 								Theme::kTextAlignLeft);
 	}
 }
@@ -410,7 +410,7 @@
 
 	// Draw the label, if any
 	if (_labelWidth > 0)
-		g_gui.theme()->drawText(Common::Rect(_x+2,_y+3,_x+_labelWidth, _y+g_gui.theme()->getFontHeight()), _label,
+		g_gui.theme()->drawText(Common::Rect(_x+2,_y+3,_x+2+_labelWidth, _y+3+g_gui.theme()->getFontHeight()), _label,
 								isEnabled() ? Theme::kStateEnabled : Theme::kStateDisabled, Theme::kTextAlignRight);
 
 	// Draw a set of arrows at the right end to signal this is a dropdown/popup
@@ -432,7 +432,7 @@
 	// Draw the selected entry, if any
 	if (_selectedItem >= 0) {
 		TextAlignment align = (g_gui.getStringWidth(_entries[_selectedItem].name) > w-6) ? kTextAlignRight : kTextAlignLeft;
-		g_gui.theme()->drawText(Common::Rect(x+2, _y+3, _x+w-6, _y+g_gui.theme()->getFontHeight()), _entries[_selectedItem].name,
+		g_gui.theme()->drawText(Common::Rect(x+2, _y+3, _x+2+w-6, _y+3+g_gui.theme()->getFontHeight()), _entries[_selectedItem].name,
 								isEnabled() ? Theme::kStateEnabled : Theme::kStateDisabled, g_gui.theme()->convertAligment(align));
 	}
 }


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