mirror of
https://github.com/Quill-OS/quill.git
synced 2024-10-31 21:33:22 -07: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/arrow-left.png</file>
|
||||
<file>resources/arrow-right.png</file>
|
||||
<file>resources/file-text.png</file>
|
||||
<file>resources/pin.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -62,6 +62,18 @@
|
|||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="recentBooksIconLabel">
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
|
@ -77,6 +89,9 @@
|
|||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Continue reading</string>
|
||||
</property>
|
||||
|
@ -85,6 +100,21 @@
|
|||
</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">
|
||||
<property name="frameShadow">
|
||||
|
@ -121,6 +151,18 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="pinnedBooksIconLabel">
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
|
@ -129,11 +171,29 @@
|
|||
<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">
|
||||
<property name="frameShadow">
|
||||
|
|
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