mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-27 16:17:21 -08:00
PDF: minor fixes
This commit is contained in:
parent
94e0319576
commit
5c274e21ec
3 changed files with 18 additions and 21 deletions
|
@ -1953,8 +1953,8 @@ void reader::setupLocalSettingsEnvironment() {
|
||||||
|
|
||||||
void reader::setupPng() {
|
void reader::setupPng() {
|
||||||
// Note: Output file is supposed to be '/run/page.png', but somehow mutool puts it in '/run/page1.png'
|
// Note: Output file is supposed to be '/run/page.png', but somehow mutool puts it in '/run/page1.png'
|
||||||
// QGraphicsScene * graphicsScene = new QGraphicsScene();
|
|
||||||
QPixmap pixmap("/run/page1.png");
|
QPixmap pixmap("/run/page1.png");
|
||||||
|
// Initialized above
|
||||||
graphicsScene->addPixmap(pixmap);
|
graphicsScene->addPixmap(pixmap);
|
||||||
ui->graphicsView->items().clear();
|
ui->graphicsView->items().clear();
|
||||||
ui->graphicsView->setScene(graphicsScene);
|
ui->graphicsView->setScene(graphicsScene);
|
||||||
|
@ -2021,7 +2021,6 @@ void reader::on_pdfScaleSlider_valueChanged(int value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mupdf::pdf::pdfPageNumber = mupdf::pdf::pdfPageNumber + 1;
|
|
||||||
setup_book(book_file, mupdf::pdf::pdfPageNumber, true);
|
setup_book(book_file, mupdf::pdf::pdfPageNumber, true);
|
||||||
setupPng();
|
setupPng();
|
||||||
}
|
}
|
||||||
|
|
2
reader.h
2
reader.h
|
@ -154,9 +154,7 @@ private slots:
|
||||||
void setupLocalSettingsEnvironment();
|
void setupLocalSettingsEnvironment();
|
||||||
void setupPng();
|
void setupPng();
|
||||||
void on_pdfScaleSlider_valueChanged(int value);
|
void on_pdfScaleSlider_valueChanged(int value);
|
||||||
|
|
||||||
void on_decreaseScaleBtn_clicked();
|
void on_decreaseScaleBtn_clicked();
|
||||||
|
|
||||||
void on_increaseScaleBtn_clicked();
|
void on_increaseScaleBtn_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
34
reader.ui
34
reader.ui
|
@ -705,10 +705,19 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="1">
|
||||||
<widget class="QPushButton" name="decreaseScaleBtn">
|
<widget class="QSlider" name="pdfScaleSlider">
|
||||||
<property name="text">
|
<property name="minimum">
|
||||||
<string>Decrease scale</string>
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="pageStep">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -728,19 +737,10 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="0">
|
||||||
<widget class="QSlider" name="pdfScaleSlider">
|
<widget class="QPushButton" name="decreaseScaleBtn">
|
||||||
<property name="minimum">
|
<property name="text">
|
||||||
<number>1</number>
|
<string>Decrease scale</string>
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<property name="pageStep">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Reference in a new issue