diff --git a/piker/ui/_style.py b/piker/ui/_style.py index 2b73b0df..c1f151f4 100644 --- a/piker/ui/_style.py +++ b/piker/ui/_style.py @@ -102,6 +102,12 @@ class DpiAwareFont: # take the max since scaling can make things ugly in some cases pdpi = screen.physicalDotsPerInch() ldpi = screen.logicalDotsPerInch() + + # XXX: this is needed on sway/wayland where you set + # ``QT_WAYLAND_FORCE_DPI=physical`` + if ldpi == 0: + ldpi = pdpi + mx_dpi = max(pdpi, ldpi) mn_dpi = min(pdpi, ldpi) scale = round(ldpi/pdpi) diff --git a/piker/ui/_window.py b/piker/ui/_window.py index a97b1f84..17c97411 100644 --- a/piker/ui/_window.py +++ b/piker/ui/_window.py @@ -148,12 +148,17 @@ class MultiStatus: class MainWindow(QtGui.QMainWindow): - size = (800, 500) + # XXX: for tiling wms this should scale + # with the alloted window size. + # TODO: detect for tiling and if untrue set some size? + # size = (300, 500) + size = (0, 0) + title = 'piker chart (ur symbol is loading bby)' def __init__(self, parent=None): super().__init__(parent) - self.setMinimumSize(*self.size) + # self.setMinimumSize(*self.size) self.setWindowTitle(self.title) self._status_bar: QStatusBar = None