File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -224,12 +224,15 @@ def _render(self, _):
224224
225225 # Scale each element around its own origin when scrolling
226226 scale = self ._zoom_filter .x
227- rl .rl_push_matrix ()
228- rl .rl_scalef (scale , scale , 1.0 )
229- rl .rl_translatef ((1 - scale ) * (x + item .rect .width / 2 ) / scale ,
230- (1 - scale ) * (y + item .rect .height / 2 ) / scale , 0 )
231- item .render ()
232- rl .rl_pop_matrix ()
227+ if scale != 1.0 :
228+ rl .rl_push_matrix ()
229+ rl .rl_scalef (scale , scale , 1.0 )
230+ rl .rl_translatef ((1 - scale ) * (x + item .rect .width / 2 ) / scale ,
231+ (1 - scale ) * (y + item .rect .height / 2 ) / scale , 0 )
232+ item .render ()
233+ rl .rl_pop_matrix ()
234+ else :
235+ item .render ()
233236
234237 # Draw scroll indicator
235238 if SCROLL_BAR and not self ._horizontal and len (visible_items ) > 0 :
You can’t perform that action at this time.
0 commit comments