Improved splash screen.
This commit is contained in:
parent
d5dcb9ad42
commit
b8b11e59aa
@ -555,9 +555,6 @@
|
|||||||
<ClInclude Include="etc\Prerequisites\strnatcmp\include\strnatcmp.h">
|
<ClInclude Include="etc\Prerequisites\strnatcmp\include\strnatcmp.h">
|
||||||
<Filter>Header Files\Misc\3rd Party</Filter>
|
<Filter>Header Files\Misc\3rd Party</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\Thread_CheckUpdate.h">
|
|
||||||
<Filter>Header Files\Threads</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<CustomBuild Include="gui\DropBox.ui">
|
<CustomBuild Include="gui\DropBox.ui">
|
||||||
@ -761,6 +758,7 @@
|
|||||||
<CustomBuild Include="res\Tools_Misc_C.qrc">
|
<CustomBuild Include="res\Tools_Misc_C.qrc">
|
||||||
<Filter>Resources</Filter>
|
<Filter>Resources</Filter>
|
||||||
</CustomBuild>
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="src\Thread_CheckUpdate.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="ReadMe.txt" />
|
<None Include="ReadMe.txt" />
|
||||||
|
@ -3300,22 +3300,22 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>QApplication</name>
|
<name>QApplication</name>
|
||||||
<message>
|
<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>
|
<source>Executable '%1' doesn't support Windows compatibility mode.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<source>Executable '%1' requires Qt v%2, but found Qt v%3.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<source>Executable '%1' was built for Qt '%2', but found Qt '%3'.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<source>Executable '%1' requires Windows XP or later.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -3336,7 +3336,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>SplashScreen</name>
|
<name>SplashScreen</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../gui/SplashScreen.ui" line="117"/>
|
<location filename="../../gui/SplashScreen.ui" line="105"/>
|
||||||
<source>LameXP is launching...</source>
|
<source>LameXP is launching...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -3337,22 +3337,22 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>QApplication</name>
|
<name>QApplication</name>
|
||||||
<message>
|
<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>
|
<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>
|
<translation type="unfinished">Plik wykonywalny '%1' nie działa w trybie kompatybilności z Windows.</translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<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>
|
<translation type="unfinished">Plik wykonywalny '%1' wymaga Qt v%2, znaleziono jednak Qt v%3.</translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<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>
|
<translation type="unfinished">Plik wykonywalny "%1" został skompilowany dla Qt "%2", znaleziono "%3".</translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<source>Executable '%1' requires Windows XP or later.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -3373,7 +3373,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>SplashScreen</name>
|
<name>SplashScreen</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../gui/SplashScreen.ui" line="117"/>
|
<location filename="../../gui/SplashScreen.ui" line="105"/>
|
||||||
<source>LameXP is launching...</source>
|
<source>LameXP is launching...</source>
|
||||||
<translation type="unfinished">LameXP właśnie odpala...</translation>
|
<translation type="unfinished">LameXP właśnie odpala...</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -3320,22 +3320,22 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>QApplication</name>
|
<name>QApplication</name>
|
||||||
<message>
|
<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>
|
<source>Executable '%1' doesn't support Windows compatibility mode.</source>
|
||||||
<translation>EXE-filen '%1' stöder inte Windows kompatibilitetsläge.</translation>
|
<translation>EXE-filen '%1' stöder inte Windows kompatibilitetsläge.</translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<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>
|
<translation>EXE-filen '%1' kräver Qt v%2, du har Qt v%3.</translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<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>
|
<translation>EXE-filen '%1' är byggd för Qt '%2', du har Qt '%3'.</translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<source>Executable '%1' requires Windows XP or later.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -3356,7 +3356,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>SplashScreen</name>
|
<name>SplashScreen</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../gui/SplashScreen.ui" line="117"/>
|
<location filename="../../gui/SplashScreen.ui" line="105"/>
|
||||||
<source>LameXP is launching...</source>
|
<source>LameXP is launching...</source>
|
||||||
<translation>LameXP startar...</translation>
|
<translation>LameXP startar...</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -6,22 +6,10 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>256</width>
|
<width>378</width>
|
||||||
<height>82</height>
|
<height>116</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</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">
|
<property name="palette">
|
||||||
<palette>
|
<palette>
|
||||||
<active>
|
<active>
|
||||||
@ -116,6 +104,10 @@
|
|||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>LameXP is launching...</string>
|
<string>LameXP is launching...</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="windowIcon">
|
||||||
|
<iconset resource="../res/Images.qrc">
|
||||||
|
<normaloff>:/images/Loading2.gif</normaloff>:/images/Loading2.gif</iconset>
|
||||||
|
</property>
|
||||||
<property name="autoFillBackground">
|
<property name="autoFillBackground">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -125,137 +117,58 @@
|
|||||||
<property name="lineWidth">
|
<property name="lineWidth">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QLabel" name="labelLoading">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<property name="geometry">
|
<property name="leftMargin">
|
||||||
<rect>
|
<number>24</number>
|
||||||
<x>50</x>
|
|
||||||
<y>69</y>
|
|
||||||
<width>192</width>
|
|
||||||
<height>6</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="rightMargin">
|
||||||
<size>
|
<number>32</number>
|
||||||
<width>192</width>
|
|
||||||
<height>6</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<item>
|
||||||
<size>
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<width>192</width>
|
<property name="spacing">
|
||||||
<height>6</height>
|
<number>8</number>
|
||||||
</size>
|
</property>
|
||||||
</property>
|
<item>
|
||||||
<property name="palette">
|
<widget class="QLabel" name="labelIcon">
|
||||||
<palette>
|
<property name="text">
|
||||||
<active>
|
<string/>
|
||||||
<colorrole role="Base">
|
</property>
|
||||||
<brush brushstyle="SolidPattern">
|
<property name="pixmap">
|
||||||
<color alpha="255">
|
<pixmap resource="../res/Images.qrc">:/images/Starting.png</pixmap>
|
||||||
<red>0</red>
|
</property>
|
||||||
<green>0</green>
|
</widget>
|
||||||
<blue>0</blue>
|
</item>
|
||||||
</color>
|
<item>
|
||||||
</brush>
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
</colorrole>
|
<property name="spacing">
|
||||||
<colorrole role="Window">
|
<number>4</number>
|
||||||
<brush brushstyle="SolidPattern">
|
</property>
|
||||||
<color alpha="255">
|
<item>
|
||||||
<red>0</red>
|
<widget class="QLabel" name="labelLogo">
|
||||||
<green>0</green>
|
<property name="text">
|
||||||
<blue>0</blue>
|
<string/>
|
||||||
</color>
|
</property>
|
||||||
</brush>
|
<property name="pixmap">
|
||||||
</colorrole>
|
<pixmap resource="../res/Images.qrc">:/images/Logo.png</pixmap>
|
||||||
</active>
|
</property>
|
||||||
<inactive>
|
</widget>
|
||||||
<colorrole role="Base">
|
</item>
|
||||||
<brush brushstyle="SolidPattern">
|
<item>
|
||||||
<color alpha="255">
|
<widget class="QLabel" name="labelLoading">
|
||||||
<red>0</red>
|
<property name="text">
|
||||||
<green>0</green>
|
<string/>
|
||||||
<blue>0</blue>
|
</property>
|
||||||
</color>
|
<property name="pixmap">
|
||||||
</brush>
|
<pixmap resource="../res/Images.qrc">:/images/Loading4.gif</pixmap>
|
||||||
</colorrole>
|
</property>
|
||||||
<colorrole role="Window">
|
</widget>
|
||||||
<brush brushstyle="SolidPattern">
|
</item>
|
||||||
<color alpha="255">
|
</layout>
|
||||||
<red>0</red>
|
</item>
|
||||||
<green>0</green>
|
</layout>
|
||||||
<blue>0</blue>
|
</item>
|
||||||
</color>
|
</layout>
|
||||||
</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>
|
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../res/Images.qrc"/>
|
<include location="../res/Images.qrc"/>
|
||||||
|
@ -15,14 +15,16 @@
|
|||||||
<file>images/Loading.gif</file>
|
<file>images/Loading.gif</file>
|
||||||
<file>images/Loading2.gif</file>
|
<file>images/Loading2.gif</file>
|
||||||
<file>images/Loading3.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_Contributors.png</file>
|
||||||
<file>images/Logo_GNU.png</file>
|
<file>images/Logo_GNU.png</file>
|
||||||
<file>images/Logo_Software.png</file>
|
<file>images/Logo_Software.png</file>
|
||||||
<file>images/Qt.svg</file>
|
<file>images/Qt.svg</file>
|
||||||
<file>images/Splash.png</file>
|
<file>images/Splash.png</file>
|
||||||
<file>images/Sound.png</file>
|
<file>images/Sound.png</file>
|
||||||
<file>images/Thumb.png</file>
|
<file>images/Starting.png</file>
|
||||||
|
<file>images/Thumb.png</file>
|
||||||
<file>images/Wizard.png</file>
|
<file>images/Wizard.png</file>
|
||||||
<file>images/Working.gif</file>
|
<file>images/Working.gif</file>
|
||||||
</qresource>
|
</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_HI 0
|
||||||
#define VER_LAMEXP_MINOR_LO 9
|
#define VER_LAMEXP_MINOR_LO 9
|
||||||
#define VER_LAMEXP_TYPE Alpha
|
#define VER_LAMEXP_TYPE Alpha
|
||||||
#define VER_LAMEXP_PATCH 7
|
#define VER_LAMEXP_PATCH 8
|
||||||
#define VER_LAMEXP_BUILD 1458
|
#define VER_LAMEXP_BUILD 1462
|
||||||
#define VER_LAMEXP_CONFG 1348
|
#define VER_LAMEXP_CONFG 1348
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -61,7 +61,7 @@ SplashScreen::SplashScreen(QWidget *parent)
|
|||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
//Make size fixed
|
//Make size fixed
|
||||||
setFixedSize(this->size());
|
setFixedSize(this->maximumSize());
|
||||||
|
|
||||||
//Create event loop
|
//Create event loop
|
||||||
m_loop = new QEventLoop(this);
|
m_loop = new QEventLoop(this);
|
||||||
@ -74,8 +74,12 @@ SplashScreen::SplashScreen(QWidget *parent)
|
|||||||
//Connect timer to slot
|
//Connect timer to slot
|
||||||
connect(m_timer, SIGNAL(timeout()), this, SLOT(updateHandler()));
|
connect(m_timer, SIGNAL(timeout()), this, SLOT(updateHandler()));
|
||||||
|
|
||||||
|
//Enable "sheet of glass" effect on splash screen
|
||||||
|
lamexp_sheet_of_glass(this);
|
||||||
|
|
||||||
//Start animation
|
//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);
|
labelLoading->setMovie(m_working);
|
||||||
m_working->start();
|
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);
|
void lamexp_register_tool(const QString &toolName, LockedFile *file, unsigned int version = 0, const QString *tag = NULL);
|
||||||
bool lamexp_remove_file(const QString &filename);
|
bool lamexp_remove_file(const QString &filename);
|
||||||
void lamexp_seed_rand(void);
|
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);
|
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);
|
void lamexp_sleep(const unsigned int delay);
|
||||||
const char *lamexp_support_url(void);
|
const char *lamexp_support_url(void);
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <Objbase.h>
|
#include <Objbase.h>
|
||||||
#include <PowrProf.h>
|
#include <PowrProf.h>
|
||||||
#include <Psapi.h>
|
#include <Psapi.h>
|
||||||
|
#include <dwmapi.h>
|
||||||
|
|
||||||
//Qt includes
|
//Qt includes
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
@ -1845,6 +1846,62 @@ bool lamexp_open_media_file(const QString &mediaFilePath)
|
|||||||
return false;
|
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
|
* Fatal application exit
|
||||||
*/
|
*/
|
||||||
|
@ -472,7 +472,7 @@ void InitializationThread::runBenchmark(void)
|
|||||||
|
|
||||||
void InitializationThread::delay(void)
|
void InitializationThread::delay(void)
|
||||||
{
|
{
|
||||||
__noop();
|
lamexp_sleep(333);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializationThread::initTranslations(void)
|
void InitializationThread::initTranslations(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user