Sway fixes that avoid weird window resizing
parent
e95589e5b0
commit
709288d034
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue