mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -08:00
homePageWidget: Add some icons
This commit is contained in:
parent
fa20895ad8
commit
79ed048c9a
5 changed files with 110 additions and 30 deletions
2
eink.qrc
2
eink.qrc
|
@ -79,5 +79,7 @@
|
||||||
<file>resources/book_inverted.png</file>
|
<file>resources/book_inverted.png</file>
|
||||||
<file>resources/arrow-left.png</file>
|
<file>resources/arrow-left.png</file>
|
||||||
<file>resources/arrow-right.png</file>
|
<file>resources/arrow-right.png</file>
|
||||||
|
<file>resources/file-text.png</file>
|
||||||
|
<file>resources/pin.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -10,6 +10,24 @@ homePageWidget::homePageWidget(QWidget *parent) :
|
||||||
ui(new Ui::homePageWidget)
|
ui(new Ui::homePageWidget)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
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);
|
horizontalLayoutArray.resize(global::homePageWidget::recentBooksRowNumber);
|
||||||
verticalLayoutArray.resize(global::homePageWidget::recentBooksNumber);
|
verticalLayoutArray.resize(global::homePageWidget::recentBooksNumber);
|
||||||
|
|
|
@ -63,27 +63,57 @@
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<property name="sizePolicy">
|
<property name="bottomMargin">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
|
<number>0</number>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<item>
|
||||||
<font>
|
<widget class="QLabel" name="recentBooksIconLabel">
|
||||||
<family>Inter</family>
|
<property name="text">
|
||||||
<weight>75</weight>
|
<string></string>
|
||||||
<bold>true</bold>
|
</property>
|
||||||
</font>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="text">
|
<item>
|
||||||
<string>Continue reading</string>
|
<widget class="QLabel" name="label">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
<property name="alignment">
|
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<horstretch>0</horstretch>
|
||||||
</property>
|
<verstretch>0</verstretch>
|
||||||
</widget>
|
</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>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line_2">
|
<widget class="Line" name="line_2">
|
||||||
|
@ -122,17 +152,47 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<property name="font">
|
<property name="bottomMargin">
|
||||||
<font>
|
<number>0</number>
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<item>
|
||||||
<string>Pinned books</string>
|
<widget class="QLabel" name="pinnedBooksIconLabel">
|
||||||
</property>
|
<property name="text">
|
||||||
</widget>
|
<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>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line_3">
|
<widget class="Line" name="line_3">
|
||||||
|
|
BIN
resources/file-text.png
Normal file
BIN
resources/file-text.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
BIN
resources/pin.png
Normal file
BIN
resources/pin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
Loading…
Reference in a new issue