From bced19c8e5ab449d7613736480645161329c9e7a Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Mon, 18 Jul 2022 11:00:15 -0400 Subject: [PATCH] reader: Switch to icons for Previous/Options/Next buttons --- eink.qrc | 2 ++ reader.cpp | 19 +++++++++++++++++++ resources/arrow-left.png | Bin 0 -> 3708 bytes resources/arrow-right.png | Bin 0 -> 3655 bytes 4 files changed, 21 insertions(+) create mode 100644 resources/arrow-left.png create mode 100644 resources/arrow-right.png diff --git a/eink.qrc b/eink.qrc index 7bdce05..f451bb1 100644 --- a/eink.qrc +++ b/eink.qrc @@ -77,5 +77,7 @@ resources/edit.png resources/save.png resources/book_inverted.png + resources/arrow-left.png + resources/arrow-right.png diff --git a/reader.cpp b/reader.cpp index 80b4692..4dbc341 100644 --- a/reader.cpp +++ b/reader.cpp @@ -104,6 +104,12 @@ reader::reader(QWidget *parent) : ui->decreaseScaleBtn->setIcon(QIcon(":/resources/zoom-out.png")); ui->quitBtn->setText(""); ui->quitBtn->setIcon(QIcon(":/resources/power.png")); + ui->previousBtn->setText(""); + ui->previousBtn->setIcon(QIcon(":/resources/arrow-left.png")); + ui->optionsBtn->setText(""); + ui->optionsBtn->setIcon(QIcon(":/resources/settings.png")); + ui->nextBtn->setText(""); + ui->nextBtn->setIcon(QIcon(":/resources/arrow-right.png")); // On the Mini with QT_FONT_DPI set to 187 (default for this device), quitBtn makes the UI go beyond the limits of the screen when the menu bar is shown if(global::deviceID == "n705\n") { @@ -292,6 +298,11 @@ reader::reader(QWidget *parent) : ui->previousBtn->setStyleSheet("padding: 13.5px"); ui->optionsBtn->setStyleSheet("padding: 13.5px"); } + else if(global::deviceID == "n437\n") { + ui->nextBtn->setStyleSheet("padding: 12.5px"); + ui->previousBtn->setStyleSheet("padding: 12.5px"); + ui->optionsBtn->setStyleSheet("padding: 12.5px"); + } ui->sizeValueLabel->setStyleSheet("font-size: 9pt; font-weight: bold"); ui->homeBtn->setStyleSheet("font-size: 9pt; padding: 5px"); ui->aboutBtn->setStyleSheet("font-size: 9pt; padding: 5px"); @@ -1151,9 +1162,13 @@ void reader::on_optionsBtn_clicked() if(global::deviceID == "n873\n") { ui->optionsBtn->setStyleSheet("background: white; color: black; padding: 13.5px"); } + else if(global::deviceID == "n437\n") { + ui->optionsBtn->setStyleSheet("background: white; color: black; padding: 12.5px"); + } else { ui->optionsBtn->setStyleSheet("background: white; color: black"); } + ui->optionsBtn->setIcon(QIcon(":/resources/settings.png")); // The Glo HD (N437) has a newer platform plugin that doesn't need this if(global::deviceID != "n437\n") { QTimer::singleShot(500, this, SLOT(repaint())); @@ -1165,9 +1180,13 @@ void reader::on_optionsBtn_clicked() if(global::deviceID == "n873\n") { ui->optionsBtn->setStyleSheet("background: black; color: white; padding: 13.5px"); } + else if(global::deviceID == "n437\n") { + ui->optionsBtn->setStyleSheet("background: black; color: white; padding: 12.5px"); + } else { ui->optionsBtn->setStyleSheet("background: black; color: white"); } + ui->optionsBtn->setIcon(QIcon(":/resources/settings-inverted.png")); this->repaint(); menubar_shown = true; } diff --git a/resources/arrow-left.png b/resources/arrow-left.png new file mode 100644 index 0000000000000000000000000000000000000000..adbbecabf01ad86e34d64ad746115fd051588734 GIT binary patch literal 3708 zcmdT`dpMM78-M0xh8pFRDXdCGsZc71M8vW-4K*`FW;Sisps1!nH19fe(Ac(A4mIer zYBfwslZt6ZqR63xAv7VU?Uj%wMsMbu(f3E+pY3&hUEe;}_1yRK-uL}`p5Oc2&mX_z zWS{SeTJy9307Ng(O@08NRZBD=XsF!#nC3|UP|0C#Ze%YvxA{@~_U;ag_!$6;QwgV> zJgZ!ctLa+{7E(4k9y{=m%v*je)sAV9N?y>cRqT)%G`YYw%+oK(7}uJZWO{;vHw@ij z5`^10g1P^s*6WG;4+!1w7oDEUXy=!*LoY;_H|{V>zi3VOYTSPai1w#n0)yC z!qngEmxoYK`;C~;#|b0ym5rrH(Jb*QH)ulB$4 zO<(DWJY-e(tZQ`7z~#)fS^e7n72%qHL`XqeKyC9e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