mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-02-10 18:05:16 +08:00
qt 5.8 & dpi functions
This commit is contained in:
@ -106,6 +106,8 @@ linux-g++ {
|
||||
|
||||
win32 {
|
||||
DEFINES += JAS_WIN_MSVC_BUILD WIN32
|
||||
DEFINES += WIN32
|
||||
|
||||
RC_ICONS += ./res/icons/desktop_icons.ico
|
||||
|
||||
HEADERS += $$PWD/src/win/mainwindow.h \
|
||||
|
||||
@ -64,6 +64,10 @@ BYTE g_dpi_ratio = 1;
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
#ifdef _WIN32
|
||||
Core_SetProcessDpiAwareness();
|
||||
#endif
|
||||
|
||||
QString user_data_path = Utils::getUserPath() + APP_DATA_PATH;
|
||||
|
||||
auto setup_paths = [&user_data_path](CAscApplicationManager * manager) {
|
||||
|
||||
@ -187,7 +187,7 @@ bool QWinHost::event(QEvent *e)
|
||||
case QEvent::Polish:
|
||||
if (!hwnd)
|
||||
{
|
||||
hwnd = createWindow((HWND)winId(), qWinAppInst());
|
||||
hwnd = createWindow((HWND)winId(), GetModuleHandle(0));
|
||||
fixParent();
|
||||
own_hwnd = hwnd != 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user