mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-25 05:48:54 -04:00
Merge pull request #368 from kiwix/fullscreen-menu-windows
This commit is contained in:
commit
f70891cfb8
@ -31,6 +31,8 @@ KiwixApp::KiwixApp(int& argc, char *argv[])
|
||||
QMessageBox::critical(nullptr, "Translation error", e.what());
|
||||
return;
|
||||
}
|
||||
qInfo() << "Compiled with Qt Version " << QT_VERSION_STR;
|
||||
qInfo() << "Runtime Qt Version " << qVersion();
|
||||
m_qtTranslator.load(QLocale(), "qt", "_",
|
||||
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
installTranslator(&m_qtTranslator);
|
||||
@ -103,7 +105,6 @@ void KiwixApp::init()
|
||||
mp_mainWindow->getSideContentManager()->setContentManager(mp_manager);
|
||||
setSideBar(CONTENTMANAGER_BAR);
|
||||
postInit();
|
||||
|
||||
mp_errorDialog = new QErrorMessage(mp_mainWindow);
|
||||
mp_mainWindow->show();
|
||||
}
|
||||
|
@ -7,6 +7,9 @@
|
||||
#include "kconstants.h"
|
||||
|
||||
#include <QDesktopServices>
|
||||
#ifdef Q_OS_WIN
|
||||
#include <QtPlatformHeaders\QWindowsWindowFunctions>
|
||||
#endif
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
@ -38,6 +41,13 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
#if !SYSTEMTITLEBAR
|
||||
setWindowFlags(Qt::Window | Qt::CustomizeWindowHint);
|
||||
#endif
|
||||
#ifdef Q_OS_WIN
|
||||
QWindow *window = windowHandle();
|
||||
if (!window) {
|
||||
return;
|
||||
}
|
||||
QWindowsWindowFunctions::setHasBorderInFullScreen(window, true);
|
||||
#endif
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
@ -70,4 +80,4 @@ QStackedWidget *MainWindow::getSideDockWidget()
|
||||
ContentManagerSide *MainWindow::getSideContentManager()
|
||||
{
|
||||
return mp_ui->contentmanagerside;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user