Add support for transparent background color for ui::Slider to draw ui::IntEntry popup window without background

This commit is contained in:
David Capello 2013-04-03 21:17:12 -03:00
parent eba1508473
commit fd6e4ccc21
3 changed files with 6 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -1374,6 +1374,11 @@ void SkinTheme::paintSlider(PaintEvent& ev)
int min, max, value;
char buf[256];
// Outside borders
ui::Color bgcolor = widget->getBgColor();
if (!is_transparent(bgcolor))
jdraw_rectfill(widget->rc, bgcolor);
widget->getSliderThemeInfo(&min, &max, &value);
Rect rc(widget->getClientBounds().shrink(widget->getBorder()));

View File

@ -106,6 +106,7 @@ void IntEntry::openPopup()
m_popupWindow = new PopupWindow(NULL, false);
m_popupWindow->setAutoRemap(false);
m_popupWindow->setBounds(rc);
m_popupWindow->setBgColor(rgba(0, 0, 0, 0));
Region rgn(rc.createUnion(getBounds()));
rgn.createUnion(rgn, Region(getBounds()));