diff --git a/Orange/widgets/widget.py b/Orange/widgets/widget.py index a5ab36da134..e7df53b3f7f 100644 --- a/Orange/widgets/widget.py +++ b/Orange/widgets/widget.py @@ -546,12 +546,18 @@ def __info(self): sb = self.statusBar() if sb is not None: - in_msg = MessagesWidget(objectName="input-summary") - in_msg.setVisible(False) - in_msg.setDefaultStyleSheet(css) - out_msg = MessagesWidget(objectName="output-summary") - out_msg.setVisible(False) - out_msg.setDefaultStyleSheet(css) + in_msg = MessagesWidget( + objectName="input-summary", visible=False, + defaultStyleSheet=css, + sizePolicy=QSizePolicy(QSizePolicy.Preferred, + QSizePolicy.Preferred) + ) + out_msg = MessagesWidget( + objectName="output-summary", visible=False, + defaultStyleSheet=css, + sizePolicy=QSizePolicy(QSizePolicy.Preferred, + QSizePolicy.Preferred) + ) # Insert a separator if these are not the first elements # TODO: This needs a better check. if sb.findChildren(SimpleButton):