Merge pull request #30 from supermanimmy/cleanup
set minimum size hint for short messages
This commit is contained in:
@@ -18,6 +18,7 @@ DEFAULT_SETTINGS = {
|
||||
"tray/notifications/click": True,
|
||||
"tray/icon/unread": False,
|
||||
"watchdog/interval/s": 60,
|
||||
"MessageWidget/height/min": 100,
|
||||
"MessageWidget/image/size": 33,
|
||||
"MessageWidget/content_image/W_percentage": 1.0,
|
||||
"MessageWidget/content_image/H_percentage": 0.5,
|
||||
@@ -29,4 +30,4 @@ DEFAULT_SETTINGS = {
|
||||
"ImagePopup/extensions": [".jpg", ".jpeg", ".png", ".svg"],
|
||||
"ImagePopup/w": 400,
|
||||
"ImagePopup/h": 400,
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,12 @@ class MessageWidget(QtWidgets.QWidget, Ui_Form):
|
||||
self.gridLayout.setContentsMargins(4, 5, 4, 0)
|
||||
self.adjustSize()
|
||||
size_hint = self.message_item.sizeHint()
|
||||
self.message_item.setSizeHint(QtCore.QSize(size_hint.width(), self.height()))
|
||||
self.message_item.setSizeHint(
|
||||
QtCore.QSize(
|
||||
size_hint.width(),
|
||||
max(settings.value("MessageWidget/height/min", type=int), self.height())
|
||||
)
|
||||
)
|
||||
|
||||
self.set_icons()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user