Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪲 saves splitter position correctly #101

Merged
merged 1 commit into from
Dec 8, 2021
Merged
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
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