Allow the disabled state of the popup widget to be themed
svn-id: r35480
This commit is contained in:
parent
1ccce41c8f
commit
2ec51ef358
8 changed files with 72 additions and 3 deletions
|
@ -78,6 +78,7 @@ const ThemeEngine::DrawDataInfo ThemeEngine::kDrawDataDefaults[] = {
|
|||
|
||||
{kDDPopUpIdle, "popup_idle", true, kDDNone},
|
||||
{kDDPopUpHover, "popup_hover", false, kDDPopUpIdle},
|
||||
{kDDPopUpDisabled, "popup_disabled", true, kDDNone},
|
||||
|
||||
{kDDCaret, "caret", false, kDDNone},
|
||||
{kDDSeparator, "separator", true, kDDNone},
|
||||
|
|
|
@ -774,7 +774,14 @@ void ThemeEngine::drawPopUpWidget(const Common::Rect &r, const Common::String &s
|
|||
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);
|
||||
|
||||
|
|
|
@ -101,6 +101,7 @@ protected:
|
|||
|
||||
kDDPopUpIdle,
|
||||
kDDPopUpHover,
|
||||
kDDPopUpDisabled,
|
||||
|
||||
kDDCaret,
|
||||
kDDSeparator,
|
||||
|
|
|
@ -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' "
|
||||
|
|
Binary file not shown.
|
@ -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>
|
||||
</render_info>
|
||||
|
|
Binary file not shown.
|
@ -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>
|
||||
</render_info>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue