mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -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() {
|
||||
// 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");
|
||||
// Initialized above
|
||||
graphicsScene->addPixmap(pixmap);
|
||||
ui->graphicsView->items().clear();
|
||||
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);
|
||||
setupPng();
|
||||
}
|
||||
|
|
2
reader.h
2
reader.h
|
@ -154,9 +154,7 @@ private slots:
|
|||
void setupLocalSettingsEnvironment();
|
||||
void setupPng();
|
||||
void on_pdfScaleSlider_valueChanged(int value);
|
||||
|
||||
void on_decreaseScaleBtn_clicked();
|
||||
|
||||
void on_increaseScaleBtn_clicked();
|
||||
|
||||
private:
|
||||
|
|
34
reader.ui
34
reader.ui
|
@ -705,10 +705,19 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="decreaseScaleBtn">
|
||||
<property name="text">
|
||||
<string>Decrease scale</string>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSlider" name="pdfScaleSlider">
|
||||
<property name="minimum">
|
||||
<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>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -728,19 +737,10 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSlider" name="pdfScaleSlider">
|
||||
<property name="minimum">
|
||||
<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>
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="decreaseScaleBtn">
|
||||
<property name="text">
|
||||
<string>Decrease scale</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in a new issue