fixes from cyril & removed stylesheets from some buttons

fixed size of thumbnail on all screens
fixed aspect ratio
removede the stylsheet for comments,share, notes
This commit is contained in:
defnax 2019-03-29 02:00:13 +01:00
parent 94997bd0d3
commit a1ca31afa0
4 changed files with 16 additions and 15 deletions

View File

@ -246,7 +246,11 @@ void PostedItem::fill()
return; return;
} }
QPixmap sqpixmap2 = QPixmap(":/images/thumb-default.png");
mInFill = true; mInFill = true;
int desired_height = 1.5*(ui->voteDownButton->height() + ui->voteUpButton->height() + ui->scoreLabel->height());
int desired_width = sqpixmap2.width()*desired_height/(float)sqpixmap2.height();
if(mPost.mImage.mData != NULL) if(mPost.mImage.mData != NULL)
{ {
@ -254,12 +258,13 @@ void PostedItem::fill()
pixmap.loadFromData(mPost.mImage.mData, mPost.mImage.mSize, "PNG"); pixmap.loadFromData(mPost.mImage.mData, mPost.mImage.mSize, "PNG");
// Wiping data - as its been passed to thumbnail. // Wiping data - as its been passed to thumbnail.
QPixmap sqpixmap = pixmap.scaled(800, 600, Qt::KeepAspectRatio, Qt::SmoothTransformation); QPixmap sqpixmap = pixmap.scaled(desired_width,desired_height, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
ui->pictureLabel->setPixmap(sqpixmap); ui->thumbnailLabel->setPixmap(sqpixmap);
ui->pictureLabel->setPixmap(pixmap);
ui->thumbnailLabel->setPixmap(pixmap); }
}else else
{ {
//ui->thumbnailLabel->setFixedSize(desired_width,desired_height);
ui->expandButton->setDisabled(true); ui->expandButton->setDisabled(true);
} }

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>617</width> <width>825</width>
<height>190</height> <height>337</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -683,8 +683,8 @@
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../images.qrc"/>
<include location="Posted_images.qrc"/> <include location="Posted_images.qrc"/>
<include location="../images.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -542,7 +542,7 @@ void GxsCommentTreeWidget::service_loadThread(const uint32_t &token)
text = qtime.toString("yyyy-MM-dd hh:mm:ss") ; text = qtime.toString("yyyy-MM-dd hh:mm:ss") ;
item->setText(PCITEM_COLUMN_DATE, text) ; item->setText(PCITEM_COLUMN_DATE, text) ;
item->setToolTip(PCITEM_COLUMN_DATE, text) ; item->setToolTip(PCITEM_COLUMN_DATE, text) ;
item->setData(PCITEM_COLUMN_DATE, ROLE_SORT, comment.mMeta.mPublishTs); item->setData(PCITEM_COLUMN_DATE, ROLE_SORT, QVariant(qlonglong(comment.mMeta.mPublishTs)));
} }

View File

@ -907,11 +907,7 @@ PostedItem QLabel#fromBoldLabel, QLabel#fromLabel, QLabel#dateLabel, QLabel#site
color: #787c7e; color: #787c7e;
} }
PostedItem QToolButton#commentButton, QPushButton#shareButton, QToolButton#notesButton{
font-size: 12px;
color: #878a8c;
font-weight: bold;
}
GxsCommentDialog QComboBox#sortBox { GxsCommentDialog QComboBox#sortBox {
font: bold; font: bold;