gui2/canvas: Fix zero-width rectangles being painted 1 px-wide
This fixes the selection highlight for textboxes glitching into view as a 1 px-wide highlight on the left end when there isn't an active selection.
This commit is contained in:
parent
5e005007bd
commit
7fa70375e1
1 changed files with 1 additions and 1 deletions
|
@ -738,7 +738,7 @@ void trectangle::draw(surface& canvas,
|
|||
}
|
||||
|
||||
// Fill the background, if applicable
|
||||
if(fill_color_) {
|
||||
if(fill_color_ && w && h) {
|
||||
set_renderer_color(renderer, fill_color_);
|
||||
|
||||
SDL_Rect area {
|
||||
|
|
Loading…
Add table
Reference in a new issue