Add stub functions in KIPLATFORM to detect dark mode

These haven't been written yet, but current code can
be adapted to use these now.
This commit is contained in:
Ian McInerney 2020-09-20 00:32:23 +01:00
parent f82ad61c90
commit c5feccca53
4 changed files with 31 additions and 0 deletions

View File

@ -23,6 +23,14 @@
#include <wx/nonownedwnd.h>
#include <wx/window.h>
bool KIPLATFORM::UI::IsDarkTheme()
{
// TODO(ISM): Write this function
return false;
}
void KIPLATFORM::UI::ForceFocus( wxWindow* aWindow )
{
aWindow->SetFocus();

View File

@ -28,6 +28,13 @@ namespace KIPLATFORM
{
namespace UI
{
/**
* Determine if the desktop interface is currently using a dark theme or a light theme.
*
* @return true if a dark theme is being used.
*/
bool IsDarkTheme();
/**
* Pass the current focus to the window. On OSX this will forcefully give the focus to
* the desired window, while on MSW and GTK it will simply call the wxWidgets SetFocus()

View File

@ -23,6 +23,14 @@
#include <wx/nonownedwnd.h>
#include <wx/window.h>
bool KIPLATFORM::UI::IsDarkTheme()
{
// TODO(ISM): Write this function
return false;
}
void KIPLATFORM::UI::ForceFocus( wxWindow* aWindow )
{
aWindow->SetFocus();

View File

@ -26,6 +26,14 @@
#include <wx/toplevel.h>
#include <wx/button.h>
bool KIPLATFORM::UI::IsDarkTheme()
{
// TODO(ISM): Write this function
return false;
}
void KIPLATFORM::UI::ForceFocus( wxWindow* aWindow )
{
// On OSX we need to forcefully give the focus to the window