Make labels expand by default
parent
fd8be33f10
commit
bc42d625fc
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue