Improved splash screen.
This commit is contained in:
parent
d5dcb9ad42
commit
b8b11e59aa
@ -555,9 +555,6 @@
|
||||
<ClInclude Include="etc\Prerequisites\strnatcmp\include\strnatcmp.h">
|
||||
<Filter>Header Files\Misc\3rd Party</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Thread_CheckUpdate.h">
|
||||
<Filter>Header Files\Threads</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="gui\DropBox.ui">
|
||||
@ -761,6 +758,7 @@
|
||||
<CustomBuild Include="res\Tools_Misc_C.qrc">
|
||||
<Filter>Resources</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="src\Thread_CheckUpdate.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReadMe.txt" />
|
||||
|
@ -3300,22 +3300,22 @@
|
||||
<context>
|
||||
<name>QApplication</name>
|
||||
<message>
|
||||
<location filename="../../src/Global_Win32.cpp" line="1010"/>
|
||||
<location filename="../../src/Global_Win32.cpp" line="1011"/>
|
||||
<source>Executable '%1' doesn't support Windows compatibility mode.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global_Win32.cpp" line="952"/>
|
||||
<location filename="../../src/Global_Win32.cpp" line="953"/>
|
||||
<source>Executable '%1' requires Qt v%2, but found Qt v%3.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global_Win32.cpp" line="957"/>
|
||||
<location filename="../../src/Global_Win32.cpp" line="958"/>
|
||||
<source>Executable '%1' was built for Qt '%2', but found Qt '%3'.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global_Win32.cpp" line="969"/>
|
||||
<location filename="../../src/Global_Win32.cpp" line="970"/>
|
||||
<source>Executable '%1' requires Windows XP or later.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -3336,7 +3336,7 @@
|
||||
<context>
|
||||
<name>SplashScreen</name>
|
||||
<message>
|
||||
<location filename="../../gui/SplashScreen.ui" line="117"/>
|
||||
<location filename="../../gui/SplashScreen.ui" line="105"/>
|
||||
<source>LameXP is launching...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -3337,22 +3337,22 @@
|
||||
<context>
|
||||
<name>QApplication</name>
|
||||
<message>
|
||||
<location filename="../../src/Global_Win32.cpp" line="1010"/>
|
||||
<location filename="../../src/Global_Win32.cpp" line="1011"/>
|
||||
<source>Executable '%1' doesn't support Windows compatibility mode.</source>
|
||||
<translation type="unfinished">Plik wykonywalny '%1' nie działa w trybie kompatybilności z Windows.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global_Win32.cpp" line="952"/>
|
||||
<location filename="../../src/Global_Win32.cpp" line="953"/>
|
||||
<source>Executable '%1' requires Qt v%2, but found Qt v%3.</source>
|
||||
<translation type="unfinished">Plik wykonywalny '%1' wymaga Qt v%2, znaleziono jednak Qt v%3.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global_Win32.cpp" line="957"/>
|
||||
<location filename="../../src/Global_Win32.cpp" line="958"/>
|
||||
<source>Executable '%1' was built for Qt '%2', but found Qt '%3'.</source>
|
||||
<translation type="unfinished">Plik wykonywalny "%1" został skompilowany dla Qt "%2", znaleziono "%3".</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global_Win32.cpp" line="969"/>
|
||||
<location filename="../../src/Global_Win32.cpp" line="970"/>
|
||||
<source>Executable '%1' requires Windows XP or later.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -3373,7 +3373,7 @@
|
||||
<context>
|
||||
<name>SplashScreen</name>
|
||||
<message>
|
||||
<location filename="../../gui/SplashScreen.ui" line="117"/>
|
||||
<location filename="../../gui/SplashScreen.ui" line="105"/>
|
||||
<source>LameXP is launching...</source>
|
||||
<translation type="unfinished">LameXP właśnie odpala...</translation>
|
||||
</message>
|
||||
|
@ -3320,22 +3320,22 @@
|
||||
<context>
|
||||
<name>QApplication</name>
|
||||
<message>
|
||||
<location filename="../../src/Global_Win32.cpp" line="1010"/>
|
||||
<location filename="../../src/Global_Win32.cpp" line="1011"/>
|
||||
<source>Executable '%1' doesn't support Windows compatibility mode.</source>
|
||||
<translation>EXE-filen '%1' stöder inte Windows kompatibilitetsläge.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global_Win32.cpp" line="952"/>
|
||||
<location filename="../../src/Global_Win32.cpp" line="953"/>
|
||||
<source>Executable '%1' requires Qt v%2, but found Qt v%3.</source>
|
||||
<translation>EXE-filen '%1' kräver Qt v%2, du har Qt v%3.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global_Win32.cpp" line="957"/>
|
||||
<location filename="../../src/Global_Win32.cpp" line="958"/>
|
||||
<source>Executable '%1' was built for Qt '%2', but found Qt '%3'.</source>
|
||||
<translation>EXE-filen '%1' är byggd för Qt '%2', du har Qt '%3'.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global_Win32.cpp" line="969"/>
|
||||
<location filename="../../src/Global_Win32.cpp" line="970"/>
|
||||
<source>Executable '%1' requires Windows XP or later.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -3356,7 +3356,7 @@
|
||||
<context>
|
||||
<name>SplashScreen</name>
|
||||
<message>
|
||||
<location filename="../../gui/SplashScreen.ui" line="117"/>
|
||||
<location filename="../../gui/SplashScreen.ui" line="105"/>
|
||||
<source>LameXP is launching...</source>
|
||||
<translation>LameXP startar...</translation>
|
||||
</message>
|
||||
|
@ -6,22 +6,10 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>256</width>
|
||||
<height>82</height>
|
||||
<width>378</width>
|
||||
<height>116</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>256</width>
|
||||
<height>82</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>256</width>
|
||||
<height>82</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
@ -116,6 +104,10 @@
|
||||
<property name="windowTitle">
|
||||
<string>LameXP is launching...</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../res/Images.qrc">
|
||||
<normaloff>:/images/Loading2.gif</normaloff>:/images/Loading2.gif</iconset>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -125,137 +117,58 @@
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QLabel" name="labelLoading">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>69</y>
|
||||
<width>192</width>
|
||||
<height>6</height>
|
||||
</rect>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>24</number>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>192</width>
|
||||
<height>6</height>
|
||||
</size>
|
||||
<property name="rightMargin">
|
||||
<number>32</number>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>192</width>
|
||||
<height>6</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../res/Images.qrc">:/images/Loading.gif</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="labelLogo">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1</x>
|
||||
<y>1</y>
|
||||
<width>256</width>
|
||||
<height>82</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>256</width>
|
||||
<height>82</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>256</width>
|
||||
<height>82</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../res/Images.qrc">:/images/Logo.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<zorder>labelLogo</zorder>
|
||||
<zorder>labelLoading</zorder>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelIcon">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../res/Images.qrc">:/images/Starting.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelLogo">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../res/Images.qrc">:/images/Logo.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelLoading">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../res/Images.qrc">:/images/Loading4.gif</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../res/Images.qrc"/>
|
||||
|
@ -15,14 +15,16 @@
|
||||
<file>images/Loading.gif</file>
|
||||
<file>images/Loading2.gif</file>
|
||||
<file>images/Loading3.gif</file>
|
||||
<file>images/Logo.png</file>
|
||||
<file>images/Loading4.gif</file>
|
||||
<file>images/Logo.png</file>
|
||||
<file>images/Logo_Contributors.png</file>
|
||||
<file>images/Logo_GNU.png</file>
|
||||
<file>images/Logo_Software.png</file>
|
||||
<file>images/Qt.svg</file>
|
||||
<file>images/Splash.png</file>
|
||||
<file>images/Sound.png</file>
|
||||
<file>images/Thumb.png</file>
|
||||
<file>images/Sound.png</file>
|
||||
<file>images/Starting.png</file>
|
||||
<file>images/Thumb.png</file>
|
||||
<file>images/Wizard.png</file>
|
||||
<file>images/Working.gif</file>
|
||||
</qresource>
|
||||
|
BIN
res/images/Loading4.gif
Normal file
BIN
res/images/Loading4.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 7.7 KiB |
@ -34,8 +34,8 @@
|
||||
#define VER_LAMEXP_MINOR_HI 0
|
||||
#define VER_LAMEXP_MINOR_LO 9
|
||||
#define VER_LAMEXP_TYPE Alpha
|
||||
#define VER_LAMEXP_PATCH 7
|
||||
#define VER_LAMEXP_BUILD 1458
|
||||
#define VER_LAMEXP_PATCH 8
|
||||
#define VER_LAMEXP_BUILD 1462
|
||||
#define VER_LAMEXP_CONFG 1348
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -61,7 +61,7 @@ SplashScreen::SplashScreen(QWidget *parent)
|
||||
setupUi(this);
|
||||
|
||||
//Make size fixed
|
||||
setFixedSize(this->size());
|
||||
setFixedSize(this->maximumSize());
|
||||
|
||||
//Create event loop
|
||||
m_loop = new QEventLoop(this);
|
||||
@ -74,8 +74,12 @@ SplashScreen::SplashScreen(QWidget *parent)
|
||||
//Connect timer to slot
|
||||
connect(m_timer, SIGNAL(timeout()), this, SLOT(updateHandler()));
|
||||
|
||||
//Enable "sheet of glass" effect on splash screen
|
||||
lamexp_sheet_of_glass(this);
|
||||
|
||||
//Start animation
|
||||
m_working = new QMovie(":/images/Loading.gif");
|
||||
m_working = new QMovie(":/images/Loading4.gif");
|
||||
m_working->setCacheMode(QMovie::CacheAll);
|
||||
labelLoading->setMovie(m_working);
|
||||
m_working->start();
|
||||
|
||||
|
@ -194,6 +194,7 @@ QString lamexp_rand_str(const bool bLong = false);
|
||||
void lamexp_register_tool(const QString &toolName, LockedFile *file, unsigned int version = 0, const QString *tag = NULL);
|
||||
bool lamexp_remove_file(const QString &filename);
|
||||
void lamexp_seed_rand(void);
|
||||
bool lamexp_sheet_of_glass(QWidget *window);
|
||||
bool lamexp_shutdown_computer(const QString &message, const unsigned long timeout = 30, const bool forceShutdown = true, const bool hibernate = false);
|
||||
void lamexp_sleep(const unsigned int delay);
|
||||
const char *lamexp_support_url(void);
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <Objbase.h>
|
||||
#include <PowrProf.h>
|
||||
#include <Psapi.h>
|
||||
#include <dwmapi.h>
|
||||
|
||||
//Qt includes
|
||||
#include <QApplication>
|
||||
@ -1845,6 +1846,62 @@ bool lamexp_open_media_file(const QString &mediaFilePath)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool lamexp_sheet_of_glass(QWidget *window)
|
||||
{
|
||||
typedef HRESULT (__stdcall *dwmExtendFrameIntoClientArea_t)(HWND hWnd, const MARGINS* pMarInset);
|
||||
typedef HRESULT (__stdcall *dwmEnableBlurBehindWindow_t)(HWND hWnd, const DWM_BLURBEHIND* pBlurBehind);
|
||||
|
||||
//Does OS support DWM?
|
||||
if(lamexp_get_os_version() < lamexp_winver_vista)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//Load DWMAPI.DLL
|
||||
QLibrary libDwm("dwmapi.dll");
|
||||
if(!libDwm.load())
|
||||
{
|
||||
qWarning("Failed to load DWMAPI.DLL on a DWM-enabled system!");
|
||||
return false;
|
||||
}
|
||||
|
||||
//Lookup required functions
|
||||
dwmExtendFrameIntoClientArea_t dwmExtendFrameIntoClientArea = (dwmExtendFrameIntoClientArea_t) libDwm.resolve("DwmExtendFrameIntoClientArea");
|
||||
dwmEnableBlurBehindWindow_t dwmEnableBlurBehindWindow = (dwmEnableBlurBehindWindow_t) libDwm.resolve("DwmEnableBlurBehindWindow");
|
||||
|
||||
//Check function pointers
|
||||
if((dwmExtendFrameIntoClientArea == NULL) || (dwmEnableBlurBehindWindow == NULL))
|
||||
{
|
||||
qWarning("Required functions are missing from DWMAPI.DLL on a DWM-enabled system!");
|
||||
return false;
|
||||
}
|
||||
|
||||
//Enable the "sheet of glass" effect on this window
|
||||
MARGINS margins = {-1, -1, -1, -1};
|
||||
if(HRESULT hr = dwmExtendFrameIntoClientArea(window->winId(), &margins))
|
||||
{
|
||||
qWarning("DwmExtendFrameIntoClientArea function has failed! (error %d)", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
//Create and populate the Blur Behind structure
|
||||
DWM_BLURBEHIND bb;
|
||||
memset(&bb, 0, sizeof(DWM_BLURBEHIND));
|
||||
bb.fEnable = TRUE;
|
||||
bb.dwFlags = DWM_BB_ENABLE;
|
||||
if(HRESULT hr = dwmEnableBlurBehindWindow(window->winId(), &bb))
|
||||
{
|
||||
qWarning("DwmEnableBlurBehindWindow function has failed! (error %d)", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
//Required for Qt
|
||||
window->setAttribute(Qt::WA_TranslucentBackground);
|
||||
window->setAttribute(Qt::WA_NoSystemBackground);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fatal application exit
|
||||
*/
|
||||
|
@ -472,7 +472,7 @@ void InitializationThread::runBenchmark(void)
|
||||
|
||||
void InitializationThread::delay(void)
|
||||
{
|
||||
__noop();
|
||||
lamexp_sleep(333);
|
||||
}
|
||||
|
||||
void InitializationThread::initTranslations(void)
|
||||
|
Loading…
Reference in New Issue
Block a user