Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable shortcut keys for switching pages on the login page #172

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -401,5 +401,16 @@
<file>resources/images/check_circle_green_icon.svg</file>
<file>resources/images/info_circle_icon.svg</file>
<file>resources/images/light_mode/sidebar/settings_icon.svg</file>
<file>resources/images/mobile/arrow_left.svg</file>
<file>resources/images/mobile/folder.svg</file>
<file>resources/images/mobile/profile.svg</file>
<file>resources/images/mobile/brush.svg</file>
<file>resources/images/mobile/sign_out.svg</file>
<file>resources/images/mobile/library.svg</file>
<file>resources/images/mobile/server.svg</file>
<file>resources/images/mobile/explore.svg</file>
<file>resources/images/mobile/refresh.svg</file>
<file>resources/images/mobile/diamond.svg</file>
<file>resources/images/mobile/gear.svg</file>
</qresource>
</RCC>
4 changes: 4 additions & 0 deletions resources/images/mobile/arrow_left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/images/mobile/brush.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/images/mobile/diamond.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/images/mobile/explore.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/images/mobile/folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/images/mobile/gear.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/images/mobile/library.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/images/mobile/profile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/images/mobile/refresh.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions resources/images/mobile/server.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/images/mobile/sign_out.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Configuration
set(QML_IMPORT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/presentation/modules ${CMAKE_CURRENT_BINARY_DIR}/" CACHE STRING "Qml modules")

if(ANDROID)
set(QML_IMPORT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/presentation/mobile/modules CACHE STRING "Qml modules" FORCE)
else()
set(QML_IMPORT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/presentation/desktop/modules CACHE STRING "Qml modules" FORCE)
endif()

# Language
set(CMAKE_CXX_STANDARD 20)
Expand Down Expand Up @@ -47,7 +50,6 @@ if(ANDROID)
list(APPEND CUSTOM_ANDROID_EXTRA_LIBS "${PROJECT_SOURCE_DIR}/libs/mupdf/build/shared-debug/libmupdf.so")
list(APPEND CUSTOM_ANDROID_EXTRA_LIBS "${PROJECT_SOURCE_DIR}/libs/mupdf/build/shared-debug/libmupdfcpp.so")
string(REPLACE ";" "," CUSTOM_ANDROID_EXTRA_LIBS_STRING "${CUSTOM_ANDROID_EXTRA_LIBS}")

set_property(TARGET librum PROPERTY QT_ANDROID_EXTRA_LIBS
${ANDROID_SDK_ROOT}/android_openssl/ssl_3/arm64-v8a/libcrypto_3.so
${ANDROID_SDK_ROOT}/android_openssl/ssl_3/arm64-v8a/libssl_3.so
Expand Down
5 changes: 4 additions & 1 deletion src/adapters/controllers/page_controller.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "page_controller.hpp"
#include <QDebug>
#include "fz_utils.hpp"
#include "mupdf/classes.h"

Expand Down Expand Up @@ -54,11 +55,13 @@ void PageController::setInvertColor(bool newInvertColor)
m_pageImageOutdated = true;
}

QImage PageController::renderPage()
QImage PageController::renderPage(int pageNr)
{
if(!m_pageImageOutdated)
return m_pageImage;

qDebug() << "Re-rendering page nr: " << pageNr;

auto zoom = m_matrix.a;
m_pageImage = utils::qImageFromPixmap(m_pageGenerator.renderPage(zoom));

Expand Down
2 changes: 1 addition & 1 deletion src/adapters/controllers/page_controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PageController : public IPageController

void setInvertColor(bool newInvertColor) override;

QImage renderPage() override;
QImage renderPage(int pageNr) override;

bool pointIsAboveText(const QPointF& point) override;
bool pointIsAboveLink(const QPointF& point) override;
Expand Down
Loading
Loading