mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-29 00:23:48 +00:00
Add support for transparent background color for ui::Slider to draw ui::IntEntry popup window without background
This commit is contained in:
parent
eba1508473
commit
fd6e4ccc21
Binary file not shown.
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
@ -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()));
|
||||
|
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user