summaryrefslogtreecommitdiff
path: root/src/gui/windowmanager.cpp
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-04-07 21:14:51 +0200
committerFedja Beader <fedja@protonmail.ch>2024-04-09 19:06:29 +0000
commitb5ff7aa3a5adf5e03ea1e1190b720158fc4a97a8 (patch)
treed7783e8d9daf31e02960f266eeb1b0a61f842fe9 /src/gui/windowmanager.cpp
parentcbab9d6d4c3a38ece9bd97ac866b28c4d83ecc1a (diff)
downloadplus-b5ff7aa3a5adf5e03ea1e1190b720158fc4a97a8.tar.gz
plus-b5ff7aa3a5adf5e03ea1e1190b720158fc4a97a8.tar.bz2
plus-b5ff7aa3a5adf5e03ea1e1190b720158fc4a97a8.tar.xz
plus-b5ff7aa3a5adf5e03ea1e1190b720158fc4a97a8.zip
Fix all alignment warnings/errors.
Other addButton sections intentionally left misaligned as a test for future fix in nsiqcppstyle. .. why does it not complain about every such block?
Diffstat (limited to 'src/gui/windowmanager.cpp')
-rw-r--r--src/gui/windowmanager.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp
index 79e6cb47c..346013639 100644
--- a/src/gui/windowmanager.cpp
+++ b/src/gui/windowmanager.cpp
@@ -434,6 +434,7 @@ void WindowManager::setIcon()
SDL::getWindowWMInfo(mainGraphics->getWindow(), &pInfo);
else
SDL::getWindowWMInfo(nullptr, &pInfo);
+
// Attempt to load icon from .ico file
HICON icon = static_cast<HICON>(LoadImage(nullptr,
iconFile.c_str(),
@@ -446,6 +447,7 @@ void WindowManager::setIcon()
logger->log("icon load error");
icon = LoadIcon(GetModuleHandle(nullptr), "A");
}
+
if (icon)
{
#ifdef WIN64
@@ -454,16 +456,16 @@ void WindowManager::setIcon()
#else
SetClassLongPtr(pInfo.window,
#endif // USE_SDL2
- GCLP_HICON,
- reinterpret_cast<LONG_PTR>(icon));
+ GCLP_HICON,
+ reinterpret_cast<LONG_PTR>(icon));
#else // WIN64
#ifdef USE_SDL2
SetClassLong(pInfo.info.win.window,
#else
SetClassLong(pInfo.window,
#endif // USE_SDL2
- GCL_HICON,
- reinterpret_cast<LONG>(icon));
+ GCL_HICON,
+ reinterpret_cast<LONG>(icon));
#endif // WIN64
}
#else // WIN32