Compare commits

...

28 commits
1.6.x ... 1.7.x

Author SHA1 Message Date
Syping 8732b9d64d 1.7.1 release, fix installation
Some checks failed
continuous-integration/drone/push Build is failing
2019-08-04 15:56:16 +02:00
Syping bb4a9b484c 1.7.1 release, korean translation added 2019-08-04 15:49:32 +02:00
Syping c79c8dbe6e 1.7.0 release 2019-07-24 20:23:40 +02:00
Syping 4e31d159fa 1.7.0 release 2019-07-24 20:16:48 +02:00
Syping 0633d14d6b install Lua, change buildtype to Release 2019-07-24 20:12:26 +02:00
Syping c6b39546ba remove function to click numbers (don't work anymore) 2019-07-24 20:05:34 +02:00
Syping eac9caa2c6 fix compatibility issue 2019-07-24 19:47:08 +02:00
Syping a80b5843a7 fix build script 2019-07-24 19:10:14 +02:00
Syping 07797f6e60 remove upx compression step 2019-07-24 18:57:00 +02:00
Syping 55186e8b88 improve MapLocationDialog 2019-07-24 18:35:32 +02:00
Syping eee9100d8b remove OpenSSL changes 2019-04-22 20:39:18 +02:00
Syping b73719ed4e add WindowsVista style 2019-04-22 05:25:28 +02:00
Syping a143b43d15 fix uninstallation 2019-04-22 05:10:39 +02:00
Syping 032475ddfd remove audio 2019-04-22 05:07:04 +02:00
Syping bdde72573b gta5view.nsi now UTF-8 2019-04-22 05:05:12 +02:00
Syping 827676768a update Qt to 5.12.3 2019-04-22 04:59:26 +02:00
Syping 0c02c3ce98 use icons for PlayerListDialog buttons 2019-01-16 02:11:42 +01:00
Syping 6063803d5e improve PlayerListDialog 2019-01-13 14:56:35 +01:00
Syping 1f3c036b47 navigation bar fixed 2019-01-13 14:40:16 +01:00
Syping ea0526ae9d massive DPI improvements 2019-01-13 14:32:12 +01:00
Syping aeae6c9311 fix DPI scaling in PictureDialog 2018-12-25 21:05:09 +01:00
Syping c39c3a3e9f always scale savegame graphic 2018-12-02 18:10:34 +01:00
Syping 9989d9d869 replace savegame.png with scaleable savegame.svgz 2018-12-01 17:47:28 +01:00
Syping fa86e8f8a7 fix Windows installer build 2018-11-22 21:54:16 +01:00
Syping f9880fff70 update toolchain 2018-11-22 21:50:53 +01:00
Syping 7ba5322643 fix CI script SVG module installation 2018-11-18 20:39:32 +01:00
Syping 1f409b0f25 Scaleable navigation bar icons 2018-11-18 18:08:18 +01:00
Syping dea33f8ab0 1.7 development 2018-09-09 19:25:28 +02:00
59 changed files with 4871 additions and 2453 deletions

View file

@ -21,13 +21,13 @@ mkdir -p /usr/share/gta5view && \
# Starting build # Starting build
cd qt5 && \ cd qt5 && \
qmake -qt=5 -spec linux-clang GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=gnu++11 ${QMAKE_FLAGS_QT5} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" "DEFINES+=GTA5SYNC_COMMIT=\\\\\\\"${APPLICATION_COMMIT}\\\\\\\"" DEFINES+=GTA5SYNC_QCONF DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" ../../gta5view.pro && \ qmake -qt=5 -spec linux-clang GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=gnu++11 ${QMAKE_FLAGS_QT5} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" "DEFINES+=GTA5SYNC_COMMIT=\\\\\\\"${APPLICATION_COMMIT}\\\\\\\"" DEFINES+=GTA5SYNC_QCONF DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" DEFINES+=GTA5SYNC_DONATION "DEFINES+=GTA5SYNC_DONATION_EMAIL=\\\\\\\"paypal/at/syping.de\\\\\\\"" ../../gta5view.pro && \
make depend && \ make depend && \
make -j 4 && \ make -j 4 && \
checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt5 --pkgversion=${PACKAGE_VERSION} --pkgrelease=${PACKAGE_BUILD} --pkggroup=utility --maintainer="Syping \<dpkg@syping.de\>" --requires=libqt5core5a,libqt5gui5,libqt5network5,libqt5widgets5,qttranslations5-l10n --conflicts=gta5view,gta5view-qt4 --replaces=gta5view,gta5view-qt4 --pakdir=${PROJECT_DIR}/assets && \ checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt5 --pkgversion=${PACKAGE_VERSION} --pkgrelease=${PACKAGE_BUILD} --pkggroup=utility --maintainer="Syping \<dpkg@syping.de\>" --requires=libqt5core5a,libqt5gui5,libqt5network5,libqt5svg5,libqt5widgets5,qttranslations5-l10n --conflicts=gta5view,gta5view-qt4 --replaces=gta5view,gta5view-qt4 --pakdir=${PROJECT_DIR}/assets && \
cd .. && \ cd .. && \
cd qt4 && \ cd qt4 && \
qmake -qt=4 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=gnu++11 ${QMAKE_FLAGS_QT4} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro && \ qmake -qt=4 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=gnu++11 ${QMAKE_FLAGS_QT4} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro && \
make depend && \ make depend && \
make -j 4 && \ make -j 4 && \
checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt4 --pkgversion=${PACKAGE_VERSION} --pkgrelease=${PACKAGE_BUILD} --pkggroup=utility --maintainer="Syping \<dpkg@syping.de\>" --requires=libqtcore4,libqtgui4,libqt4-network,qtcore4-l10n --conflicts=gta5view,gta5view-qt5 --replaces=gta5view,gta5view-qt5 --pakdir=${PROJECT_DIR}/assets checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt4 --pkgversion=${PACKAGE_VERSION} --pkgrelease=${PACKAGE_BUILD} --pkggroup=utility --maintainer="Syping \<dpkg@syping.de\>" --requires=libqtcore4,libqtgui4,libqt4-network,libqt4-svg,qtcore4-l10n --conflicts=gta5view,gta5view-qt5 --replaces=gta5view,gta5view-qt5 --pakdir=${PROJECT_DIR}/assets

View file

@ -2,4 +2,4 @@
# Install packages # Install packages
apt-get update -qq && \ apt-get update -qq && \
apt-get install -qq ${APT_INSTALL} checkinstall dpkg-dev fakeroot g++ gcc qtbase5-dev qt5-qmake qttranslations5-l10n libqt4-dev apt-get install -qq ${APT_INSTALL} checkinstall dpkg-dev fakeroot g++ gcc qtbase5-dev qt5-qmake qttranslations5-l10n libqt4-dev libqt5svg5-dev

View file

@ -3,8 +3,8 @@
!define APP_NAME "gta5view" !define APP_NAME "gta5view"
!define COMP_NAME "Syping" !define COMP_NAME "Syping"
!define WEB_SITE "https://gta5view.syping.de/" !define WEB_SITE "https://gta5view.syping.de/"
!define VERSION "1.6.0.0" !define VERSION "1.7.1.0"
!define COPYRIGHT "Copyright © 2016-2018 Syping" !define COPYRIGHT "Copyright © 2016-2019 Syping"
!define DESCRIPTION "Grand Theft Auto V Savegame and Snapmatic Viewer/Editor" !define DESCRIPTION "Grand Theft Auto V Savegame and Snapmatic Viewer/Editor"
!define INSTALLER_NAME "gta5view_setup.exe" !define INSTALLER_NAME "gta5view_setup.exe"
!define MAIN_APP_EXE "gta5view.exe" !define MAIN_APP_EXE "gta5view.exe"
@ -33,6 +33,7 @@ Caption "${APP_NAME}"
OutFile "${INSTALLER_NAME}" OutFile "${INSTALLER_NAME}"
#BrandingText "${APP_NAME}" #BrandingText "${APP_NAME}"
XPStyle on XPStyle on
Unicode true
InstallDirRegKey "${REG_ROOT}" "${REG_APP_PATH}" "" InstallDirRegKey "${REG_ROOT}" "${REG_APP_PATH}" ""
InstallDir "$PROGRAMFILES64\Syping\gta5view" InstallDir "$PROGRAMFILES64\Syping\gta5view"
@ -78,6 +79,7 @@ InstallDir "$PROGRAMFILES64\Syping\gta5view"
!insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French" !insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German" !insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Korean"
!insertmacro MUI_LANGUAGE "Russian" !insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Ukrainian" !insertmacro MUI_LANGUAGE "Ukrainian"
!insertmacro MUI_LANGUAGE "TradChinese" !insertmacro MUI_LANGUAGE "TradChinese"
@ -102,10 +104,10 @@ ${INSTALL_TYPE}
SetOverwrite ifnewer SetOverwrite ifnewer
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
File "../build/release/gta5view.exe" File "../build/release/gta5view.exe"
File "/usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/libgcc_s_seh-1.dll" File "/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/libgcc_s_seh-1.dll"
File "/usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/libstdc++-6.dll" File "/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/libstdc++-6.dll"
File "/opt/windev/libressl-latest_qt64d/bin/libcrypto-43.dll" File "/opt/windev/openssl-latest_qt64d/bin/libcrypto-1_1-x64.dll"
File "/opt/windev/libressl-latest_qt64d/bin/libssl-45.dll" File "/opt/windev/openssl-latest_qt64d/bin/libssl-1_1-x64.dll"
File "/opt/windev/libjpeg-turbo-latest_qt64d/bin/libjpeg-62.dll" File "/opt/windev/libjpeg-turbo-latest_qt64d/bin/libjpeg-62.dll"
File "/opt/windev/qt64d-latest/bin/Qt5Core.dll" File "/opt/windev/qt64d-latest/bin/Qt5Core.dll"
File "/opt/windev/qt64d-latest/bin/Qt5Gui.dll" File "/opt/windev/qt64d-latest/bin/Qt5Gui.dll"
@ -117,17 +119,17 @@ SetOutPath "$INSTDIR\lang"
File "../res/gta5sync_en_US.qm" File "../res/gta5sync_en_US.qm"
File "../res/gta5sync_de.qm" File "../res/gta5sync_de.qm"
File "../res/gta5sync_fr.qm" File "../res/gta5sync_fr.qm"
File "../res/gta5sync_ko.qm"
File "../res/gta5sync_ru.qm" File "../res/gta5sync_ru.qm"
File "../res/gta5sync_uk.qm" File "../res/gta5sync_uk.qm"
File "../res/gta5sync_zh_TW.qm" File "../res/gta5sync_zh_TW.qm"
File "../res/qtbase_en_GB.qm" File "../res/qtbase_en_GB.qm"
File "../res/qtbase_de.qm" File "../res/qtbase_de.qm"
File "../res/qtbase_fr.qm" File "../res/qtbase_fr.qm"
File "../res/qtbase_ko.qm"
File "../res/qtbase_ru.qm" File "../res/qtbase_ru.qm"
File "../res/qtbase_uk.qm" File "../res/qtbase_uk.qm"
File "../res/qtbase_zh_TW.qm" File "../res/qtbase_zh_TW.qm"
SetOutPath "$INSTDIR\audio"
File "/opt/windev/qt64d-latest/plugins/audio/qtaudio_windows.dll"
SetOutPath "$INSTDIR\imageformats" SetOutPath "$INSTDIR\imageformats"
File "/opt/windev/qt64d-latest/plugins/imageformats/qgif.dll" File "/opt/windev/qt64d-latest/plugins/imageformats/qgif.dll"
File "/opt/windev/qt64d-latest/plugins/imageformats/qicns.dll" File "/opt/windev/qt64d-latest/plugins/imageformats/qicns.dll"
@ -143,6 +145,7 @@ File "/opt/windev/qt64d-latest/plugins/platforms/qwindows.dll"
SetOutPath "$INSTDIR\styles" SetOutPath "$INSTDIR\styles"
File "/opt/windev/qt64d-latest/plugins/styles/qcleanlooksstyle.dll" File "/opt/windev/qt64d-latest/plugins/styles/qcleanlooksstyle.dll"
File "/opt/windev/qt64d-latest/plugins/styles/qplastiquestyle.dll" File "/opt/windev/qt64d-latest/plugins/styles/qplastiquestyle.dll"
File "/opt/windev/qt64d-latest/plugins/styles/qwindowsvistastyle.dll"
SectionEnd SectionEnd
###################################################################### ######################################################################
@ -194,8 +197,8 @@ ${INSTALL_TYPE}
Delete "$INSTDIR\gta5view.exe" Delete "$INSTDIR\gta5view.exe"
Delete "$INSTDIR\libgcc_s_seh-1.dll" Delete "$INSTDIR\libgcc_s_seh-1.dll"
Delete "$INSTDIR\libstdc++-6.dll" Delete "$INSTDIR\libstdc++-6.dll"
Delete "$INSTDIR\libcrypto-43.dll" Delete "$INSTDIR\libcrypto-1_1-x64.dll"
Delete "$INSTDIR\libssl-45.dll" Delete "$INSTDIR\libssl-1_1-x64.dll"
Delete "$INSTDIR\libjpeg-62.dll" Delete "$INSTDIR\libjpeg-62.dll"
Delete "$INSTDIR\Qt5Core.dll" Delete "$INSTDIR\Qt5Core.dll"
Delete "$INSTDIR\Qt5Gui.dll" Delete "$INSTDIR\Qt5Gui.dll"
@ -206,16 +209,17 @@ Delete "$INSTDIR\Qt5WinExtras.dll"
Delete "$INSTDIR\lang\gta5sync_en_US.qm" Delete "$INSTDIR\lang\gta5sync_en_US.qm"
Delete "$INSTDIR\lang\gta5sync_de.qm" Delete "$INSTDIR\lang\gta5sync_de.qm"
Delete "$INSTDIR\lang\gta5sync_fr.qm" Delete "$INSTDIR\lang\gta5sync_fr.qm"
Delete "$INSTDIR\lang\gta5sync_ko.qm"
Delete "$INSTDIR\lang\gta5sync_ru.qm" Delete "$INSTDIR\lang\gta5sync_ru.qm"
Delete "$INSTDIR\lang\gta5sync_uk.qm" Delete "$INSTDIR\lang\gta5sync_uk.qm"
Delete "$INSTDIR\lang\gta5sync_zh_TW.qm" Delete "$INSTDIR\lang\gta5sync_zh_TW.qm"
Delete "$INSTDIR\lang\qtbase_en_GB.qm" Delete "$INSTDIR\lang\qtbase_en_GB.qm"
Delete "$INSTDIR\lang\qtbase_de.qm" Delete "$INSTDIR\lang\qtbase_de.qm"
Delete "$INSTDIR\lang\qtbase_fr.qm" Delete "$INSTDIR\lang\qtbase_fr.qm"
Delete "$INSTDIR\lang\qtbase_ko.qm"
Delete "$INSTDIR\lang\qtbase_ru.qm" Delete "$INSTDIR\lang\qtbase_ru.qm"
Delete "$INSTDIR\lang\qtbase_uk.qm" Delete "$INSTDIR\lang\qtbase_uk.qm"
Delete "$INSTDIR\lang\qtbase_zh_TW.qm" Delete "$INSTDIR\lang\qtbase_zh_TW.qm"
Delete "$INSTDIR\audio\qtaudio_windows.dll"
Delete "$INSTDIR\imageformats\qgif.dll" Delete "$INSTDIR\imageformats\qgif.dll"
Delete "$INSTDIR\imageformats\qicns.dll" Delete "$INSTDIR\imageformats\qicns.dll"
Delete "$INSTDIR\imageformats\qico.dll" Delete "$INSTDIR\imageformats\qico.dll"
@ -228,8 +232,8 @@ Delete "$INSTDIR\imageformats\qwebp.dll"
Delete "$INSTDIR\platforms\qwindows.dll" Delete "$INSTDIR\platforms\qwindows.dll"
Delete "$INSTDIR\styles\qcleanlooksstyle.dll" Delete "$INSTDIR\styles\qcleanlooksstyle.dll"
Delete "$INSTDIR\styles\qplastiquestyle.dll" Delete "$INSTDIR\styles\qplastiquestyle.dll"
Delete "$INSTDIR\styles\qwindowsvistastyle.dll"
RmDir "$INSTDIR\lang" RmDir "$INSTDIR\lang"
RmDir "$INSTDIR\audio"
RmDir "$INSTDIR\imageformats" RmDir "$INSTDIR\imageformats"
RmDir "$INSTDIR\platforms" RmDir "$INSTDIR\platforms"
RmDir "$INSTDIR\styles" RmDir "$INSTDIR\styles"

View file

@ -12,9 +12,8 @@ mkdir -p assets && \
# Starting build # Starting build
cd build && \ cd build && \
qmake-static ${QMAKE_FLAGS_QT5} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" "DEFINES+=GTA5SYNC_COMMIT=\\\\\\\"${APPLICATION_COMMIT}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" ../gta5view.pro && \ qmake-static ${QMAKE_FLAGS_QT5} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" "DEFINES+=GTA5SYNC_COMMIT=\\\\\\\"${APPLICATION_COMMIT}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" DEFINES+=GTA5SYNC_DONATION "DEFINES+=GTA5SYNC_DONATION_EMAIL=\\\\\\\"paypal/at/syping.de\\\\\\\"" ../gta5view.pro && \
make depend && \ make depend && \
make -j 4 && \ make -j 4 && \
cp -Rf release/*.exe ${PROJECT_DIR}/assets/${GTA5VIEW_EXECUTABLE} && \ cp -Rf release/*.exe ${PROJECT_DIR}/assets/${GTA5VIEW_EXECUTABLE} && \
cd ${PROJECT_DIR}/assets && \ cd ${PROJECT_DIR}/assets
upx --best ${GTA5VIEW_EXECUTABLE}

View file

@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
QT_VERSION=5.9.6 DOCKER_IMAGE=sypingauto/gta5view-build:1.7-static
DOCKER_IMAGE=syping/qt5-static-mingw:${QT_VERSION}
PROJECT_DIR_DOCKER=/gta5view PROJECT_DIR_DOCKER=/gta5view
cd ${PROJECT_DIR} && \ cd ${PROJECT_DIR} && \

View file

@ -12,7 +12,7 @@ mkdir -p assets && \
# Starting build # Starting build
cd build && \ cd build && \
qmake ${QMAKE_FLAGS_QT5} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" "DEFINES+=GTA5SYNC_COMMIT=\\\\\\\"${APPLICATION_COMMIT}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" DEFINES+=GTA5SYNC_QCONF DEFINES+=GTA5SYNC_INLANG='\\\"RUNDIR:SEPARATOR:lang\\\"' DEFINES+=GTA5SYNC_LANG='\\\"RUNDIR:SEPARATOR:lang\\\"' DEFINES+=GTA5SYNC_PLUG='\\\"RUNDIR:SEPARATOR:plugins\\\"' ../gta5view.pro && \ qmake ${QMAKE_FLAGS_QT5} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" "DEFINES+=GTA5SYNC_COMMIT=\\\\\\\"${APPLICATION_COMMIT}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" DEFINES+=GTA5SYNC_DONATION "DEFINES+=GTA5SYNC_DONATION_EMAIL=\\\\\\\"paypal/at/syping.de\\\\\\\"" DEFINES+=GTA5SYNC_QCONF DEFINES+=GTA5SYNC_INLANG='\\\"RUNDIR:SEPARATOR:lang\\\"' DEFINES+=GTA5SYNC_LANG='\\\"RUNDIR:SEPARATOR:lang\\\"' DEFINES+=GTA5SYNC_PLUG='\\\"RUNDIR:SEPARATOR:plugins\\\"' "LIBS+=-ljpeg" ../gta5view.pro && \
make depend && \ make depend && \
make -j 4 && \ make -j 4 && \
cd ${PROJECT_DIR}/assets && \ cd ${PROJECT_DIR}/assets && \

View file

@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
QT_VERSION=5.9.6 DOCKER_IMAGE=sypingauto/gta5view-build:1.7-shared
DOCKER_IMAGE=syping/qt5-shared-mingw:${QT_VERSION}
PROJECT_DIR_DOCKER=/gta5view PROJECT_DIR_DOCKER=/gta5view
cd ${PROJECT_DIR} && \ cd ${PROJECT_DIR} && \

View file

@ -6,7 +6,7 @@ variables:
Windows Installer: Windows Installer:
stage: build stage: build
image: syping/qt5-shared-mingw:5.9.6 image: sypingauto/gta5view-build:1.7-shared
variables: variables:
BUILD_SCRIPT: "wininstall_build.sh" BUILD_SCRIPT: "wininstall_build.sh"
QT_SELECT: "qt5-x86_64-w64-mingw32" QT_SELECT: "qt5-x86_64-w64-mingw32"
@ -19,7 +19,7 @@ Windows Installer:
Windows Portable: Windows Portable:
stage: build stage: build
image: syping/qt5-static-mingw:5.9.6 image: sypingauto/gta5view-build:1.7-static
variables: variables:
BUILD_SCRIPT: "windows_build.sh" BUILD_SCRIPT: "windows_build.sh"
QT_SELECT: "qt5-x86_64-w64-mingw32" QT_SELECT: "qt5-x86_64-w64-mingw32"

View file

@ -1,9 +1,5 @@
#!/bin/bash #!/bin/bash
# Install curl, git, lua, nsis and openssl
apt-get update -qq && \
apt-get install -qq curl git lua5.2 nsis openssl
# Decrypt Telemetry Authenticator # Decrypt Telemetry Authenticator
rm -rf tmext/TelemetryClassAuthenticator.cpp && \ rm -rf tmext/TelemetryClassAuthenticator.cpp && \
openssl aes-256-cbc -k $tca_pass -in .gitlab/TelemetryClassAuthenticator.cpp.enc -out tmext/TelemetryClassAuthenticator.cpp -d openssl aes-256-cbc -k $tca_pass -in .gitlab/TelemetryClassAuthenticator.cpp.enc -out tmext/TelemetryClassAuthenticator.cpp -d

View file

@ -1,11 +1,11 @@
#!/bin/bash #!/bin/bash
# Install curl and lua # Install lua
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
sudo apt-get update -qq && \
sudo apt-get install -qq curl lua5.2
elif [ "${TRAVIS_OS_NAME}" == "osx" ]; then
brew install lua brew install lua
else
sudo apt-get update -qq && \
sudo apt-get install -qq lua5.2
fi fi
# Check if build is not tagged # Check if build is not tagged

View file

@ -1,6 +1,6 @@
/***************************************************************************** /*****************************************************************************
* gta5view Grand Theft Auto V Profile Viewer * gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping * Copyright (C) 2016-2019 Syping
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -509,3 +509,12 @@ qreal AppEnv::screenRatio()
return (dpi / 96); return (dpi / 96);
#endif #endif
} }
qreal AppEnv::screenRatioPR()
{
#if QT_VERSION >= 0x050600
return QGuiApplication::primaryScreen()->devicePixelRatio();
#else
return 1;
#endif
}

View file

@ -56,6 +56,7 @@ public:
// Screen Stuff // Screen Stuff
static qreal screenRatio(); static qreal screenRatio();
static qreal screenRatioPR();
}; };
#endif // APPENV_H #endif // APPENV_H

View file

@ -44,79 +44,10 @@ void DatabaseThread::run()
{ {
QEventLoop threadLoop; QEventLoop threadLoop;
QStringList crewList;
QStringList crewListR;
// Register thread loop end signal
QObject::connect(this, SIGNAL(threadTerminated()), &threadLoop, SLOT(quit())); QObject::connect(this, SIGNAL(threadTerminated()), &threadLoop, SLOT(quit()));
// Setup crewList for Quick time scan
crewList = crewDB->getCrews();
if (!crewList.isEmpty())
{
crewListR = deleteCompatibleCrews(crewList);
}
else
{
while (crewList.isEmpty() && threadRunning)
{
QTimer::singleShot(1000, &threadLoop, SLOT(quit()));
threadLoop.exec();
if (!crewDB->isAddingCrews())
{
crewList = crewDB->getCrews();
}
}
if (threadRunning)
{
crewListR = deleteCompatibleCrews(crewList);
}
}
// Only do QTS when Thread should be run
if (threadRunning)
{
// Quick time scan
#ifdef GTA5SYNC_DEBUG
qDebug() << "Start QTS";
#endif
if (crewListR.length() <= 5)
{
scanCrewReference(crewListR, 2500);
emit crewNameUpdated();
}
if (crewList.length() <= 3)
{
scanCrewMembersList(crewList, 3, 2500);
emit playerNameUpdated();
}
else if (crewList.length() <= 5)
{
scanCrewMembersList(crewList, 2, 2500);
emit playerNameUpdated();
}
if (threadRunning)
{
QTimer::singleShot(10000, &threadLoop, SLOT(quit()));
threadLoop.exec();
}
}
while (threadRunning) while (threadRunning)
{ {
crewList = crewDB->getCrews();
crewListR = deleteCompatibleCrews(crewList);
// Long time scan
#ifdef GTA5SYNC_DEBUG
qDebug() << "Start LTS";
#endif
scanCrewReference(crewListR, 10000);
emit crewNameUpdated();
scanCrewMembersList(crewList, crewMaxPages, 10000);
emit playerNameUpdated();
if (threadRunning) if (threadRunning)
{ {
QTimer::singleShot(300000, &threadLoop, SLOT(quit())); QTimer::singleShot(300000, &threadLoop, SLOT(quit()));

View file

@ -1,6 +1,6 @@
/***************************************************************************** /*****************************************************************************
* gta5view Grand Theft Auto V Profile Viewer * gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017-2018 Syping * Copyright (C) 2017-2019 Syping
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -142,6 +142,7 @@ void ImportDialog::processImage()
QPixmap snapmaticPixmap(snapmaticResolutionW, snapmaticResolutionH); QPixmap snapmaticPixmap(snapmaticResolutionW, snapmaticResolutionH);
snapmaticPixmap.fill(selectedColour); snapmaticPixmap.fill(selectedColour);
QPainter snapmaticPainter(&snapmaticPixmap); QPainter snapmaticPainter(&snapmaticPixmap);
qreal screenRatioPR = AppEnv::screenRatioPR();
if (!backImage.isNull()) if (!backImage.isNull())
{ {
if (!ui->cbStretch->isChecked()) if (!ui->cbStretch->isChecked())
@ -225,7 +226,10 @@ void ImportDialog::processImage()
} }
snapmaticPainter.end(); snapmaticPainter.end();
newImage = snapmaticPixmap.toImage(); newImage = snapmaticPixmap.toImage();
ui->labPicture->setPixmap(snapmaticPixmap.scaled(snapmaticResolutionLW, snapmaticResolutionLH, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); #if QT_VERSION >= 0x050600
snapmaticPixmap.setDevicePixelRatio(screenRatioPR);
#endif
ui->labPicture->setPixmap(snapmaticPixmap.scaled(snapmaticResolutionLW * screenRatioPR, snapmaticResolutionLH * screenRatioPR, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
} }
void ImportDialog::processWatermark(QPainter *snapmaticPainter) void ImportDialog::processWatermark(QPainter *snapmaticPainter)

View file

@ -94,6 +94,7 @@ JsonEditorDialog::JsonEditorDialog(SnapmaticPicture *picture, QWidget *parent) :
{ {
ui->lineJSON->setMinimumHeight(qRound(1 * screenRatio)); ui->lineJSON->setMinimumHeight(qRound(1 * screenRatio));
ui->lineJSON->setMaximumHeight(qRound(1 * screenRatio)); ui->lineJSON->setMaximumHeight(qRound(1 * screenRatio));
ui->lineJSON->setLineWidth(qRound(1 * screenRatio));
} }
resize(450 * screenRatio, 550 * screenRatio); resize(450 * screenRatio, 550 * screenRatio);
} }

View file

@ -1,6 +1,6 @@
/***************************************************************************** /*****************************************************************************
* gta5view Grand Theft Auto V Profile Viewer * gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017 Syping * Copyright (C) 2017-2019 Syping
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -61,9 +61,10 @@ MapLocationDialog::~MapLocationDialog()
void MapLocationDialog::drawPointOnMap(double xpos_d, double ypos_d) void MapLocationDialog::drawPointOnMap(double xpos_d, double ypos_d)
{ {
qreal screenRatio = AppEnv::screenRatio(); qreal screenRatio = AppEnv::screenRatio();
int pointMakerSize = 8 * screenRatio; qreal screenRatioPR = AppEnv::screenRatioPR();
int pointMakerSize = 8 * screenRatio * screenRatioPR;
QPixmap pointMakerPixmap = IconLoader::loadingPointmakerIcon().pixmap(QSize(pointMakerSize, pointMakerSize)); QPixmap pointMakerPixmap = IconLoader::loadingPointmakerIcon().pixmap(QSize(pointMakerSize, pointMakerSize));
QSize mapPixelSize = size(); QSize mapPixelSize = QSize(width() * screenRatioPR, height() * screenRatioPR);
int pointMakerHalfSize = pointMakerSize / 2; int pointMakerHalfSize = pointMakerSize / 2;
long xpos_ms = qRound(xpos_d); long xpos_ms = qRound(xpos_d);
@ -82,6 +83,9 @@ void MapLocationDialog::drawPointOnMap(double xpos_d, double ypos_d)
mapPainter.drawPixmap(0, 0, mapPixelSize.width(), mapPixelSize.height(), QPixmap(":/img/mappreview.jpg").scaled(mapPixelSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); mapPainter.drawPixmap(0, 0, mapPixelSize.width(), mapPixelSize.height(), QPixmap(":/img/mappreview.jpg").scaled(mapPixelSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
mapPainter.drawPixmap(xpos_pr, mapPixelSize.height() - ypos_pr, pointMakerSize, pointMakerSize, pointMakerPixmap); mapPainter.drawPixmap(xpos_pr, mapPixelSize.height() - ypos_pr, pointMakerSize, pointMakerSize, pointMakerPixmap);
mapPainter.end(); mapPainter.end();
#if QT_VERSION >= 0x050600
mapPixmap.setDevicePixelRatio(screenRatioPR);
#endif
QPalette backgroundPalette; QPalette backgroundPalette;
backgroundPalette.setBrush(backgroundRole(), QBrush(mapPixmap)); backgroundPalette.setBrush(backgroundRole(), QBrush(mapPixmap));

View file

@ -703,7 +703,7 @@ void OptionsDialog::setupSnapmaticPictureViewer()
#ifdef GTA5SYNC_WIN #ifdef GTA5SYNC_WIN
#if QT_VERSION >= 0x050200 #if QT_VERSION >= 0x050200
settings->beginGroup("Interface"); settings->beginGroup("Interface");
ui->cbSnapmaticNavigationBar->setChecked(settings->value("NavigationBar", false).toBool()); ui->cbSnapmaticNavigationBar->setChecked(settings->value("NavigationBar", true).toBool());
settings->endGroup(); settings->endGroup();
#else #else
ui->cbSnapmaticNavigationBar->setVisible(false); ui->cbSnapmaticNavigationBar->setVisible(false);

View file

@ -138,9 +138,10 @@ void PictureDialog::setupPictureDialog()
// Avatar area // Avatar area
qreal screenRatio = AppEnv::screenRatio(); qreal screenRatio = AppEnv::screenRatio();
if (screenRatio != 1) qreal screenRatioPR = AppEnv::screenRatioPR();
if (screenRatio != 1 || screenRatioPR != 1)
{ {
avatarAreaPicture = QImage(":/img/avatararea.png").scaledToHeight(536 * screenRatio, Qt::FastTransformation); avatarAreaPicture = QImage(":/img/avatararea.png").scaledToHeight(536 * screenRatio * screenRatioPR, Qt::FastTransformation);
} }
else else
{ {
@ -150,6 +151,11 @@ void PictureDialog::setupPictureDialog()
avatarLocY = 66; avatarLocY = 66;
avatarSize = 470; avatarSize = 470;
// DPI calculation (picture)
ui->labPicture->setFixedSize(960 * screenRatio, 536 * screenRatio);
ui->labPicture->setFocusPolicy(Qt::StrongFocus);
ui->labPicture->setScaledContents(true);
// Overlay area // Overlay area
renderOverlayPicture(); renderOverlayPicture();
overlayEnabled = true; overlayEnabled = true;
@ -185,8 +191,12 @@ void PictureDialog::setupPictureDialog()
installEventFilter(this); installEventFilter(this);
installEventFilter(ui->labPicture); installEventFilter(ui->labPicture);
ui->labPicture->setFixedSize(960 * screenRatio, 536 * screenRatio);
ui->labPicture->setFocusPolicy(Qt::StrongFocus); // DPI calculation
ui->hlButtons->setSpacing(6 * screenRatio);
ui->vlButtons->setSpacing(6 * screenRatio);
ui->vlButtons->setContentsMargins(0, 0, 5 * screenRatio, 5 * screenRatio);
ui->jsonLayout->setContentsMargins(4 * screenRatio, 10 * screenRatio, 4 * screenRatio, 4 * screenRatio);
// Pre-adapt window for DPI // Pre-adapt window for DPI
setFixedWidth(960 * screenRatio); setFixedWidth(960 * screenRatio);
@ -232,8 +242,8 @@ void PictureDialog::addPreviousNextButtons()
QToolBar *uiToolbar = new QToolBar("Picture Toolbar", this); QToolBar *uiToolbar = new QToolBar("Picture Toolbar", this);
uiToolbar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); uiToolbar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
uiToolbar->setObjectName("uiToolbar"); uiToolbar->setObjectName("uiToolbar");
uiToolbar->addAction(QIcon(":/img/back.png"), "", this, SLOT(previousPictureRequestedSlot())); uiToolbar->addAction(QIcon(":/img/back.svgz"), "", this, SLOT(previousPictureRequestedSlot()));
uiToolbar->addAction(QIcon(":/img/next.png"), "", this, SLOT(nextPictureRequestedSlot())); uiToolbar->addAction(QIcon(":/img/next.svgz"), "", this, SLOT(nextPictureRequestedSlot()));
layout()->setMenuBar(uiToolbar); layout()->setMenuBar(uiToolbar);
naviEnabled = true; naviEnabled = true;
@ -337,7 +347,7 @@ LRESULT PictureDialog::HitTestNCA(HWND hWnd, LPARAM lParam)
void PictureDialog::resizeEvent(QResizeEvent *event) void PictureDialog::resizeEvent(QResizeEvent *event)
{ {
Q_UNUSED(event) Q_UNUSED(event)
// int newDialogHeight = ui->labPicture->pixmap()->height(); // int newDialogHeight = (ui->labPicture->pixmap()->height() / AppEnv::screenRatioPR());
// newDialogHeight = newDialogHeight + ui->jsonFrame->height(); // newDialogHeight = newDialogHeight + ui->jsonFrame->height();
// if (naviEnabled) newDialogHeight = newDialogHeight + layout()->menuBar()->height(); // if (naviEnabled) newDialogHeight = newDialogHeight + layout()->menuBar()->height();
// int buttomBorderSize = (frameSize().height() - size().height()); // int buttomBorderSize = (frameSize().height() - size().height());
@ -358,7 +368,7 @@ void PictureDialog::resizeEvent(QResizeEvent *event)
void PictureDialog::adaptNewDialogSize(QSize newLabelSize) void PictureDialog::adaptNewDialogSize(QSize newLabelSize)
{ {
Q_UNUSED(newLabelSize) Q_UNUSED(newLabelSize)
int newDialogHeight = ui->labPicture->pixmap()->height(); int newDialogHeight = (ui->labPicture->pixmap()->height() / AppEnv::screenRatioPR());
newDialogHeight = newDialogHeight + ui->jsonFrame->height(); newDialogHeight = newDialogHeight + ui->jsonFrame->height();
if (naviEnabled) newDialogHeight = newDialogHeight + layout()->menuBar()->height(); if (naviEnabled) newDialogHeight = newDialogHeight + layout()->menuBar()->height();
setMaximumSize(width(), newDialogHeight); setMaximumSize(width(), newDialogHeight);
@ -369,14 +379,14 @@ void PictureDialog::adaptNewDialogSize(QSize newLabelSize)
updateGeometry(); updateGeometry();
} }
void PictureDialog::stylizeDialog() void PictureDialog::styliseDialog()
{ {
#ifdef GTA5SYNC_WIN #ifdef GTA5SYNC_WIN
#if QT_VERSION >= 0x050200 #if QT_VERSION >= 0x050200
if (QtWin::isCompositionEnabled()) if (QtWin::isCompositionEnabled())
{ {
QPalette palette; QPalette palette;
QtWin::extendFrameIntoClientArea(this, 0, this->layout()->menuBar()->height(), 0, 0); QtWin::extendFrameIntoClientArea(this, 0, qRound(layout()->menuBar()->height() * AppEnv::screenRatioPR()), 0, 0);
ui->jsonFrame->setStyleSheet(QString("QFrame { background: %1; }").arg(palette.window().color().name())); ui->jsonFrame->setStyleSheet(QString("QFrame { background: %1; }").arg(palette.window().color().name()));
setStyleSheet("PictureDialog { background: transparent; }"); setStyleSheet("PictureDialog { background: transparent; }");
} }
@ -399,7 +409,7 @@ bool PictureDialog::event(QEvent *event)
{ {
if (event->type() == QWinEvent::CompositionChange || event->type() == QWinEvent::ColorizationChange) if (event->type() == QWinEvent::CompositionChange || event->type() == QWinEvent::ColorizationChange)
{ {
stylizeDialog(); styliseDialog();
} }
} }
#endif #endif
@ -560,24 +570,25 @@ void PictureDialog::renderOverlayPicture()
{ {
// Generating Overlay Preview // Generating Overlay Preview
qreal screenRatio = AppEnv::screenRatio(); qreal screenRatio = AppEnv::screenRatio();
QRect preferedRect = QRect(0, 0, 200 * screenRatio, 160 * screenRatio); qreal screenRatioPR = AppEnv::screenRatioPR();
QRect preferedRect = QRect(0, 0, 200 * screenRatio * screenRatioPR, 160 * screenRatio * screenRatioPR);
QString overlayText = tr("Key 1 - Avatar Preview Mode\nKey 2 - Toggle Overlay\nArrow Keys - Navigate"); QString overlayText = tr("Key 1 - Avatar Preview Mode\nKey 2 - Toggle Overlay\nArrow Keys - Navigate");
QFont overlayPainterFont; QFont overlayPainterFont;
overlayPainterFont.setPixelSize(12 * screenRatio); overlayPainterFont.setPixelSize(12 * screenRatio * screenRatioPR);
QFontMetrics fontMetrics(overlayPainterFont); QFontMetrics fontMetrics(overlayPainterFont);
QRect overlaySpace = fontMetrics.boundingRect(preferedRect, Qt::AlignLeft | Qt::AlignTop | Qt::TextDontClip | Qt::TextWordWrap, overlayText); QRect overlaySpace = fontMetrics.boundingRect(preferedRect, Qt::AlignLeft | Qt::AlignTop | Qt::TextDontClip | Qt::TextWordWrap, overlayText);
int hOverlay = Qt::AlignTop; int hOverlay = Qt::AlignTop;
if (overlaySpace.height() < 74 * screenRatio) if (overlaySpace.height() < 74 * screenRatio * screenRatioPR)
{ {
hOverlay = Qt::AlignVCenter; hOverlay = Qt::AlignVCenter;
preferedRect.setHeight(71 * screenRatio); preferedRect.setHeight(71 * screenRatio * screenRatioPR);
overlaySpace.setHeight(80 * screenRatio); overlaySpace.setHeight(80 * screenRatio * screenRatioPR);
} }
else else
{ {
overlaySpace.setHeight(overlaySpace.height() + 6 * screenRatio); overlaySpace.setHeight(overlaySpace.height() + 6 * screenRatio * screenRatioPR);
} }
QImage overlayImage(overlaySpace.size(), QImage::Format_ARGB32_Premultiplied); QImage overlayImage(overlaySpace.size(), QImage::Format_ARGB32_Premultiplied);
@ -589,13 +600,13 @@ void PictureDialog::renderOverlayPicture()
overlayPainter.drawText(preferedRect, Qt::AlignLeft | hOverlay | Qt::TextDontClip | Qt::TextWordWrap, overlayText); overlayPainter.drawText(preferedRect, Qt::AlignLeft | hOverlay | Qt::TextDontClip | Qt::TextWordWrap, overlayText);
overlayPainter.end(); overlayPainter.end();
if (overlaySpace.width() < 194 * screenRatio) if (overlaySpace.width() < 194 * screenRatio * screenRatioPR)
{ {
overlaySpace.setWidth(200 * screenRatio); overlaySpace.setWidth(200 * screenRatio * screenRatioPR);
} }
else else
{ {
overlaySpace.setWidth(overlaySpace.width() + 6 * screenRatio); overlaySpace.setWidth(overlaySpace.width() + 6 * screenRatio * screenRatioPR);
} }
QImage overlayBorderImage(overlaySpace.width(), overlaySpace.height(), QImage::Format_ARGB6666_Premultiplied); QImage overlayBorderImage(overlaySpace.width(), overlaySpace.height(), QImage::Format_ARGB6666_Premultiplied);
@ -605,7 +616,7 @@ void PictureDialog::renderOverlayPicture()
overlayTempImage.fill(Qt::transparent); overlayTempImage.fill(Qt::transparent);
QPainter overlayTempPainter(&overlayTempImage); QPainter overlayTempPainter(&overlayTempImage);
overlayTempPainter.drawImage(0, 0, overlayBorderImage); overlayTempPainter.drawImage(0, 0, overlayBorderImage);
overlayTempPainter.drawImage(3 * screenRatio, 3 * screenRatio, overlayImage); overlayTempPainter.drawImage(3 * screenRatio * screenRatioPR, 3 * screenRatio * screenRatioPR, overlayImage);
overlayTempPainter.end(); overlayTempPainter.end();
} }
@ -678,63 +689,51 @@ void PictureDialog::setSnapmaticPicture(SnapmaticPicture *picture)
void PictureDialog::renderPicture() void PictureDialog::renderPicture()
{ {
qreal screenRatio = AppEnv::screenRatio(); qreal screenRatio = AppEnv::screenRatio();
qreal screenRatioPR = AppEnv::screenRatioPR();
if (!previewMode) if (!previewMode)
{ {
if (overlayEnabled) if (overlayEnabled)
{ {
QPixmap shownImagePixmap(960 * screenRatio, 536 * screenRatio); QPixmap shownImagePixmap(960 * screenRatio * screenRatioPR, 536 * screenRatio * screenRatioPR);
shownImagePixmap.fill(Qt::transparent); shownImagePixmap.fill(Qt::transparent);
QPainter shownImagePainter(&shownImagePixmap); QPainter shownImagePainter(&shownImagePixmap);
if (screenRatio == 1) shownImagePainter.drawImage(0, 0, snapmaticPicture.scaled(960 * screenRatio * screenRatioPR, 536 * screenRatio * screenRatioPR, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
{ shownImagePainter.drawImage(3 * screenRatio * screenRatioPR, 3 * screenRatio * screenRatioPR, overlayTempImage);
shownImagePainter.drawImage(0, 0, snapmaticPicture);
shownImagePainter.drawImage(3 * screenRatio, 3 * screenRatio, overlayTempImage);
}
else
{
shownImagePainter.drawImage(0, 0, snapmaticPicture.scaledToHeight(536 * screenRatio, Qt::SmoothTransformation));
shownImagePainter.drawImage(3 * screenRatio, 3 * screenRatio, overlayTempImage);
}
shownImagePainter.end(); shownImagePainter.end();
#if QT_VERSION >= 0x050600
shownImagePixmap.setDevicePixelRatio(screenRatioPR);
#endif
ui->labPicture->setPixmap(shownImagePixmap); ui->labPicture->setPixmap(shownImagePixmap);
} }
else else
{ {
if (screenRatio != 1) QPixmap shownImagePixmap(960 * screenRatio * screenRatioPR, 536 * screenRatio * screenRatioPR);
{ shownImagePixmap.fill(Qt::transparent);
QPixmap shownImagePixmap(960 * screenRatio, 536 * screenRatio); QPainter shownImagePainter(&shownImagePixmap);
shownImagePixmap.fill(Qt::transparent); shownImagePainter.drawImage(0, 0, snapmaticPicture.scaled(960 * screenRatio * screenRatioPR, 536 * screenRatio * screenRatioPR, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
QPainter shownImagePainter(&shownImagePixmap); shownImagePainter.end();
shownImagePainter.drawImage(0, 0, snapmaticPicture.scaledToHeight(536 * screenRatio, Qt::SmoothTransformation)); #if QT_VERSION >= 0x050600
shownImagePainter.end(); shownImagePixmap.setDevicePixelRatio(screenRatioPR);
ui->labPicture->setPixmap(shownImagePixmap); #endif
} ui->labPicture->setPixmap(shownImagePixmap);
else
{
ui->labPicture->setPixmap(QPixmap::fromImage(snapmaticPicture));
}
} }
} }
else else
{ {
// Generating Avatar Preview // Generating Avatar Preview
QPixmap avatarPixmap(960 * screenRatio, 536 * screenRatio); QPixmap avatarPixmap(960 * screenRatio * screenRatioPR, 536 * screenRatio * screenRatioPR);
QPainter snapPainter(&avatarPixmap); QPainter snapPainter(&avatarPixmap);
QFont snapPainterFont; QFont snapPainterFont;
snapPainterFont.setPixelSize(12 * screenRatio); snapPainterFont.setPixelSize(12 * screenRatio * screenRatioPR);
if (screenRatio == 1) snapPainter.drawImage(0, 0, snapmaticPicture.scaled(960 * screenRatio * screenRatioPR, 536 * screenRatio * screenRatioPR, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
{
snapPainter.drawImage(0, 0, snapmaticPicture);
}
else
{
snapPainter.drawImage(0, 0, snapmaticPicture.scaledToHeight(536 * screenRatio, Qt::SmoothTransformation));
}
snapPainter.drawImage(0, 0, avatarAreaPicture); snapPainter.drawImage(0, 0, avatarAreaPicture);
snapPainter.setPen(QColor::fromRgb(255, 255, 255, 255)); snapPainter.setPen(QColor::fromRgb(255, 255, 255, 255));
snapPainter.setFont(snapPainterFont); snapPainter.setFont(snapPainterFont);
snapPainter.drawText(QRect(3 * screenRatio, 3 * screenRatio, 140 * screenRatio, 536 * screenRatio), Qt::AlignLeft | Qt::TextWordWrap, tr("Avatar Preview Mode\nPress 1 for Default View")); snapPainter.drawText(QRect(3 * screenRatio * screenRatioPR, 3 * screenRatio * screenRatioPR, 140 * screenRatio * screenRatioPR, 536 * screenRatio * screenRatioPR), Qt::AlignLeft | Qt::TextWordWrap, tr("Avatar Preview Mode\nPress 1 for Default View"));
snapPainter.end(); snapPainter.end();
#if QT_VERSION >= 0x050600
avatarPixmap.setDevicePixelRatio(screenRatioPR);
#endif
ui->labPicture->setPixmap(avatarPixmap); ui->labPicture->setPixmap(avatarPixmap);
} }
} }
@ -762,10 +761,15 @@ void PictureDialog::playerNameUpdated()
QString PictureDialog::generateCrewString() QString PictureDialog::generateCrewString()
{ {
SnapmaticPicture *picture = smpic; // used by macro SnapmaticPicture *picture = smpic; // used by macro
QString crewIDStr = crewID; // save operation time const QString crewIDStr = crewID; // save operation time
if (crewIDStr != "0" && !crewIDStr.isEmpty()) if (crewIDStr != "0" && !crewIDStr.isEmpty())
{ {
return QString("<a href=\"https://socialclub.rockstargames.com/crew/" % QString(crewStr).replace(" ", "_") % "/" % crewIDStr % "\">" % crewStr % "</a>"); if (crewIDStr != crewStr) {
return QString("<a href=\"https://socialclub.rockstargames.com/crew/" % QString(crewStr).replace(" ", "_") % "/" % crewIDStr % "\">" % crewStr % "</a>");
}
else {
return QString(crewIDStr);
}
} }
return tr("No Crew"); return tr("No Crew");
} }
@ -777,11 +781,15 @@ QString PictureDialog::generatePlayersString()
QString plyrsStr; QString plyrsStr;
if (playersList.length() >= 1) if (playersList.length() >= 1)
{ {
for (QString player : playersList) for (const QString player : playersList)
{ {
QString playerName; const QString playerName = profileDB->getPlayerName(player);
playerName = profileDB->getPlayerName(player); if (player != playerName) {
plyrsStr += ", <a href=\"https://socialclub.rockstargames.com/member/" % playerName % "/" % player % "\">" % playerName % "</a>"; plyrsStr += ", <a href=\"https://socialclub.rockstargames.com/member/" % playerName % "/" % player % "\">" % playerName % "</a>";
}
else {
plyrsStr += ", " % player;
}
} }
plyrsStr.remove(0, 2); plyrsStr.remove(0, 2);
} }

View file

@ -56,7 +56,7 @@ public:
void setSnapmaticPicture(SnapmaticPicture *picture, int index); void setSnapmaticPicture(SnapmaticPicture *picture, int index);
void setSnapmaticPicture(SnapmaticPicture *picture); void setSnapmaticPicture(SnapmaticPicture *picture);
void addPreviousNextButtons(); void addPreviousNextButtons();
void stylizeDialog(); void styliseDialog();
bool isIndexed(); bool isIndexed();
int getIndex(); int getIndex();
~PictureDialog(); ~PictureDialog();

View file

@ -79,7 +79,9 @@ PlayerListDialog::PlayerListDialog(QStringList players, ProfileDatabase *profile
} }
else else
{ {
drawSwitchButtons(); ui->cmdMakeAv->setIcon(QIcon(":/img/back.svgz"));
ui->cmdMakeSe->setIcon(QIcon(":/img/next.svgz"));
ui->cmdMakeAd->setIcon(QIcon(":/img/add.svgz"));
} }
buildInterface(); buildInterface();
@ -101,79 +103,6 @@ PlayerListDialog::~PlayerListDialog()
delete ui; delete ui;
} }
void PlayerListDialog::drawSwitchButtons()
{
QFont painterFont = ui->cmdApply->font();
QPalette palette;
QFontMetrics fontMetrics(painterFont);
QRect makeAvRect = fontMetrics.boundingRect(QRect(0, 0, 0, 0), Qt::AlignCenter | Qt::TextDontClip, "<");
QRect makeSeRect = fontMetrics.boundingRect(QRect(0, 0, 0, 0), Qt::AlignCenter | Qt::TextDontClip, ">");
QRect makeAdRect = fontMetrics.boundingRect(QRect(0, 0, 0, 0), Qt::AlignCenter | Qt::TextDontClip, "+");
int makeAvSize;
if (makeAvRect.height() > makeAvRect.width())
{
makeAvSize = makeAvRect.height();
}
else
{
makeAvSize = makeAvRect.width();
}
int makeSeSize;
if (makeSeRect.height() > makeSeRect.width())
{
makeSeSize = makeSeRect.height();
}
else
{
makeSeSize = makeSeRect.width();
}
int makeAdSize;
if (makeAdRect.height() > makeAdRect.width())
{
makeAdSize = makeAdRect.height();
}
else
{
makeAdSize = makeAdRect.width();
}
QImage avImage(makeAvSize, makeAvSize, QImage::Format_ARGB32_Premultiplied);
avImage.fill(Qt::transparent);
QImage seImage(makeSeSize, makeSeSize, QImage::Format_ARGB32_Premultiplied);
seImage.fill(Qt::transparent);
QImage adImage(makeAdSize, makeAdSize, QImage::Format_ARGB32_Premultiplied);
adImage.fill(Qt::transparent);
QPainter avPainter(&avImage);
avPainter.setFont(painterFont);
avPainter.setBrush(palette.buttonText());
avPainter.setPen(palette.buttonText().color());
avPainter.drawText(0, 0, makeAvSize, makeAvSize, Qt::AlignCenter | Qt::TextDontClip, "<");
avPainter.end();
QPainter sePainter(&seImage);
sePainter.setFont(painterFont);
sePainter.setBrush(palette.buttonText());
sePainter.setPen(palette.buttonText().color());
sePainter.drawText(0, 0, makeSeSize, makeSeSize, Qt::AlignCenter | Qt::TextDontClip, ">");
sePainter.end();
QPainter adPainter(&adImage);
adPainter.setFont(painterFont);
adPainter.setBrush(palette.buttonText());
adPainter.setPen(palette.buttonText().color());
adPainter.drawText(0, 0, makeAdSize, makeAdSize, Qt::AlignCenter | Qt::TextDontClip, "+");
adPainter.end();
ui->cmdMakeAv->setIconSize(avImage.size());
ui->cmdMakeSe->setIconSize(seImage.size());
ui->cmdMakeAd->setIconSize(adImage.size());
ui->cmdMakeAv->setIcon(QIcon(QPixmap::fromImage(avImage)));
ui->cmdMakeSe->setIcon(QIcon(QPixmap::fromImage(seImage)));
ui->cmdMakeAd->setIcon(QIcon(QPixmap::fromImage(adImage)));
}
void PlayerListDialog::on_cmdCancel_clicked() void PlayerListDialog::on_cmdCancel_clicked()
{ {
close(); close();

View file

@ -48,7 +48,6 @@ private:
ProfileDatabase *profileDB; ProfileDatabase *profileDB;
Ui::PlayerListDialog *ui; Ui::PlayerListDialog *ui;
bool listUpdated; bool listUpdated;
void drawSwitchButtons();
void buildInterface(); void buildInterface();
signals: signals:

View file

@ -51,8 +51,8 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="cmdMakeSe"> <widget class="QPushButton" name="cmdMakeSe">
<property name="text"> <property name="focusPolicy">
<string/> <enum>Qt::NoFocus</enum>
</property> </property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
@ -61,6 +61,9 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="cmdMakeAv"> <widget class="QPushButton" name="cmdMakeAv">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
@ -71,6 +74,9 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="cmdMakeAd"> <widget class="QPushButton" name="cmdMakeAd">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>

View file

@ -1,6 +1,6 @@
/***************************************************************************** /*****************************************************************************
* gta5view Grand Theft Auto V Profile Viewer * gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping * Copyright (C) 2016-2019 Syping
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -51,7 +51,6 @@
#include <QScrollBar> #include <QScrollBar>
#include <QClipboard> #include <QClipboard>
#include <QFileInfo> #include <QFileInfo>
#include <QPalette>
#include <QPainter> #include <QPainter>
#include <QRegExp> #include <QRegExp>
#include <QAction> #include <QAction>
@ -1588,7 +1587,7 @@ void ProfileInterface::contextMenuTriggeredPIC(QContextMenuEvent *ev)
{ {
previousWidget->setStyleSheet(QLatin1String("")); previousWidget->setStyleSheet(QLatin1String(""));
} }
picWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color: rgb(%1, %2, %3)}QLabel#labPicStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue()))); picWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color:palette(highlight)}QLabel#labPicStr{color:palette(highlighted-text)}"));
previousWidget = picWidget; previousWidget = picWidget;
} }
QMenu contextMenu(picWidget); QMenu contextMenu(picWidget);
@ -1639,7 +1638,7 @@ void ProfileInterface::contextMenuTriggeredSGD(QContextMenuEvent *ev)
{ {
previousWidget->setStyleSheet(QLatin1String("")); previousWidget->setStyleSheet(QLatin1String(""));
} }
sgdWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color: rgb(%1, %2, %3)}QLabel#labSavegameStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue()))); sgdWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color:palette(highlight)}QLabel#labSavegameStr{color:palette(highlighted-text)}"));
previousWidget = sgdWidget; previousWidget = sgdWidget;
} }
QMenu contextMenu(sgdWidget); QMenu contextMenu(sgdWidget);
@ -1757,7 +1756,7 @@ bool ProfileInterface::eventFilter(QObject *watched, QEvent *event)
{ {
if (pWidget != previousWidget) if (pWidget != previousWidget)
{ {
pWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color: rgb(%1, %2, %3)}QLabel#labPicStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue()))); pWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color:palette(highlight)}QLabel#labPicStr{color:palette(highlighted-text)}"));
styleSheetChanged = true; styleSheetChanged = true;
} }
} }
@ -1765,7 +1764,7 @@ bool ProfileInterface::eventFilter(QObject *watched, QEvent *event)
{ {
if (pWidget != previousWidget) if (pWidget != previousWidget)
{ {
pWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color: rgb(%1, %2, %3)}QLabel#labSavegameStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue()))); pWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color:palette(highlight)}QLabel#labSavegameStr{color:palette(highlighted-text)}"));
styleSheetChanged = true; styleSheetChanged = true;
} }
} }
@ -1802,7 +1801,7 @@ bool ProfileInterface::eventFilter(QObject *watched, QEvent *event)
{ {
if (pWidget != previousWidget) if (pWidget != previousWidget)
{ {
pWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color: rgb(%1, %2, %3)}QLabel#labPicStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue()))); pWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color:palette(highlight)}QLabel#labPicStr{color:palette(highlighted-text)}"));
styleSheetChanged = true; styleSheetChanged = true;
} }
} }
@ -1810,7 +1809,7 @@ bool ProfileInterface::eventFilter(QObject *watched, QEvent *event)
{ {
if (pWidget != previousWidget) if (pWidget != previousWidget)
{ {
pWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color: rgb(%1, %2, %3)}QLabel#labSavegameStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue()))); pWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color:palette(highlight)}QLabel#labSavegameStr{color:palette(highlighted-text)}"));
styleSheetChanged = true; styleSheetChanged = true;
} }
} }
@ -1878,7 +1877,7 @@ void ProfileInterface::hoverProfileWidgetCheck()
{ {
if (pWidget != previousWidget) if (pWidget != previousWidget)
{ {
pWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color: rgb(%1, %2, %3)}QLabel#labPicStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue()))); pWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color:palette(highlight)}QLabel#labPicStr{color:palette(highlighted-text)}"));
styleSheetChanged = true; styleSheetChanged = true;
} }
} }
@ -1886,7 +1885,7 @@ void ProfileInterface::hoverProfileWidgetCheck()
{ {
if (pWidget != previousWidget) if (pWidget != previousWidget)
{ {
pWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color: rgb(%1, %2, %3)}QLabel#labSavegameStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue()))); pWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color:palette(highlight)}QLabel#labSavegameStr{color:palette(highlighted-text)}"));
styleSheetChanged = true; styleSheetChanged = true;
} }
} }
@ -1911,20 +1910,16 @@ void ProfileInterface::hoverProfileWidgetCheck()
void ProfileInterface::updatePalette() void ProfileInterface::updatePalette()
{ {
QPalette palette; ui->saProfile->setStyleSheet(QString("QWidget#saProfileContent{background-color:palette(base)}"));
QColor baseColor = palette.base().color();
highlightBackColor = palette.highlight().color();
highlightTextColor = palette.highlightedText().color();
ui->saProfile->setStyleSheet(QString("QWidget#saProfileContent{background-color: rgb(%1, %2, %3)}").arg(QString::number(baseColor.red()), QString::number(baseColor.green()), QString::number(baseColor.blue())));
if (previousWidget != nullptr) if (previousWidget != nullptr)
{ {
if (previousWidget->getWidgetType() == "SnapmaticWidget") if (previousWidget->getWidgetType() == "SnapmaticWidget")
{ {
previousWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color: rgb(%1, %2, %3)}QLabel#labPicStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue()))); previousWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color:palette(highlight)}QLabel#labPicStr{color:palette(highlighted-text)}"));
} }
else if (previousWidget->getWidgetType() == "SavegameWidget") else if (previousWidget->getWidgetType() == "SavegameWidget")
{ {
previousWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color: rgb(%1, %2, %3)}QLabel#labSavegameStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue()))); previousWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color:palette(highlight)}QLabel#labPicStr{color:palette(highlighted-text)}"));
} }
} }
} }

View file

@ -101,8 +101,6 @@ private:
QMap<ProfileWidget*,QString> widgets; QMap<ProfileWidget*,QString> widgets;
QSpacerItem *saSpacerItem; QSpacerItem *saSpacerItem;
QStringList fixedPictures; QStringList fixedPictures;
QColor highlightBackColor;
QColor highlightTextColor;
QString enabledPicStr; QString enabledPicStr;
QString profileFolder; QString profileFolder;
QString profileName; QString profileName;

View file

@ -58,9 +58,8 @@ SavegameWidget::SavegameWidget(QWidget *parent) :
qreal screenRatio = AppEnv::screenRatio(); qreal screenRatio = AppEnv::screenRatio();
ui->labSavegamePic->setFixedSize(48 * screenRatio, 27 * screenRatio); ui->labSavegamePic->setFixedSize(48 * screenRatio, 27 * screenRatio);
QPixmap savegamePixmap(":/img/savegame.png"); ui->labSavegamePic->setScaledContents(true);
if (screenRatio != 1) savegamePixmap = savegamePixmap.scaledToHeight(ui->labSavegamePic->height(), Qt::SmoothTransformation); ui->labSavegamePic->setPixmap(QPixmap(":/img/savegame.svgz"));
ui->labSavegamePic->setPixmap(savegamePixmap);
QString exportSavegameStr = tr("Export Savegame..."); QString exportSavegameStr = tr("Export Savegame...");
Q_UNUSED(exportSavegameStr) Q_UNUSED(exportSavegameStr)

View file

@ -1,6 +1,6 @@
/***************************************************************************** /*****************************************************************************
* gta5view Grand Theft Auto V Profile Viewer * gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping * Copyright (C) 2016-2019 Syping
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -78,9 +78,16 @@ void SnapmaticWidget::setSnapmaticPicture(SnapmaticPicture *picture)
QObject::connect(picture, SIGNAL(customSignal(QString)), this, SLOT(customSignal(QString))); QObject::connect(picture, SIGNAL(customSignal(QString)), this, SLOT(customSignal(QString)));
qreal screenRatio = AppEnv::screenRatio(); qreal screenRatio = AppEnv::screenRatio();
qreal screenRatioPR = AppEnv::screenRatioPR();
ui->labPicture->setFixedSize(48 * screenRatio, 27 * screenRatio); ui->labPicture->setFixedSize(48 * screenRatio, 27 * screenRatio);
QPixmap SnapmaticPixmap = QPixmap::fromImage(picture->getImage().scaled(ui->labPicture->width(), ui->labPicture->height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation), Qt::AutoColor); ui->labPicture->setScaledContents(true);
QPixmap SnapmaticPixmap = QPixmap::fromImage(picture->getImage().scaled(ui->labPicture->width() * screenRatioPR, ui->labPicture->height() * screenRatioPR, Qt::IgnoreAspectRatio, Qt::SmoothTransformation), Qt::AutoColor);
#if QT_VERSION >= 0x050600
SnapmaticPixmap.setDevicePixelRatio(screenRatioPR);
#endif
ui->labPicStr->setText(smpic->getPictureStr() % "\n" % smpic->getPictureTitl()); ui->labPicStr->setText(smpic->getPictureStr() % "\n" % smpic->getPictureTitl());
ui->labPicture->setPixmap(SnapmaticPixmap); ui->labPicture->setPixmap(SnapmaticPixmap);
@ -113,7 +120,7 @@ void SnapmaticWidget::on_cmdView_clicked()
{ {
QSettings settings(GTA5SYNC_APPVENDOR, GTA5SYNC_APPSTR); QSettings settings(GTA5SYNC_APPVENDOR, GTA5SYNC_APPSTR);
settings.beginGroup("Interface"); settings.beginGroup("Interface");
bool navigationBar = settings.value("NavigationBar", false).toBool(); bool navigationBar = settings.value("NavigationBar", true).toBool();
settings.endGroup(); settings.endGroup();
PictureDialog *picDialog = new PictureDialog(profileDB, crewDB, profileName, this); PictureDialog *picDialog = new PictureDialog(profileDB, crewDB, profileName, this);
@ -135,7 +142,7 @@ void SnapmaticWidget::on_cmdView_clicked()
picDialog->showMaximized(); picDialog->showMaximized();
#else #else
picDialog->show(); picDialog->show();
if (navigationBar) picDialog->stylizeDialog(); if (navigationBar) picDialog->styliseDialog();
//picDialog->adaptNewDialogSize(); //picDialog->adaptNewDialogSize();
picDialog->setMinimumSize(picDialog->size()); picDialog->setMinimumSize(picDialog->size());
picDialog->setMaximumSize(picDialog->size()); picDialog->setMaximumSize(picDialog->size());

View file

@ -1,6 +1,6 @@
/***************************************************************************** /*****************************************************************************
* gta5view Grand Theft Auto V Profile Viewer * gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping * Copyright (C) 2016-2019 Syping
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -40,11 +40,11 @@
#endif #endif
#ifndef GTA5SYNC_COPYRIGHT #ifndef GTA5SYNC_COPYRIGHT
#define GTA5SYNC_COPYRIGHT "2016-2018" #define GTA5SYNC_COPYRIGHT "2016-2019"
#endif #endif
#ifndef GTA5SYNC_APPVER #ifndef GTA5SYNC_APPVER
#define GTA5SYNC_APPVER "1.6.0" #define GTA5SYNC_APPVER "1.7.1"
#endif #endif
#if __cplusplus #if __cplusplus

View file

@ -1,6 +1,6 @@
#/***************************************************************************** #/*****************************************************************************
#* gta5view Grand Theft Auto V Profile Viewer #* gta5view Grand Theft Auto V Profile Viewer
#* Copyright (C) 2015-2018 Syping #* Copyright (C) 2015-2019 Syping
#* #*
#* This program is free software: you can redistribute it and/or modify #* This program is free software: you can redistribute it and/or modify
#* it under the terms of the GNU General Public License as published by #* it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
#* along with this program. If not, see <http://www.gnu.org/licenses/>. #* along with this program. If not, see <http://www.gnu.org/licenses/>.
#*****************************************************************************/ #*****************************************************************************/
QT += core gui network QT += core gui network svg
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 4): greaterThan(QT_MINOR_VERSION, 1): win32: QT += winextras greaterThan(QT_MAJOR_VERSION, 4): greaterThan(QT_MINOR_VERSION, 1): win32: QT += winextras
@ -137,6 +137,7 @@ TRANSLATIONS += \
res/gta5sync_en_US.ts \ res/gta5sync_en_US.ts \
res/gta5sync_es.ts \ res/gta5sync_es.ts \
res/gta5sync_fr.ts \ res/gta5sync_fr.ts \
res/gta5sync_ko.ts \
res/gta5sync_ru.ts \ res/gta5sync_ru.ts \
res/gta5sync_uk.ts \ res/gta5sync_uk.ts \
res/gta5sync_zh_TW.ts res/gta5sync_zh_TW.ts
@ -151,6 +152,7 @@ DISTFILES += res/app.rc \
res/gta5sync_en_US.ts \ res/gta5sync_en_US.ts \
res/gta5sync_es.ts \ res/gta5sync_es.ts \
res/gta5sync_fr.ts \ res/gta5sync_fr.ts \
res/gta5sync_ko.ts \
res/gta5sync_ru.ts \ res/gta5sync_ru.ts \
res/gta5sync_uk.ts \ res/gta5sync_uk.ts \
res/gta5sync_zh_TW.ts \ res/gta5sync_zh_TW.ts \
@ -230,7 +232,7 @@ contains(DEFINES, GTA5SYNC_QCONF){
!contains(DEFINES, GTA5SYNC_QCONF_IN){ !contains(DEFINES, GTA5SYNC_QCONF_IN){
RESOURCES -= res/tr_g5p.qrc RESOURCES -= res/tr_g5p.qrc
langfiles.path = $$GTA5SYNC_PREFIX/share/gta5view/translations langfiles.path = $$GTA5SYNC_PREFIX/share/gta5view/translations
langfiles.files = $$PWD/res/gta5sync_en_US.qm $$PWD/res/gta5sync_de.qm $$PWD/res/gta5sync_fr.qm $$PWD/res/gta5sync_ru.qm $$PWD/res/gta5sync_uk.qm $$PWD/res/gta5sync_zh_TW.qm $$PWD/res/qtbase_en_GB.qm $$PWD/res/qtbase_zh_TW.qm langfiles.files = $$PWD/res/gta5sync_en_US.qm $$PWD/res/gta5sync_de.qm $$PWD/res/gta5sync_fr.qm $$PWD/res/gta5sync_ko.qm $$PWD/res/gta5sync_ru.qm $$PWD/res/gta5sync_uk.qm $$PWD/res/gta5sync_zh_TW.qm $$PWD/res/qtbase_en_GB.qm $$PWD/res/qtbase_zh_TW.qm
INSTALLS += langfiles INSTALLS += langfiles
} }
} }

