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

Packages window doesn't handle resizing well #14

Closed
PJ-Finlay opened this issue Dec 22, 2020 · 4 comments · Fixed by #16
Closed

Packages window doesn't handle resizing well #14

PJ-Finlay opened this issue Dec 22, 2020 · 4 comments · Fixed by #16
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@PJ-Finlay
Copy link
Collaborator

image

@argosopentech argosopentech added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Dec 22, 2020
@JulienMaille
Copy link

JulienMaille commented Dec 22, 2020

I saw you use PyQt for the GUi. This typically happens when you use designer and forget to set a layout to the the top level widget

@PJ-Finlay
Copy link
Collaborator Author

It looks like the top level package widget does have its layout set. I think the solution is going to be either having the inner widgets scale, or blocking the entire window from being scaled.

class ManagePackagesWindow(QWidget):
packages_changed = pyqtSignal()
def __init__(self):
super().__init__()
# Add packages row
self.add_packages_button = QPushButton('+ Add packages')
self.add_packages_button.clicked.connect(self.add_packages)
self.add_packages_row_layout = QHBoxLayout()
self.add_packages_row_layout.addWidget(
self.add_packages_button)
self.add_packages_row_layout.addStretch()
# Packages table
self.packages_table = QTableWidget()
self.populate_packages_table()
self.packages_layout = QVBoxLayout()
self.packages_layout.addWidget(self.packages_table)
self.layout = QVBoxLayout()
self.layout.addLayout(self.add_packages_row_layout)
self.layout.addLayout(self.packages_layout)
self.setLayout(self.layout)

@ederin
Copy link
Contributor

ederin commented Dec 23, 2020

responsive-package-window

argosopentech pushed a commit that referenced this issue Dec 24, 2020
* Make packages window responsive

Width of "From name" and "To name" columns is adjusted when window resize event is emitted, so packages table always fits packages window.

Resolves: #14
@PJ-Finlay
Copy link
Collaborator Author

Closing, big thanks to @ederin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants