[Scummvm-cvs-logs] SF.net SVN: scummvm:[35480] scummvm/trunk/gui

jvprat at users.sourceforge.net jvprat at users.sourceforge.net
Mon Dec 22 11:31:01 CET 2008


Revision: 35480
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35480&view=rev
Author:   jvprat
Date:     2008-12-22 10:31:01 +0000 (Mon, 22 Dec 2008)

Log Message:
-----------
Allow the disabled state of the popup widget to be themed

Modified Paths:
--------------
    scummvm/trunk/gui/ThemeData.cpp
    scummvm/trunk/gui/ThemeEngine.cpp
    scummvm/trunk/gui/ThemeEngine.h
    scummvm/trunk/gui/themes/default.inc
    scummvm/trunk/gui/themes/scummclassic/classic_gfx.stx
    scummvm/trunk/gui/themes/scummclassic.zip
    scummvm/trunk/gui/themes/scummmodern/scummmodern_gfx.stx
    scummvm/trunk/gui/themes/scummmodern.zip

Modified: scummvm/trunk/gui/ThemeData.cpp
===================================================================
--- scummvm/trunk/gui/ThemeData.cpp	2008-12-22 09:47:13 UTC (rev 35479)
+++ scummvm/trunk/gui/ThemeData.cpp	2008-12-22 10:31:01 UTC (rev 35480)
@@ -78,6 +78,7 @@
 
 	{kDDPopUpIdle, 					"popup_idle", 	true, 	kDDNone},
 	{kDDPopUpHover, 				"popup_hover", 	false, 	kDDPopUpIdle},
+	{kDDPopUpDisabled, 				"popup_disabled", 	true, 	kDDNone},
 
 	{kDDCaret, 						"caret", 		false, 	kDDNone},
 	{kDDSeparator, 					"separator", 	true, 	kDDNone},

Modified: scummvm/trunk/gui/ThemeEngine.cpp
===================================================================
--- scummvm/trunk/gui/ThemeEngine.cpp	2008-12-22 09:47:13 UTC (rev 35479)
+++ scummvm/trunk/gui/ThemeEngine.cpp	2008-12-22 10:31:01 UTC (rev 35480)
@@ -774,8 +774,15 @@
 	if (!ready())
 		return;
 
-	DrawData dd = (state == kStateHighlight) ? kDDPopUpHover : kDDPopUpIdle;
+	DrawData dd = kDDPopUpIdle;
 
+	if (state == kStateEnabled)
+		dd = kDDPopUpIdle;
+	else if (state == kStateHighlight)
+		dd = kDDPopUpHover;
+	else if (state == kStateDisabled)
+		dd = kDDPopUpDisabled;
+
 	queueDD(dd, r);
 
 	if (!sel.empty()) {

Modified: scummvm/trunk/gui/ThemeEngine.h
===================================================================
--- scummvm/trunk/gui/ThemeEngine.h	2008-12-22 09:47:13 UTC (rev 35479)
+++ scummvm/trunk/gui/ThemeEngine.h	2008-12-22 10:31:01 UTC (rev 35480)
@@ -101,6 +101,7 @@
 
 		kDDPopUpIdle,
 		kDDPopUpHover,
+		kDDPopUpDisabled,
 
 		kDDCaret,
 		kDDSeparator,

Modified: scummvm/trunk/gui/themes/default.inc
===================================================================
--- scummvm/trunk/gui/themes/default.inc	2008-12-22 09:47:13 UTC (rev 35479)
+++ scummvm/trunk/gui/themes/default.inc	2008-12-22 10:31:01 UTC (rev 35480)
@@ -193,6 +193,25 @@
 "horizontal_align='left' "
 "/> "
 "</drawdata> "
+"<drawdata id='popup_disabled' cache='false'> "
+"<drawstep func='bevelsq' "
+"bevel='2' "
+"fill='none' "
+"/> "
+"<drawstep func='triangle' "
+"fg_color='lightgrey' "
+"fill='foreground' "
+"width='height' "
+"height='auto' "
+"xpos='right' "
+"ypos='center' "
+"orientation='bottom' "
+"/> "
+"<text font='text_disabled' "
+"vertical_align='center' "
+"horizontal_align='left' "
+"/> "
+"</drawdata> "
 "<drawdata id='popup_hover' cache='false'> "
 "<drawstep func='bevelsq' "
 "bevel='2' "

Modified: scummvm/trunk/gui/themes/scummclassic/classic_gfx.stx
===================================================================
--- scummvm/trunk/gui/themes/scummclassic/classic_gfx.stx	2008-12-22 09:47:13 UTC (rev 35479)
+++ scummvm/trunk/gui/themes/scummclassic/classic_gfx.stx	2008-12-22 10:31:01 UTC (rev 35480)
@@ -238,6 +238,25 @@
 		/>
 	</drawdata>
 
+	<drawdata id = 'popup_disabled' cache = 'false'>
+		<drawstep	func = 'bevelsq'
+					bevel = '2'
+					fill = 'none'
+		/>
+		<drawstep	func = 'triangle'
+					fg_color = 'lightgrey'
+					fill = 'foreground'
+					width = 'height'
+					height = 'auto'
+					xpos = 'right'
+					ypos = 'center'
+					orientation = 'bottom'
+		/>
+		<text	font = 'text_disabled'
+				vertical_align = 'center'
+				horizontal_align = 'left'
+		/>
+	</drawdata>
 
 	<drawdata id = 'popup_hover' cache = 'false'>
 		<drawstep	func = 'bevelsq'
@@ -361,4 +380,4 @@
 					bevel = '2'
 		/>
 	</drawdata>
-</render_info>
\ No newline at end of file
+</render_info>

Modified: scummvm/trunk/gui/themes/scummclassic.zip
===================================================================
(Binary files differ)

Modified: scummvm/trunk/gui/themes/scummmodern/scummmodern_gfx.stx
===================================================================
--- scummvm/trunk/gui/themes/scummmodern/scummmodern_gfx.stx	2008-12-22 09:47:13 UTC (rev 35479)
+++ scummvm/trunk/gui/themes/scummmodern/scummmodern_gfx.stx	2008-12-22 10:31:01 UTC (rev 35480)
@@ -306,6 +306,28 @@
 		/>
 	</drawdata>
 
+	<drawdata id = 'popup_disabled' cache = 'false'>
+		<drawstep	func = 'roundedsq'
+					stroke = '0'
+					radius = '4'
+					fill = 'foreground'
+					fg_color = '250, 237, 190'
+					shadow = '2'
+		/>
+		<drawstep	func = 'triangle'
+					fg_color = '63, 60, 52'
+					fill = 'foreground'
+					width = 'height'
+					height = 'auto'
+					xpos = 'right'
+					ypos = 'center'
+					orientation = 'bottom'
+		/>
+		<text	font = 'text_default'
+				vertical_align = 'center'
+				horizontal_align = 'left'
+		/>
+	</drawdata>
 
 	<drawdata id = 'popup_hover' cache = 'false'>
 		<drawstep	func = 'roundedsq'
@@ -486,4 +508,4 @@
 					shadow = '3'
 		/>
 	</drawdata>
-</render_info>
\ No newline at end of file
+</render_info>

Modified: scummvm/trunk/gui/themes/scummmodern.zip
===================================================================
(Binary files differ)


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