Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arcade/gui/widgets/buttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def do_render(self, surface: Surface):
current_state = self.get_current_state()
current_texture = self._textures.get(current_state)
if current_texture:
surface.draw_texture(0, 0, self.width, self.height, current_texture)
surface.draw_texture(0, 0, self.content_width, self.content_height, current_texture)

def apply_style(self, style: UIStyle):
"""
Expand Down
4 changes: 2 additions & 2 deletions arcade/gui/widgets/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def do_render(self, surface: Surface):
surface.draw_texture(
x=0,
y=0,
width=self.width,
height=self.height,
width=self.content_width,
height=self.content_height,
tex=self.texture
)
2 changes: 1 addition & 1 deletion arcade/gui/widgets/toggle.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def do_render(self, surface: Surface):
tex = self.pressed_on_tex if self.value else self.pressed_off_tex
elif self.hovered:
tex = self.hover_on_tex if self.value else self.hover_off_tex
surface.draw_texture(0, 0, self.width, self.height, tex)
surface.draw_texture(0, 0, self.content_width, self.content_height, tex)

def on_change(self, event: UIOnChangeEvent):
pass