From 9c4437b179f2edb40bcce1b91041a0138fdbe5be Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sat, 4 Sep 2021 17:26:36 -0400 Subject: [PATCH] Scale pp pane to chart height Acts as a fix for lodpi and better sizing logic for the pp status bar. Drop all the redundant passing of the form to its child layouts during instantiating (since they're all added as layouts to the tree). Comment out the feed status label for now since it's not hooked up to the backend and we'll get it going in a new PR. Down the road we probably want to do all the pp pane component-widget sizing *after* the `pyqtgraph` chart is up; it's going to take some reworking of the charting api tho. --- piker/ui/_forms.py | 84 ++++++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 37 deletions(-) diff --git a/piker/ui/_forms.py b/piker/ui/_forms.py index 6d19cdc4..f6825ca2 100644 --- a/piker/ui/_forms.py +++ b/piker/ui/_forms.py @@ -97,7 +97,7 @@ class FontAndChartAwareLineEdit(QLineEdit): psh = super().sizeHint() dpi_font = self.dpi_font - psh.setHeight(dpi_font.px_size + 2) + psh.setHeight(dpi_font.px_size) # space for ``._chars: int`` char_w_pxs = dpi_font.boundingRect(self.text()).width() @@ -192,12 +192,13 @@ class FieldsForm(QWidget): # TODO: we may want to hand this *down* from some "pane manager" # thing eventually? self.vbox = QVBoxLayout(self) - self.vbox.setAlignment(Qt.AlignVCenter) + # self.vbox.setAlignment(Qt.AlignVCenter) + self.vbox.setAlignment(Qt.AlignBottom) self.vbox.setContentsMargins(0, 4, 3, 6) self.vbox.setSpacing(0) # split layout for the (