Launcher improvements (#571)
* Make launcher window use dark mode Co-Authored-By: fed <58637860+fedddddd@users.noreply.github.com> * Launcher improvements * Fixed Discord link * Embedded custom font * CSS improvements * Optimization for images (file size reduction) --------- Co-authored-by: fed <58637860+fedddddd@users.noreply.github.com>
This commit is contained in:
parent
bf2d533ac5
commit
2aebc6437b
@ -3,6 +3,10 @@
|
||||
|
||||
#include <utils/nt.hpp>
|
||||
|
||||
#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE
|
||||
#define DWMWA_USE_IMMERSIVE_DARK_MODE 20
|
||||
#endif
|
||||
|
||||
std::mutex window::mutex_;
|
||||
std::vector<window*> window::windows_;
|
||||
|
||||
@ -37,6 +41,10 @@ void window::create(const std::string& title, const int width, const int height,
|
||||
this->handle_ = CreateWindowExA(NULL, this->wc_.lpszClassName, title.data(), flags, x, y, width, height, nullptr,
|
||||
nullptr, this->wc_.hInstance, this);
|
||||
|
||||
BOOL value = TRUE;
|
||||
DwmSetWindowAttribute(this->handle_,
|
||||
DWMWA_USE_IMMERSIVE_DARK_MODE, &value, sizeof(value));
|
||||
|
||||
SendMessageA(this->handle_, WM_DPICHANGED, 0, 0);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#pragma comment (lib, "dwmapi.lib")
|
||||
|
||||
#define WM_KILL_WINDOW (WM_USER+0)
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -49,6 +49,7 @@
|
||||
#include <iphlpapi.h>
|
||||
#include <wincrypt.h>
|
||||
#include <shellscalingapi.h>
|
||||
#include <dwmapi.h>
|
||||
|
||||
// min and max is required by gdi, therefore NOMINMAX won't work
|
||||
#ifdef max
|
||||
|
Loading…
Reference in New Issue
Block a user