From 2c9612ebd860c632492ac1f6bee756fd0e1e2d93 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 3 Mar 2022 10:46:05 -0500 Subject: [PATCH] Force exact pp bar size --- piker/ui/_forms.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/piker/ui/_forms.py b/piker/ui/_forms.py index 841f2e85..e6c28112 100644 --- a/piker/ui/_forms.py +++ b/piker/ui/_forms.py @@ -554,8 +554,9 @@ class FillStatusBar(QProgressBar): ) -> None: super().__init__(parent=parent) - self.approx_h = approx_height_px - self.setMinimumHeight(int(round(approx_height_px))) + self.approx_h = int(round(approx_height_px)) + self.setMinimumHeight(self.approx_h) + self.setMaximumHeight(self.approx_h) self.font_size = font_size @@ -570,10 +571,9 @@ class FillStatusBar(QProgressBar): ) -> None: - approx_h = self.approx_h # TODO: compute "used height" thus far and mostly fill the rest tot_slot_h, r = divmod( - approx_h, + self.approx_h, slots, ) slot_height_px = tot_slot_h + r/slots - self.slot_margin_px