diff --git a/src/ui/uas/UASQuickViewItemSelect.cc b/src/ui/uas/UASQuickViewItemSelect.cc index 537d1aafb2b7d8ad14be0858f0f475820807ad98..ebe47a7144f09a5124a7bb4bf437fb3166f30e0a 100644 --- a/src/ui/uas/UASQuickViewItemSelect.cc +++ b/src/ui/uas/UASQuickViewItemSelect.cc @@ -6,6 +6,8 @@ UASQuickViewItemSelect::UASQuickViewItemSelect(QWidget *parent) : QWidget(parent ui.setupUi(this); currcol = 0; currrow = 0; + ui.gridLayout->setSpacing(0); + ui.gridLayout->setMargin(0); } void UASQuickViewItemSelect::addItem(QString item,bool enabled) { diff --git a/src/ui/uas/UASQuickViewTextItem.cc b/src/ui/uas/UASQuickViewTextItem.cc index 11920e4966f0b79f89d3f71c34c35f76eaefb8a1..c8fb12e861f8b2ba57290179ae081967aca5ca98 100644 --- a/src/ui/uas/UASQuickViewTextItem.cc +++ b/src/ui/uas/UASQuickViewTextItem.cc @@ -9,14 +9,15 @@ UASQuickViewTextItem::UASQuickViewTextItem(QWidget *parent) : UASQuickViewItem(p layout->setMargin(0); titleLabel = new QLabel(this); titleLabel->setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored); - titleLabel->setAlignment(Qt::AlignHCenter); + titleLabel->setAlignment(Qt::AlignHCenter | Qt::AlignBottom); this->layout()->addWidget(titleLabel); valueLabel = new QLabel(this); valueLabel->setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored); - valueLabel->setAlignment(Qt::AlignHCenter); + valueLabel->setAlignment(Qt::AlignHCenter | Qt::AlignTop); valueLabel->setText("0.00"); this->layout()->addWidget(valueLabel); - layout->addSpacerItem(new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Ignored)); + //spacerItem = new QSpacerItem(20,40,QSizePolicy::Minimum,QSizePolicy::Ignored); + //layout->addSpacerItem(spacerItem); QFont valuefont = valueLabel->font(); QFont titlefont = titleLabel->font(); valuefont.setPixelSize(this->height() / 2.0); @@ -39,6 +40,7 @@ void UASQuickViewTextItem::resizeEvent(QResizeEvent *event) QFont titlefont = titleLabel->font(); valuefont.setPixelSize(this->height()); titlefont.setPixelSize(valuefont.pixelSize() / 2.0); + //spacerItem->setGeometry(QRect(0,0,20,this->height()/10.0)); QFontMetrics metrics(valuefont); //valuefont.setPixelSize(this->height() / 2.0); diff --git a/src/ui/uas/UASQuickViewTextItem.h b/src/ui/uas/UASQuickViewTextItem.h index ba3eb8193c3363c2f382168f2f7f781c3ee3ce20..dea8cc3b16fb0f2773376038e95c0d6baf615d55 100644 --- a/src/ui/uas/UASQuickViewTextItem.h +++ b/src/ui/uas/UASQuickViewTextItem.h @@ -3,6 +3,7 @@ #include "UASQuickViewItem.h" #include +#include class UASQuickViewTextItem : public UASQuickViewItem { public: @@ -14,6 +15,7 @@ protected: private: QLabel *titleLabel; QLabel *valueLabel; + QSpacerItem *spacerItem; }; #endif // UASQUICKVIEWTEXTITEM_H