mirror of
https://github.com/YACReader/yacreader
synced 2025-07-27 01:15:07 -04:00
Added config option legacy_gl_widget for using QGLWidget, it fixed most of the issues in fullscreen mode. CONFIG+=legacy_gl_widget should be used in Windows until QTBUG-41883 will be fixed
This commit is contained in:
@ -4,6 +4,12 @@ INCLUDEPATH += .
|
||||
INCLUDEPATH += $$PWD/../common \
|
||||
$$PWD/../custom_widgets
|
||||
|
||||
CONFIG(legacy_gl_widget) {
|
||||
INCLUDEPATH += ../common/gl_legacy \
|
||||
} else {
|
||||
INCLUDEPATH += ../common/gl \
|
||||
}
|
||||
|
||||
win32 {
|
||||
LIBS += -L$$PWD/../dependencies/poppler/lib -loleaut32 -lole32
|
||||
|
||||
@ -94,8 +100,13 @@ HEADERS += $$PWD/../common/comic.h \
|
||||
$$PWD/../common/scroll_management.h
|
||||
|
||||
!CONFIG(no_opengl) {
|
||||
HEADERS += $$PWD/goto_flow_gl.h \
|
||||
$$PWD/../common/yacreader_flow_gl.h
|
||||
CONFIG(legacy_gl_widget) {
|
||||
message("using legacy YACReaderFlowGL (QGLWidget) header")
|
||||
HEADERS += ../common/gl_legacy/yacreader_flow_gl.h
|
||||
} else {
|
||||
HEADERS += ../common/gl/yacreader_flow_gl.h
|
||||
}
|
||||
HEADERS += $$PWD/goto_flow_gl.h
|
||||
}
|
||||
|
||||
SOURCES += $$PWD/../common/comic.cpp \
|
||||
@ -132,8 +143,13 @@ SOURCES += $$PWD/../common/comic.cpp \
|
||||
$$PWD/../common/scroll_management.cpp
|
||||
|
||||
!CONFIG(no_opengl) {
|
||||
SOURCES += $$PWD/goto_flow_gl.cpp \
|
||||
$$PWD/../common/yacreader_flow_gl.cpp
|
||||
CONFIG(legacy_gl_widget) {
|
||||
message("using legacy YACReaderFlowGL (QGLWidget) source code")
|
||||
SOURCES += ../common/gl_legacy/yacreader_flow_gl.cpp
|
||||
} else {
|
||||
SOURCES += ../common/gl/yacreader_flow_gl.cpp
|
||||
}
|
||||
SOURCES += $$PWD/goto_flow_gl.cpp
|
||||
}
|
||||
|
||||
include($$PWD/../custom_widgets/custom_widgets_yacreader.pri)
|
||||
|
@ -888,58 +888,6 @@ void MainWindowViewer::toggleFullScreen()
|
||||
Configuration::getConfiguration().setFullScreen(fullscreen = !fullscreen);
|
||||
}
|
||||
|
||||
//QTBUG-41883
|
||||
#ifdef Q_OS_WIN
|
||||
void MainWindowViewer::toFullScreen()
|
||||
{
|
||||
_size = size();
|
||||
_pos = pos();
|
||||
hide();
|
||||
fromMaximized = this->isMaximized();
|
||||
|
||||
hideToolBars();
|
||||
viewer->hide();
|
||||
viewer->fullscreen = true;//TODO, change by the right use of windowState();
|
||||
|
||||
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
||||
setWindowState(windowState() | Qt::WindowFullScreen);
|
||||
resize(windowHandle()->screen()->size()-QSize(0,1));
|
||||
|
||||
viewer->show();
|
||||
if(viewer->magnifyingGlassIsVisible())
|
||||
viewer->showMagnifyingGlass();
|
||||
|
||||
show();
|
||||
}
|
||||
|
||||
//QTBUG-41883
|
||||
void MainWindowViewer::toNormal()
|
||||
{
|
||||
hide();
|
||||
//show all
|
||||
viewer->hide();
|
||||
viewer->fullscreen = false;//TODO, change by the right use of windowState();
|
||||
//viewer->hideMagnifyingGlass();
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowStaysOnTopHint);
|
||||
setWindowState(windowState() & ~Qt::WindowFullScreen);
|
||||
resize(_size);
|
||||
move(_pos);
|
||||
if(fromMaximized)
|
||||
showMaximized();
|
||||
else
|
||||
showNormal();
|
||||
|
||||
if(Configuration::getConfiguration().getShowToolbars())
|
||||
showToolBars();
|
||||
viewer->show();
|
||||
if(viewer->magnifyingGlassIsVisible())
|
||||
viewer->showMagnifyingGlass();
|
||||
|
||||
show();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void MainWindowViewer::toFullScreen()
|
||||
{
|
||||
fromMaximized = this->isMaximized();
|
||||
@ -971,8 +919,6 @@ void MainWindowViewer::toNormal()
|
||||
viewer->showMagnifyingGlass();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void MainWindowViewer::toggleToolBars()
|
||||
{
|
||||
toolbars?hideToolBars():showToolBars();
|
||||
|
Reference in New Issue
Block a user