Skip to content

Commit

Permalink
- Fix for text box shadow_width bug on scroll bar.
Browse files Browse the repository at this point in the history
  • Loading branch information
MyreMylar committed Nov 21, 2019
1 parent 4714202 commit e1c541a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pygame_gui/elements/ui_text_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def rebuild(self):
self.parse_html_into_style_data()
percentage_visible = self.text_wrap_rect[3] / self.formatted_text_block.final_dimensions[1]
scroll_bar_position = (self.relative_rect.right - self.border_width -
- self.shadow_width - self.scroll_bar_width,
self.shadow_width - self.scroll_bar_width,
self.relative_rect.top + self.border_width +
self.shadow_width)

Expand Down Expand Up @@ -275,7 +275,7 @@ def set_relative_position(self, position: Union[pygame.math.Vector2, Tuple[int,

if self.scroll_bar is not None:
scroll_bar_position = (self.relative_rect.right - self.border_width -
- self.shadow_width - self.scroll_bar_width,
self.shadow_width - self.scroll_bar_width,
self.relative_rect.top + self.border_width +
self.shadow_width)
self.scroll_bar.set_relative_position(scroll_bar_position)
Expand All @@ -288,7 +288,7 @@ def set_position(self, position: Union[pygame.math.Vector2, Tuple[int, int], Tup

if self.scroll_bar is not None:
scroll_bar_position = (self.relative_rect.right - self.border_width -
- self.shadow_width - self.scroll_bar_width,
self.shadow_width - self.scroll_bar_width,
self.relative_rect.top + self.border_width +
self.shadow_width)
self.scroll_bar.set_relative_position(scroll_bar_position)
Expand Down

0 comments on commit e1c541a

Please sign in to comment.