diff --git a/data/glow.manifest b/data/glow.manifest index 376ec498..5d35f493 100644 --- a/data/glow.manifest +++ b/data/glow.manifest @@ -18,6 +18,9 @@ + + true/pm + PerMonitorV2 true diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index a55038ae..3534e68f 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable( Glow_ExampleWin32 WIN32 -) + ) target_sources( Glow_ExampleWin32 PRIVATE "win32.cxx" "${PROJECT_SOURCE_DIR}/data/glow.manifest" -) + ) target_link_libraries( Glow_ExampleWin32 PRIVATE glow::glow glow::flags -) + ) add_executable(Glow_ExampleConsole) @@ -21,47 +21,47 @@ target_sources( Glow_ExampleConsole PRIVATE "console.cxx" "${PROJECT_SOURCE_DIR}/data/glow.manifest" -) + ) target_link_libraries( Glow_ExampleConsole PRIVATE glow::glow glow::flags -) + ) add_executable( Glow_ExampleWindow WIN32 -) + ) target_sources( Glow_ExampleWindow PRIVATE "window/window.cxx" "${PROJECT_SOURCE_DIR}/data/glow.manifest" -) + ) target_link_libraries( Glow_ExampleWindow PRIVATE glow::glow glow::flags -) + ) add_executable( Glow_ExampleErrors WIN32 -) + ) target_sources( Glow_ExampleErrors PRIVATE "errors/errors.cxx" "${PROJECT_SOURCE_DIR}/data/glow.manifest" -) + ) target_link_libraries( Glow_ExampleErrors PRIVATE glow::glow glow::flags -) + ) add_custom_command( TARGET Glow_ExampleWin32 @@ -69,7 +69,7 @@ add_custom_command( ${CMAKE_COMMAND} -E copy "${webview2_SOURCE_DIR}/runtimes/win-x64/native/WebView2Loader.dll" "${CMAKE_CURRENT_BINARY_DIR}$<$:/Debug>$<$:/Release>" COMMENT "Copying WebView2Loader.dll..." -) + ) add_custom_command( TARGET Glow_ExampleWin32 @@ -78,4 +78,4 @@ add_custom_command( "${webview2_SOURCE_DIR}/runtimes/win-x64/native_uap/Microsoft.Web.WebView2.Core.dll" "${CMAKE_CURRENT_BINARY_DIR}$<$:/Debug>$<$:/Release>" COMMENT "Copying Microsoft.Web.WebView2.Core.dll..." -) + ) diff --git a/examples/console.cxx b/examples/console.cxx index 23ff332a..42a88118 100644 --- a/examples/console.cxx +++ b/examples/console.cxx @@ -10,4 +10,7 @@ #include #include -auto main(int argc, char* argv[]) -> int { std::println("Glow"); } +auto main(int argc, char* argv[]) -> int +{ + std::println("Glow"); +} diff --git a/examples/window/window.cxx b/examples/window/window.cxx index b724f13b..be69559e 100644 --- a/examples/window/window.cxx +++ b/examples/window/window.cxx @@ -20,8 +20,10 @@ auto Window::WndProc(::UINT uMsg, ::WPARAM wParam, ::LPARAM lParam) -> ::LRESULT { switch (uMsg) { - case WM_DESTROY: return on_destroy(wParam, lParam); - case WM_WINDOWPOSCHANGED: return on_window_pos_changed(wParam, lParam); + case WM_DESTROY: + return on_destroy(wParam, lParam); + case WM_WINDOWPOSCHANGED: + return on_window_pos_changed(wParam, lParam); } return ::DefWindowProcA(m_hwnd.get(), uMsg, wParam, lParam); diff --git a/src/colors.cxx b/src/colors.cxx index 252a1b63..ea8ebad5 100644 --- a/src/colors.cxx +++ b/src/colors.cxx @@ -11,7 +11,10 @@ namespace glow { -Colors::Colors() : settings{winrt::Windows::UI::ViewManagement::UISettings()} { update(); } +Colors::Colors() : settings{winrt::Windows::UI::ViewManagement::UISettings()} +{ + update(); +} auto Colors::update() -> void { @@ -77,7 +80,10 @@ auto Colors::to_colorref(winrt::Windows::UI::Color uiColor) -> ::COLORREF std::ranges::clamp(static_cast(uiColor.B), 0, 255)); } -auto Colors::clamp(int value) -> int { return std::ranges::clamp(value, 0, 255); } +auto Colors::clamp(int value) -> int +{ + return std::ranges::clamp(value, 0, 255); +} auto Colors::rgb_to_colorref(int r, int g, int b) -> ::COLORREF {