View file

@ -1,6 +1,6 @@
/***************************************************************************** /*****************************************************************************
* gta5view Grand Theft Auto V Profile Viewer * gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping * Copyright (C) 2016-2019 Syping
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -65,6 +65,10 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#if QT_VERSION >= 0x050600
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
#endif
QApplication a(argc, argv); QApplication a(argc, argv);
a.setApplicationName(GTA5SYNC_APPSTR); a.setApplicationName(GTA5SYNC_APPSTR);
a.setApplicationVersion(GTA5SYNC_APPVER); a.setApplicationVersion(GTA5SYNC_APPVER);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 88 KiB

BIN
res/add.svgz Normal file

Binary file not shown.

View file

@ -9,17 +9,18 @@
<file>5sync-96.png</file> <file>5sync-96.png</file>
<file>5sync-128.png</file> <file>5sync-128.png</file>
<file>5sync-256.png</file> <file>5sync-256.png</file>
<file>add.svgz</file>
<file>avatararea.png</file> <file>avatararea.png</file>
<file>avatarareaimport.png</file> <file>avatarareaimport.png</file>
<file>back.png</file> <file>back.svgz</file>
<file>empty1x16.png</file> <file>empty1x16.png</file>
<file>mappreview.jpg</file> <file>mappreview.jpg</file>
<file>next.png</file> <file>next.svgz</file>
<file>pointmaker-8.png</file> <file>pointmaker-8.png</file>
<file>pointmaker-16.png</file> <file>pointmaker-16.png</file>
<file>pointmaker-24.png</file> <file>pointmaker-24.png</file>
<file>pointmaker-32.png</file> <file>pointmaker-32.png</file>
<file>savegame.png</file> <file>savegame.svgz</file>
<file>watermark_1b.png</file> <file>watermark_1b.png</file>
<file>watermark_2b.png</file> <file>watermark_2b.png</file>
<file>watermark_2r.png</file> <file>watermark_2r.png</file>

View file

@ -7,8 +7,8 @@ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gta5view.exe.manifest"
#include <windows.h> #include <windows.h>
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1, 6, 0, 0 FILEVERSION 1, 7, 1, 0
PRODUCTVERSION 1, 6, 0, 0 PRODUCTVERSION 1, 7, 1, 0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
FILEFLAGS 0 FILEFLAGS 0
FILEOS VOS_NT_WINDOWS32 FILEOS VOS_NT_WINDOWS32
@ -25,12 +25,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Syping" VALUE "CompanyName", "Syping"
VALUE "FileDescription", "gta5view" VALUE "FileDescription", "gta5view"
VALUE "FileVersion", "1.6.0" VALUE "FileVersion", "1.7.1"
VALUE "InternalName", "gta5view" VALUE "InternalName", "gta5view"
VALUE "LegalCopyright", "Copyright © 2016-2018 Syping" VALUE "LegalCopyright", "Copyright © 2016-2019 Syping"
VALUE "OriginalFilename", "gta5view.exe" VALUE "OriginalFilename", "gta5view.exe"
VALUE "ProductName", "gta5view" VALUE "ProductName", "gta5view"
VALUE "ProductVersion", "1.6.0" VALUE "ProductVersion", "1.7.1"
END END
END END
END END

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 B

BIN
res/back.svgz Normal file

Binary file not shown.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

BIN
res/gta5sync_ko.qm Normal file

Binary file not shown.

2520
res/gta5sync_ko.ts Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

BIN
res/next.svgz Normal file

Binary file not shown.

BIN
res/qt_ko.qm Normal file

Binary file not shown.

Binary file not shown.

BIN
res/qtbase_ko.qm Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
res/savegame.svgz Normal file

Binary file not shown.

View file

@ -3,8 +3,9 @@
<file>gta5sync_en_US.qm</file> <file>gta5sync_en_US.qm</file>
<file>gta5sync_de.qm</file> <file>gta5sync_de.qm</file>
<file>gta5sync_fr.qm</file> <file>gta5sync_fr.qm</file>
<file>gta5sync_ko.qm</file>
<file>gta5sync_ru.qm</file> <file>gta5sync_ru.qm</file>
<file>gta5sync_uk.qm</file> <file>gta5sync_uk.qm</file>
<file>gta5sync_zh_TW.qm</file> <file>gta5sync_zh_TW.qm</file>
</qresource> </qresource>
</RCC> </RCC>

View file

@ -2,6 +2,7 @@
<qresource prefix="/tr"> <qresource prefix="/tr">
<file>qt_de.qm</file> <file>qt_de.qm</file>
<file>qt_fr.qm</file> <file>qt_fr.qm</file>
<file>qt_ko.qm</file>
<file>qt_ru.qm</file> <file>qt_ru.qm</file>
<file>qt_uk.qm</file> <file>qt_uk.qm</file>
<file>qt_zh_TW.qm</file> <file>qt_zh_TW.qm</file>

View file

@ -3,6 +3,7 @@
<file>qtbase_en_GB.qm</file> <file>qtbase_en_GB.qm</file>
<file>qtbase_de.qm</file> <file>qtbase_de.qm</file>
<file>qtbase_fr.qm</file> <file>qtbase_fr.qm</file>
<file>qtbase_ko.qm</file>
<file>qtbase_ru.qm</file> <file>qtbase_ru.qm</file>
<file>qtbase_uk.qm</file> <file>qtbase_uk.qm</file>
<file>qtbase_zh_TW.qm</file> <file>qtbase_zh_TW.qm</file>