File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -493,6 +493,17 @@ void TombRaiderLinuxLauncher::infoClicked() {
493493 if (id != 0 ) {
494494 InfoData info = controller.getInfo (id);
495495 ui->infoWebEngineView ->setHtml (info.m_body );
496+
497+ // Get the vertical scrollbar size to center the images for all themes
498+ int scrollbarWidth = ui->infoListWidget
499+ ->style ()->pixelMetric (QStyle::PM_ScrollBarExtent);
500+ QMargins margins = ui->infoListWidget ->contentsMargins ();
501+ int left = margins.left ();
502+ int right = margins.right ();
503+
504+ ui->infoListWidget ->setMinimumWidth (left+502 +scrollbarWidth+right);
505+ ui->infoListWidget ->setMaximumWidth (left+502 +scrollbarWidth+right);
506+
496507 ui->infoListWidget ->setViewMode (QListView::IconMode);
497508 ui->infoListWidget ->setIconSize (QSize (502 , 377 ));
498509 ui->infoListWidget ->setDragEnabled (false );
@@ -504,6 +515,7 @@ void TombRaiderLinuxLauncher::infoClicked() {
504515 for (int i = 0 ; i < info.m_imageList .size (); ++i) {
505516 const QIcon &icon = info.m_imageList .at (i);
506517 QListWidgetItem *item = new QListWidgetItem (icon, " " );
518+ item->setSizeHint (QSize (502 , 377 ));
507519 ui->infoListWidget ->addItem (item);
508520 }
509521 ui->infoWebEngineView ->show ();
You can’t perform that action at this time.
0 commit comments