From 2df8d4fd43dda284b1f04967ae873baa08287da9 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Fri, 23 Dec 2016 23:50:36 -0500 Subject: [PATCH] Cosmetic hack to get orientationCombo items' heights to follow icon size. --- glabels/PropertiesView.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/glabels/PropertiesView.cpp b/glabels/PropertiesView.cpp index 9fa0a9d..a61126c 100644 --- a/glabels/PropertiesView.cpp +++ b/glabels/PropertiesView.cpp @@ -26,6 +26,7 @@ #include "libglabels/Db.h" #include "SelectProductDialog.h" +#include #include @@ -37,6 +38,11 @@ PropertiesView::PropertiesView( QWidget *parent ) { setupUi( this ); + // Hack to get orientationCombo item height to follow icon size plus some additional padding + QStyledItemDelegate* itemDelegate = new QStyledItemDelegate(); + orientationCombo->setItemDelegate( itemDelegate ); + orientationCombo->setStyleSheet( "* QAbstractItemView::item { padding: 8px; }" ); + similarBrowser->setAttribute(Qt::WA_TranslucentBackground); similarBrowser->viewport()->setAutoFillBackground(false);