Add default "small" dpi aware font
parent
f68295653d
commit
9d31f8ca6a
|
@ -112,7 +112,7 @@ class MainWindow(QtGui.QMainWindow):
|
||||||
self.setMinimumSize(*self.size)
|
self.setMinimumSize(*self.size)
|
||||||
self.setWindowTitle(self.title)
|
self.setWindowTitle(self.title)
|
||||||
|
|
||||||
self._status_bar: QStatusbar = None
|
self._status_bar: QStatusBar = None
|
||||||
self._status_label: QLabel = None
|
self._status_label: QLabel = None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -121,13 +121,13 @@ class MainWindow(QtGui.QMainWindow):
|
||||||
# init mode label
|
# init mode label
|
||||||
if not self._status_label:
|
if not self._status_label:
|
||||||
# TODO: i guess refactor stuff to avoid having to import here?
|
# TODO: i guess refactor stuff to avoid having to import here?
|
||||||
from ._style import _font, hcolor
|
from ._style import _font_small, hcolor
|
||||||
self._status_label = label = QtGui.QLabel()
|
self._status_label = label = QtGui.QLabel()
|
||||||
label.setStyleSheet(
|
label.setStyleSheet(
|
||||||
f"QLabel {{ color : {hcolor('gunmetal')}; }}"
|
f"QLabel {{ color : {hcolor('gunmetal')}; }}"
|
||||||
)
|
)
|
||||||
label.setTextFormat(3) # markdown
|
label.setTextFormat(3) # markdown
|
||||||
label.setFont(_font.font)
|
label.setFont(_font_small.font)
|
||||||
label.setMargin(2)
|
label.setMargin(2)
|
||||||
label.setAlignment(
|
label.setAlignment(
|
||||||
QtCore.Qt.AlignVCenter
|
QtCore.Qt.AlignVCenter
|
||||||
|
@ -136,7 +136,6 @@ class MainWindow(QtGui.QMainWindow):
|
||||||
self.status_bar.addPermanentWidget(label)
|
self.status_bar.addPermanentWidget(label)
|
||||||
label.show()
|
label.show()
|
||||||
|
|
||||||
|
|
||||||
return self._status_label
|
return self._status_label
|
||||||
|
|
||||||
def closeEvent(
|
def closeEvent(
|
||||||
|
@ -155,14 +154,14 @@ class MainWindow(QtGui.QMainWindow):
|
||||||
# style and cached the status bar on first access
|
# style and cached the status bar on first access
|
||||||
if not self._status_bar:
|
if not self._status_bar:
|
||||||
# TODO: i guess refactor stuff to avoid having to import here?
|
# TODO: i guess refactor stuff to avoid having to import here?
|
||||||
from ._style import _font, hcolor
|
from ._style import _font_small, hcolor
|
||||||
sb = self.statusBar()
|
sb = self.statusBar()
|
||||||
sb.setStyleSheet((
|
sb.setStyleSheet((
|
||||||
f"color : {hcolor('gunmetal')};"
|
f"color : {hcolor('gunmetal')};"
|
||||||
f"background : {hcolor('default_dark')};"
|
f"background : {hcolor('default_dark')};"
|
||||||
# "min-height : 19px;"
|
f"font-size : {_font_small.px_size}px;"
|
||||||
f"font-size : {_font.px_size - 4}px;"
|
|
||||||
"padding : 0px;"
|
"padding : 0px;"
|
||||||
|
# "min-height : 19px;"
|
||||||
# "qproperty-alignment: AlignVCenter;"
|
# "qproperty-alignment: AlignVCenter;"
|
||||||
))
|
))
|
||||||
self.setStatusBar(sb)
|
self.setStatusBar(sb)
|
||||||
|
|
Loading…
Reference in New Issue