From 6ee3153f9c876776c72512ce27cbe59134c64cab Mon Sep 17 00:00:00 2001 From: Santiago Date: Sun, 6 Aug 2023 20:57:29 +0200 Subject: [PATCH] Change dark theme flag to light theme flag, so default is dark --- docs/window.dox | 4 ++-- include/GLFW/glfw3.h | 4 ++-- src/internal.h | 2 +- src/win32_window.c | 2 +- src/window.c | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/window.dox b/docs/window.dox index cbb02734..ff1cd225 100644 --- a/docs/window.dox +++ b/docs/window.dox @@ -249,8 +249,8 @@ This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size. -@anchor GLFW_DARK_THEME -__GLFW_DARK_THEME__ specifies whether the window should use dark theme or not. +@anchor GLFW_LIGHT_THEME +__GLFW_LIGHT_THEME__ specifies whether the window should use light theme or not. Possible values are `GLFW_TRUE` and `GLFW_FALSE`. This hint only has effect on windows operating system. diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index 1d76eef4..39bc17f4 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -1099,10 +1099,10 @@ extern "C" { /*! @brief macOS specific * [window hint](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint). */ -#define GLFW_DARK_THEME 0x0002200D +#define GLFW_LIGHT_THEME 0x0002200D /*! @brief windows specific * - * Allows specifying whether dark theme should be used. + * Allows specifying whether light theme should be used. */ #define GLFW_COCOA_RETINA_FRAMEBUFFER 0x00023001 /*! @brief macOS specific diff --git a/src/internal.h b/src/internal.h index 3cd8ca03..98c889a3 100644 --- a/src/internal.h +++ b/src/internal.h @@ -408,7 +408,7 @@ struct _GLFWwndconfig GLFWbool focusOnShow; GLFWbool mousePassthrough; GLFWbool scaleToMonitor; - GLFWbool darkTheme; + GLFWbool lightTheme; struct { GLFWbool retina; char frameName[256]; diff --git a/src/win32_window.c b/src/win32_window.c index d093d269..f6a8b0b7 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -1344,7 +1344,7 @@ static int createNativeWindow(_GLFWwindow* window, _glfw.win32.instance, (LPVOID) wndconfig); - _glfwSetWindowTheme(wndconfig->darkTheme, window->win32.handle); + _glfwSetWindowTheme(!(wndconfig->lightTheme), window->win32.handle); _glfw_free(wideTitle); if (!window->win32.handle) diff --git a/src/window.c b/src/window.c index edb05803..c601bee0 100644 --- a/src/window.c +++ b/src/window.c @@ -388,8 +388,8 @@ GLFWAPI void glfwWindowHint(int hint, int value) case GLFW_SCALE_TO_MONITOR: _glfw.hints.window.scaleToMonitor = value ? GLFW_TRUE : GLFW_FALSE; return; - case GLFW_DARK_THEME: - _glfw.hints.window.darkTheme = value ? GLFW_TRUE : GLFW_FALSE; + case GLFW_LIGHT_THEME: + _glfw.hints.window.lightTheme = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_CENTER_CURSOR: _glfw.hints.window.centerCursor = value ? GLFW_TRUE : GLFW_FALSE;