Update zwidget
This commit is contained in:
parent
73d1b123eb
commit
322b033c3b
1 changed files with 5 additions and 0 deletions
|
|
@ -149,6 +149,9 @@ void ListView::OnPaint(Canvas* canvas)
|
|||
Colorf textColor = GetStyleColor("color");
|
||||
Colorf selectionColor = GetStyleColor("selection-color");
|
||||
|
||||
// Make sure the text doesn't enter the scrollbar's area.
|
||||
canvas->pushClip({ 0.0, 0.0, w, GetHeight() });
|
||||
|
||||
int index = 0;
|
||||
for (const std::vector<std::string>& item : items)
|
||||
{
|
||||
|
|
@ -169,6 +172,8 @@ void ListView::OnPaint(Canvas* canvas)
|
|||
y += h;
|
||||
index++;
|
||||
}
|
||||
|
||||
canvas->popClip();
|
||||
}
|
||||
|
||||
bool ListView::OnMouseDown(const Point& pos, InputKey key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue