From 6007838bb248d33ee8f4fa4ea98962a3c4a74810 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Wed, 20 Dec 2023 01:36:11 +0100 Subject: [PATCH] UI: Set Initial Background Color Darker With the popularity of dark themes, and the fact that our default theme is dark, make the initial background color (before the program fully loads) a darker shade of grey. {0.25f, 0.25f, 0.25f} versus current {0.55f, 0.55f, 0.55f}. Also set Windows class background brush to the same color to remove a potential flash. Pull Request: https://projects.blender.org/blender/blender/pulls/115968 --- intern/ghost/intern/GHOST_SystemWin32.cc | 2 +- source/blender/windowmanager/intern/wm_window.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/intern/ghost/intern/GHOST_SystemWin32.cc b/intern/ghost/intern/GHOST_SystemWin32.cc index a38e25719a7..90ec4577370 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cc +++ b/intern/ghost/intern/GHOST_SystemWin32.cc @@ -603,7 +603,7 @@ GHOST_TSuccess GHOST_SystemWin32::init() #ifdef INW32_COMPISITING (HBRUSH)CreateSolidBrush #endif - (0x00000000); + (HBRUSH) GetStockObject(DKGRAY_BRUSH); wc.lpszMenuName = 0; wc.lpszClassName = L"GHOST_WindowClass"; diff --git a/source/blender/windowmanager/intern/wm_window.cc b/source/blender/windowmanager/intern/wm_window.cc index b0e641a9a89..551f1d41547 100644 --- a/source/blender/windowmanager/intern/wm_window.cc +++ b/source/blender/windowmanager/intern/wm_window.cc @@ -784,7 +784,7 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, } #endif /* until screens get drawn, make it nice gray */ - GPU_clear_color(0.55f, 0.55f, 0.55f, 1.0f); + GPU_clear_color(0.25f, 0.25f, 0.25f, 1.0f); /* needed here, because it's used before it reads userdef */ WM_window_set_dpi(win); @@ -792,7 +792,7 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, wm_window_swap_buffers(win); /* Clear double buffer to avoids flickering of new windows on certain drivers. (See #97600) */ - GPU_clear_color(0.55f, 0.55f, 0.55f, 1.0f); + GPU_clear_color(0.25f, 0.25f, 0.25f, 1.0f); GPU_render_end(); }