Skip to content

Commit

Permalink
Merge pull request #415 from YACReader/develop
Browse files Browse the repository at this point in the history
9.14.1
  • Loading branch information
luisangelsm authored Feb 5, 2024
2 parents 4229df6 + f540b47 commit a44b0d6
Show file tree
Hide file tree
Showing 151 changed files with 14,880 additions and 8,244 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@

Version counting is based on semantic versioning (Major.Feature.Patch)

## 9.14.1

### YACReader
* Add setting to disable scroll animations and scroll smoothing, recommended if you are using a touch pad or if you find the mouse wheel behaviour laggy.
* Fix missing translation when opening YACReader from YACReaderLibrary.

### YACReaderLibrary
* Fix "Set type" context menu the grid view for folders.
* Add a different versioning strategy for databases. DBs version will change only when the structure changes and not when YACReader version changes.
* Add support for updating libraries automatically with various settings to chose from. During automatic library updates most actions are disabled, you can stop an update by clicking on the busy indicator next to the Libraries title.
* Improve content reloading. Navigation and selection state is no longer reseted after content changes (e.g. library updates, tags edits, etc.)
* The app will try to move comics and folders to the trash bin when deletions are requested, if the file system used doesn't support trash bin the files will be removed permanetly.
* Add menu to choose what columns are displayed in the table comics view (do a right click on the header to show it). The view has new 3 new headers to choose from (Series, Volume and Story arc).
* Migrate `number` and `arcNumber` data types to `TEXT`. This only affects databases created before 9.13 and fixes problems with some formats of numbers (e.g. 1.10).
* Propage update date to all the parent folders.
* Fix crash when resorting comics in reading lists in table view view and the comic flow is hidden.
* Fix cover loading in QML views due to malformed URLs.
* Improve style of the webui status page.
* Fix type not being propagated to new files in a folder.
* Mark the current type in the context menu so the user can know the current type.

### YACReaderLibraryServer
* Add `rescan-xml-info` command.
* Improved API to provide better integration with the clients (Android 1.4.0 and iOS 3.29.0).

### All Apps
* New universal builds for macos.

## 9.13.1

### YACReaderLibrary
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ If you are interested in contributing to the project the first step should be to
Contributions are not restricted to coding; you can help the project by bringing new UI/UX ideas, designing new assets, writing manuals or tutorials, translating the apps, etc. If you are interested in DevOps, YACReader uses Azure Pipelines for CI/CD, any improvements in that area are welcome. Testing pre-releases is also really appreciated.

#### Dev Setup
YACReader is developed in *c++/Qt*, so the first thing you need to do is to install a *C++* compiler or environment that supports at least *C++17* and *Qt*. In *Windows* I use *Visual Studio Community Edition 2019* as build system and in *macos* I use Xcode, but I do all the coding using *QtCreator*. The project is adding support to *Qt6* and it already compiles under it but it is not ready to ship, so you need to make sure that everything works in both *Qt5* and *Qt6*, you only need to install *Qt5* for now and *CI* will check that everything builds with *Qt6*.
YACReader is developed in *c++/Qt*, so the first thing you need to do is to install a *C++* compiler or environment that supports at least *C++17* and *Qt*. In *Windows* I use *Visual Studio Community Edition 2019* as build system and in *macos* I use Xcode, but I do all the coding using *QtCreator*. The project support *Qt5* and *Qt6* at the moment so you need to make sure that everything works in both *Qt5* and *Qt6*, you only need to install one flavor of *Qt* and *CI* will check that everything builds with both, I recommend using *Qt6*.

The repo includes binaries for the dependencies needed for *Windows* (MSVC compiler) and *macos* (clang) but you need to configure *7zip/p7zip* dependency manually, please take a look at *compressed_archive/README_7zip.txt*.
The repo includes binaries for the dependencies needed for *Windows* (MSVC compiler) and *macos* (clang) but you need to configure *7zip* dependency manually, please take a look at *compressed_archive/README_7zip.txt*.

##### Running and debugging
YACReader needs to find its dependencies at runtime, make sure that *Qt* binaries are in your *PATH* and the third-party binaries are next to the executable. The best way to make sure you have all the third-party binaries in place is to check YACReader installation and copy the binaries in your output folder.
Expand Down
2 changes: 2 additions & 0 deletions YACReader/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ class Configuration : public QObject
bool getDisableShowOnMouseOver() { return settings->value(DISABLE_MOUSE_OVER_GOTO_FLOW).toBool(); }
bool getDoNotTurnPageOnScroll() { return settings->value(DO_NOT_TURN_PAGE_ON_SCROLL, false).toBool(); }
bool getUseSingleScrollStepToTurnPage() { return settings->value(USE_SINGLE_SCROLL_STEP_TO_TURN_PAGE, false).toBool(); }
void setDisableScrollAnimation(bool b) { settings->setValue(DISABLE_SCROLL_ANIMATION, b); }
bool getDisableScrollAnimation() { return settings->value(DISABLE_SCROLL_ANIMATION, false).toBool(); }
};

#endif
4 changes: 4 additions & 0 deletions YACReader/options_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ OptionsDialog::OptionsDialog(QWidget *parent)
auto scrollBox = new QGroupBox(tr("Scroll behaviour"));
auto scrollLayout = new QVBoxLayout;

disableScrollAnimations = new QCheckBox(tr("Disable scroll animations and smooth scrolling"));
doNotTurnPageOnScroll = new QCheckBox(tr("Do not turn page using scroll"));
useSingleScrollStepToTurnPage = new QCheckBox(tr("Use single scroll step to turn page"));

