mirror of https://github.com/aseprite/aseprite.git
Avoid drawing text over widget borders in SkinTheme::drawTextString()
This commit is contained in:
parent
05507408e1
commit
7989cd81bb
|
@ -2000,6 +2000,10 @@ void SkinTheme::drawTextString(Graphics* g, const char *t, ui::Color fg_color, u
|
||||||
}
|
}
|
||||||
|
|
||||||
// Text
|
// Text
|
||||||
|
Rect textWrap = textrc.createIntersect(
|
||||||
|
Rect(widget->getClientBounds()).shrink(widget->getBorder()));
|
||||||
|
|
||||||
|
if (IntersectClip clip = IntersectClip(g, textWrap)) {
|
||||||
if (!widget->isEnabled()) {
|
if (!widget->isEnabled()) {
|
||||||
// TODO avoid this
|
// TODO avoid this
|
||||||
if (fill_bg) // Only to draw the background
|
if (fill_bg) // Only to draw the background
|
||||||
|
@ -2020,6 +2024,7 @@ void SkinTheme::drawTextString(Graphics* g, const char *t, ui::Color fg_color, u
|
||||||
getColor(ThemeColor::Text))),
|
getColor(ThemeColor::Text))),
|
||||||
bg_color, fill_bg, textrc.getOrigin());
|
bg_color, fill_bg, textrc.getOrigin());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SkinTheme::draw_entry_caret(Entry* widget, int x, int y)
|
void SkinTheme::draw_entry_caret(Entry* widget, int x, int y)
|
||||||
|
|
Loading…
Reference in New Issue