homePageWidget: Add some icons

This commit is contained in:
Nicolas Mailloux 2022-07-20 11:55:43 -04:00
parent fa20895ad8
commit 79ed048c9a
5 changed files with 110 additions and 30 deletions

View file

@ -79,5 +79,7 @@
<file>resources/book_inverted.png</file>
<file>resources/arrow-left.png</file>
<file>resources/arrow-right.png</file>
<file>resources/file-text.png</file>
<file>resources/pin.png</file>
</qresource>
</RCC>

View file

@ -10,6 +10,24 @@ homePageWidget::homePageWidget(QWidget *parent) :
ui(new Ui::homePageWidget)
{
ui->setupUi(this);
if(global::deviceID == "n705\n") {
stdIconWidth = sW / 52;
stdIconHeight = sH / 52;
}
else if(global::deviceID == "n905\n" or global::deviceID == "kt\n") {
stdIconWidth = sW / 54;
stdIconHeight = sH / 54;
}
else if(global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n437\n" or global::deviceID == "n306\n" or global::deviceID == "emu\n") {
stdIconWidth = sW / 52.5;
stdIconHeight = sH / 52.5;
}
else {
stdIconWidth = sW / 54;
stdIconHeight = sH / 54;
}
ui->recentBooksIconLabel->setPixmap(QPixmap(":/resources/file-text.png").scaled(stdIconWidth, stdIconHeight, Qt::KeepAspectRatio, Qt::SmoothTransformation));
ui->pinnedBooksIconLabel->setPixmap(QPixmap(":/resources/pin.png").scaled(stdIconWidth, stdIconHeight, Qt::KeepAspectRatio, Qt::SmoothTransformation));
horizontalLayoutArray.resize(global::homePageWidget::recentBooksRowNumber);
verticalLayoutArray.resize(global::homePageWidget::recentBooksNumber);

View file

@ -63,27 +63,57 @@
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="bottomMargin">
<number>0</number>
</property>
<property name="font">
<font>
<family>Inter</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Continue reading</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
<item>
<widget class="QLabel" name="recentBooksIconLabel">
<property name="text">
<string></string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Inter</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true"></string>
</property>
<property name="text">
<string>Continue reading</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line_2">
@ -122,17 +152,47 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="bottomMargin">
<number>0</number>
</property>
<property name="text">
<string>Pinned books</string>
</property>
</widget>
<item>
<widget class="QLabel" name="pinnedBooksIconLabel">
<property name="text">
<string></string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true"></string>
</property>
<property name="text">
<string>Pinned books</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line_3">

BIN
resources/file-text.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

BIN
resources/pin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB