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},
|
{kDDPopUpIdle, "popup_idle", true, kDDNone},
|
||||||
{kDDPopUpHover, "popup_hover", false, kDDPopUpIdle},
|
{kDDPopUpHover, "popup_hover", false, kDDPopUpIdle},
|
||||||
|
{kDDPopUpDisabled, "popup_disabled", true, kDDNone},
|
||||||
|
|
||||||
{kDDCaret, "caret", false, kDDNone},
|
{kDDCaret, "caret", false, kDDNone},
|
||||||
{kDDSeparator, "separator", true, kDDNone},
|
{kDDSeparator, "separator", true, kDDNone},
|
||||||
|
|
|
@ -774,7 +774,14 @@ void ThemeEngine::drawPopUpWidget(const Common::Rect &r, const Common::String &s
|
||||||
if (!ready())
|
if (!ready())
|
||||||
return;
|
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);
|
queueDD(dd, r);
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,7 @@ protected:
|
||||||
|
|
||||||
kDDPopUpIdle,
|
kDDPopUpIdle,
|
||||||
kDDPopUpHover,
|
kDDPopUpHover,
|
||||||
|
kDDPopUpDisabled,
|
||||||
|
|
||||||
kDDCaret,
|
kDDCaret,
|
||||||
kDDSeparator,
|
kDDSeparator,
|
||||||
|
|
|
@ -193,6 +193,25 @@
|
||||||
"horizontal_align='left' "
|
"horizontal_align='left' "
|
||||||
"/> "
|
"/> "
|
||||||
"</drawdata> "
|
"</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'> "
|
"<drawdata id='popup_hover' cache='false'> "
|
||||||
"<drawstep func='bevelsq' "
|
"<drawstep func='bevelsq' "
|
||||||
"bevel='2' "
|
"bevel='2' "
|
||||||
|
|
Binary file not shown.
|
@ -238,6 +238,25 @@
|
||||||
/>
|
/>
|
||||||
</drawdata>
|
</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'>
|
<drawdata id = 'popup_hover' cache = 'false'>
|
||||||
<drawstep func = 'bevelsq'
|
<drawstep func = 'bevelsq'
|
||||||
|
|
Binary file not shown.
|
@ -306,6 +306,28 @@
|
||||||
/>
|
/>
|
||||||
</drawdata>
|
</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'>
|
<drawdata id = 'popup_hover' cache = 'false'>
|
||||||
<drawstep func = 'roundedsq'
|
<drawstep func = 'roundedsq'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue