Skip to content

Commit

Permalink
Fix image alignement
Browse files Browse the repository at this point in the history
  • Loading branch information
MiraGeowerkstatt authored Jun 2, 2022
2 parents 4660cd8 + e1c5802 commit b2df65f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_news_feed/custom_news_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,9 @@ def addNews(self, newsArticles):
QgsMessageLog.logMessage(u'Error reading image ' + str(e),'Custom News Feed')
if image is not None:
image_label = QLabel()
image_label.setFixedSize(150, 150)
image_label.setPixmap(QPixmap(image).scaled(150, 150, Qt.KeepAspectRatio, Qt.SmoothTransformation))
right_inner_vbox.setContentsMargins(0,15,0,0)
image_label.setFixedWidth(150)
image_label.setPixmap(QPixmap(image).scaledToWidth(150, Qt.SmoothTransformation))
right_inner_vbox.setContentsMargins(0,40,0,0)
right_inner_vbox.addWidget(image_label)
right_inner_vbox.addStretch(1)

Expand Down

0 comments on commit b2df65f

Please sign in to comment.