Changes for thumbnail display & subcribe buttons

* Changes for Thumbnail display & subscribe buttons
* Display Poster thumbnails without wasted empty space
*Display the thumbnail as Poster, 1:1 or 16:9 format
*Moved the Subscribe buttons to the left
This commit is contained in:
defnax 2019-10-05 21:13:15 +02:00
parent f7b56ca340
commit d089762e12
5 changed files with 81 additions and 65 deletions

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>618</width>
<height>157</height>
<height>161</height>
</rect>
</property>
<layout class="QGridLayout">
@ -178,6 +178,25 @@
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="subscribeButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Subscribe to Channel</string>
</property>
<property name="text">
<string>Subscribe</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
@ -205,26 +224,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="subscribeButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Subscribe to Channel</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/directoryadd_24x24_shadow.png</normaloff>:/images/directoryadd_24x24_shadow.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="expandButton">
<property name="sizePolicy">

View File

@ -392,9 +392,21 @@ void GxsChannelPostItem::fill()
if(mPost.mThumbnail.mData != NULL)
{
QPixmap thumbnail;
QPixmap thumbnail;
GxsIdDetails::loadPixmapFromData(mPost.mThumbnail.mData, mPost.mThumbnail.mSize, thumbnail,GxsIdDetails::ORIGINAL);
// Wiping data - as its been passed to thumbnail.
if( thumbnail.width() < 90 ){
ui->logoLabel->setMaximumSize(82,108);
}
else if( thumbnail.width() < 109 ){
ui->logoLabel->setMinimumSize(108,108);
ui->logoLabel->setMaximumSize(108,108);
}
else{
ui->logoLabel->setMinimumSize(156,108);
ui->logoLabel->setMaximumSize(156,108);
}
ui->logoLabel->setPixmap(thumbnail);
}

View File

@ -51,9 +51,15 @@
<layout class="QHBoxLayout" name="mainTopHLayout">
<item>
<widget class="QLabel" name="logoLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>158</width>
<width>82</width>
<height>108</height>
</size>
</property>

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>618</width>
<height>157</height>
<height>161</height>
</rect>
</property>
<layout class="QGridLayout">
@ -178,6 +178,25 @@
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="subscribeButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Subscribe to Forum</string>
</property>
<property name="text">
<string>Subscribe</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
@ -205,26 +224,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="subscribeButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Subscribe to Forum</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/directoryadd_24x24_shadow.png</normaloff>:/images/directoryadd_24x24_shadow.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="expandButton">
<property name="sizePolicy">

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>618</width>
<height>157</height>
<height>161</height>
</rect>
</property>
<layout class="QGridLayout">
@ -178,6 +178,25 @@
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="subscribeButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Subscribe to Posted</string>
</property>
<property name="text">
<string>Subscribe</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
@ -205,26 +224,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="subscribeButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Subscribe to Posted</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/directoryadd_24x24_shadow.png</normaloff>:/images/directoryadd_24x24_shadow.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="expandButton">
<property name="sizePolicy">
@ -330,6 +329,7 @@
</widget>
<resources>
<include location="../images.qrc"/>
<include location="../Posted/Posted_images.qrc"/>
</resources>
<connections/>
</ui>