scrollLayout->addWidget(disableScrollAnimations);
scrollLayout->addWidget(doNotTurnPageOnScroll);
scrollLayout->addWidget(useSingleScrollStepToTurnPage);

Expand Down Expand Up @@ -242,6 +244,7 @@ void OptionsDialog::saveOptions()

settings->setValue(DO_NOT_TURN_PAGE_ON_SCROLL, doNotTurnPageOnScroll->isChecked());
settings->setValue(USE_SINGLE_SCROLL_STEP_TO_TURN_PAGE, useSingleScrollStepToTurnPage->isChecked());
settings->setValue(DISABLE_SCROLL_ANIMATION, disableScrollAnimations->isChecked());

YACReaderOptionsDialog::saveOptions();
}
Expand Down Expand Up @@ -283,6 +286,7 @@ void OptionsDialog::restoreOptions(QSettings *settings)

doNotTurnPageOnScroll->setChecked(settings->value(DO_NOT_TURN_PAGE_ON_SCROLL, false).toBool());
useSingleScrollStepToTurnPage->setChecked(settings->value(USE_SINGLE_SCROLL_STEP_TO_TURN_PAGE, false).toBool());
disableScrollAnimations->setChecked(settings->value(DISABLE_SCROLL_ANIMATION, false).toBool());
}

void OptionsDialog::updateColor(const QColor &color)
Expand Down
1 change: 1 addition & 0 deletions YACReader/options_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class OptionsDialog : public YACReaderOptionsDialog

QCheckBox *doNotTurnPageOnScroll;
QCheckBox *useSingleScrollStepToTurnPage;
QCheckBox *disableScrollAnimations;

YACReaderSpinSliderWidget *brightnessS;

Expand Down
25 changes: 17 additions & 8 deletions YACReader/viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ void Viewer::scrollDown()
next();
} else {
int currentPos = verticalScrollBar()->sliderPosition();
verticalScroller->setDuration(250);
verticalScroller->setDuration(animationDuration());
verticalScroller->setStartValue(currentPos);
verticalScroller->setEndValue(nextPos);

Expand All @@ -461,7 +461,7 @@ void Viewer::scrollUp()
prev();
} else {
int currentPos = verticalScrollBar()->sliderPosition();
verticalScroller->setDuration(250);
verticalScroller->setDuration(animationDuration());
verticalScroller->setStartValue(currentPos);
verticalScroller->setEndValue(nextPos);

Expand Down Expand Up @@ -604,24 +604,33 @@ void Viewer::scrollTo(int x, int y)
{
if (groupScroller->state() == QAbstractAnimation::Running)
return;
horizontalScroller->setDuration(250);
horizontalScroller->setDuration(animationDuration());
horizontalScroller->setStartValue(horizontalScrollBar()->sliderPosition());
horizontalScroller->setEndValue(x);
verticalScroller->setDuration(250);
verticalScroller->setDuration(animationDuration());
verticalScroller->setStartValue(verticalScrollBar()->sliderPosition());
verticalScroller->setEndValue(y);
groupScroller->start();
emit backgroundChanges();
}

int Viewer::animationDuration() const
{
if (Configuration::getConfiguration().getDisableScrollAnimation()) {
return 0;
} else {
return 250;
}
}

void Viewer::moveView(Qt::Key directionKey)
{
QKeyEvent event(QEvent::KeyPress, directionKey, Qt::NoModifier);
QAbstractScrollArea::keyPressEvent(&event);
emit backgroundChanges();
}

static void animateScroll(QPropertyAnimation &scroller, const QScrollBar &scrollBar, int delta)
void Viewer::animateScroll(QPropertyAnimation &scroller, const QScrollBar &scrollBar, int delta)
{
int deltaNotFinished = 0;
if (scroller.state() == QAbstractAnimation::Running) {
Expand All @@ -630,7 +639,7 @@ static void animateScroll(QPropertyAnimation &scroller, const QScrollBar &scroll
}

const int currentPos = scrollBar.sliderPosition();
scroller.setDuration(250);
scroller.setDuration(animationDuration());
scroller.setStartValue(currentPos);
scroller.setEndValue(currentPos - delta - deltaNotFinished);

Expand All @@ -639,9 +648,9 @@ static void animateScroll(QPropertyAnimation &scroller, const QScrollBar &scroll

void Viewer::wheelEvent(QWheelEvent *event)
{
auto delta = event->angleDelta();

if (render->hasLoadedComic()) {
auto delta = event->angleDelta();

if (delta.x() != 0) {
animateScroll(*horizontalScroller, *horizontalScrollBar(), delta.x());
return;
Expand Down
6 changes: 5 additions & 1 deletion YACReader/viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public slots:
bool restoreMagnifyingGlass;
void setMagnifyingGlassShown(bool shown);

//! Manejadores de evento:
//! Event handlers:
void resizeEvent(QResizeEvent *event) override;
void wheelEvent(QWheelEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
Expand All @@ -179,6 +179,10 @@ public slots:
void scrollZigzag(scrollDirection d1, scrollDirection d2, bool forward);
void scrollTo(int x, int y);

// Zero when animations are disabled
int animationDuration() const;
void animateScroll(QPropertyAnimation &scroller, const QScrollBar &scrollBar, int delta);

public:
Viewer(QWidget *parent = nullptr);
~Viewer();
Expand Down
Loading

0 comments on commit a44b0d6

Please sign in to comment.