Make labels expand by default

fsp_feeds
Tyler Goodlet 2021-09-16 09:17:44 -04:00
parent fd8be33f10
commit bc42d625fc
1 changed files with 6 additions and 3 deletions

View File

@ -23,7 +23,7 @@ from typing import Callable, Optional, Any
import pyqtgraph as pg import pyqtgraph as pg
from PyQt5 import QtGui, QtWidgets from PyQt5 import QtGui, QtWidgets
from PyQt5.QtWidgets import QLabel from PyQt5.QtWidgets import QLabel, QSizePolicy
from PyQt5.QtCore import QPointF, QRectF, Qt from PyQt5.QtCore import QPointF, QRectF, Qt
from ._style import ( from ._style import (
@ -269,8 +269,11 @@ class FormatLabel(QLabel):
self.setTextFormat(Qt.MarkdownText) # markdown self.setTextFormat(Qt.MarkdownText) # markdown
self.setMargin(0) self.setMargin(0)
self.setAlignment( self.setSizePolicy(
Qt.AlignVCenter QSizePolicy.Expanding,
QSizePolicy.Expanding,
)
self.setAlignment(Qt.AlignVCenter
| Qt.AlignLeft | Qt.AlignLeft
) )
self.setText(self.fmt_str) self.setText(self.fmt_str)