Skip to content

Commit

Permalink
Merge pull request #101 from MathisFederico/bug/save_splitter
Browse files Browse the repository at this point in the history
🪲 saves splitter position correctly
  • Loading branch information
MathisFederico authored Dec 8, 2021
2 parents fbaca4a + ef15494 commit aecac6b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions opencodeblocks/blocks/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,12 @@ def update_splitter(self):
"""Change the geometry of the splitter to match the block"""
# We make the resizing of splitter only affect
# the last element of the split view
sizes = self.splitter.sizes()
old_height = self.splitter.height()
self.splitter.setGeometry(
int(self.edge_size),
int(self.edge_size + self.title_widget.height()),
int(self.width - self.edge_size * 2),
int(self.height - self.edge_size * 2 - self.title_widget.height()),
)
if len(sizes) > 1:
height_delta = self.splitter.height() - old_height
sizes[-1] += height_delta
self.splitter.setSizes(sizes)

def update_title(self):
"""Change the geometry of the title to match the block"""
Expand Down

0 comments on commit aecac6b

Please sign in to comment.