diff --git a/eink.qrc b/eink.qrc index f451bb1..071367f 100644 --- a/eink.qrc +++ b/eink.qrc @@ -79,5 +79,7 @@ resources/book_inverted.png resources/arrow-left.png resources/arrow-right.png + resources/file-text.png + resources/pin.png diff --git a/homepagewidget.cpp b/homepagewidget.cpp index 062f8ac..592f5ec 100644 --- a/homepagewidget.cpp +++ b/homepagewidget.cpp @@ -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); diff --git a/homepagewidget.ui b/homepagewidget.ui index bf88c36..23ee70e 100644 --- a/homepagewidget.ui +++ b/homepagewidget.ui @@ -63,27 +63,57 @@ 0 - - - - 0 - 0 - + + + 0 - - - Inter - 75 - true - - - - Continue reading - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - + + + + + + + + + + + + 0 + 0 + + + + + Inter + 75 + true + + + + + + + Continue reading + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + @@ -122,17 +152,47 @@ - - - - 75 - true - + + + 0 - - Pinned books - - + + + + + + + + + + + + 75 + true + + + + + + + Pinned books + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + diff --git a/resources/file-text.png b/resources/file-text.png new file mode 100644 index 0000000..cacb829 Binary files /dev/null and b/resources/file-text.png differ diff --git a/resources/pin.png b/resources/pin.png new file mode 100644 index 0000000..e358726 Binary files /dev/null and b/resources/pin.png differ