Fix a typo in Viewer::magnifyingGlassShowed name

Make Viewer::magnifyingGlassIsVisible() const.
This commit is contained in:
Igor Kushnir 2021-03-08 17:54:20 +02:00
parent c8697ccd2d
commit 5254e66da3
2 changed files with 9 additions and 9 deletions

View File

@ -36,7 +36,7 @@ Viewer::Viewer(QWidget *parent)
drag(false),
shouldOpenNext(false),
shouldOpenPrevious(false),
magnifyingGlassShowed(false),
magnifyingGlassShown(false),
restoreMagnifyingGlass(false)
{
translator = new YACReaderTranslator(this);
@ -715,7 +715,7 @@ void Viewer::mouseMoveEvent(QMouseEvent *event)
showCursor();
hideCursorTimer->start(2500);
if (magnifyingGlassShowed)
if (magnifyingGlassShown)
mglass->move(static_cast<int>(event->x() - float(mglass->width()) / 2), static_cast<int>(event->y() - float(mglass->height()) / 2));
if (render->hasLoadedComic()) {
@ -759,7 +759,7 @@ QPixmap Viewer::pixmap() const
void Viewer::magnifyingGlassSwitch()
{
magnifyingGlassShowed ? hideMagnifyingGlass() : showMagnifyingGlass();
magnifyingGlassShown ? hideMagnifyingGlass() : showMagnifyingGlass();
}
void Viewer::showMagnifyingGlass()
@ -770,14 +770,14 @@ void Viewer::showMagnifyingGlass()
mglass->move(static_cast<int>(p.x() - float(mglass->width()) / 2), static_cast<int>(p.y() - float(mglass->height()) / 2));
mglass->show();
mglass->updateImage(mglass->x() + mglass->width() / 2, mglass->y() + mglass->height() / 2);
magnifyingGlassShowed = true;
magnifyingGlassShown = true;
}
}
void Viewer::hideMagnifyingGlass()
{
mglass->hide();
magnifyingGlassShowed = false;
magnifyingGlassShown = false;
}
void Viewer::informationSwitch()
@ -932,7 +932,7 @@ void Viewer::resetContent()
void Viewer::setLoadingMessage()
{
if (magnifyingGlassShowed) {
if (magnifyingGlassShown) {
hideMagnifyingGlass();
restoreMagnifyingGlass = true;
}
@ -942,7 +942,7 @@ void Viewer::setLoadingMessage()
void Viewer::setPageUnavailableMessage()
{
if (magnifyingGlassShowed) {
if (magnifyingGlassShown) {
hideMagnifyingGlass();
restoreMagnifyingGlass = true;
}

View File

@ -78,7 +78,7 @@ public slots:
void animateHideGoToFlow();
void rotateLeft();
void rotateRight();
bool magnifyingGlassIsVisible() { return magnifyingGlassShowed; }
bool magnifyingGlassIsVisible() const { return magnifyingGlassShown; }
void setBookmark(bool);
void save();
void doublePageSwitch();
@ -157,7 +157,7 @@ private:
private:
//! Magnifying glass
MagnifyingGlass *mglass;
bool magnifyingGlassShowed;
bool magnifyingGlassShown;
bool restoreMagnifyingGlass;
//! Manejadores de evento: