Make Linux/Mac cursors black again

This makes cursor color conditional on the system default.  Some themes
in Linux and all Macs are black cursor on white background.
This commit is contained in:
Seth Hillbrand 2021-01-05 09:42:03 -08:00
parent 52cc5e2df1
commit 68240821d4
4 changed files with 96 additions and 4 deletions

View File

@ -0,0 +1,39 @@
/* XPM */
static const char * cursor_place_black_xpm[] = {
"32 32 4 1",
" c None",
". c #FFFFFF",
"+ c #000000",
"@ c #008000",
". ",
".. ",
".+. ",
".++. ",
".+++. ",
".++++. ",
".+++++. ",
".++++++. ",
".+++++++. ",
".++++++++. ",
".+++++++++. ",
".++++++..... ",
".++++++. ",
".++..++. ",
".+. .+++. ",
".. .++. ",
". .+++. ",
" .+. ",
" .. .. ",
" .@@. ",
" .@@. ",
" ...@@... ",
" .@@@@@@@@. ",
" .@@@@@@@@. ",
" ...@@... ",
" .@@. ",
" .@@. ",
" .. ",
" ",
" ",
" ",
" "};

View File

@ -0,0 +1,38 @@
/* XPM */
static const char * cursor_select_m_black_xpm[] = {
"32 32 3 1",
" c None",
". c #FFFFFF",
"+ c #000000",
". ",
".. ",
".+. ",
".++. ",
".+++. ",
".++++. ",
".+++++. ",
".++++++. ",
".+++++++. ",
".++++++++. ",
".+++++++++. ",
".++++++..... ",
".++++++. ",
".++..++. ",
".+. .+++. ",
".. .++. ",
". .+++. . ",
" .+. .+. ",
" .. .+++. ",
" .+++++. ",
" . ..+.. . ",
" .+. .+. .+. ",
" .++...+...++. ",
" .+++++++++++++. ",
" .++...+...++. ",
" .+. .+. .+. ",
" . ..+.. . ",
" .+++++. ",
" .+++. ",
" .+. ",
" . ",
" "};

View File

@ -37,9 +37,7 @@
#include <cursors/cursor-line-wire-add.xpm>
#include <cursors/cursor-measure.xpm>
#include <cursors/cursor-pencil.xpm>
#include <cursors/cursor-place.xpm>
#include <cursors/cursor-select-lasso.xpm>
#include <cursors/cursor-select-m.xpm>
#include <cursors/cursor-select-window.xpm>
#include <cursors/cursor-subtract.xpm>
#include <cursors/cursor-text.xpm>
@ -47,6 +45,15 @@
#include <cursors/cursor-zoom.xpm>
#include <cursors/cursor-zoom-out.xpm>
// Under MSW, the standard cursor is white on black. Elsewhere it is black on white
#ifdef __WINDOWS__
#include <cursors/cursor-place.xpm>
#include <cursors/cursor-select-m.xpm>
#else
#include <cursors/cursor-place-black.xpm>
#include <cursors/cursor-select-m-black.xpm>
#endif
#include <wx/bitmap.h>
#include <wx/debug.h>
@ -129,7 +136,11 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
KICURSOR::MOVING,
nullptr,
nullptr,
#ifdef __WINDOWS__
cursor_select_m_xpm,
#else
cursor_select_m_black_xpm,
#endif
{ 32, 32 },
{ 1, 1 },
},
@ -281,7 +292,11 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
KICURSOR::PLACE,
nullptr,
nullptr,
#ifdef __WINDOWS__
cursor_place_xpm,
#else
cursor_place_black_xpm,
#endif
{ 32, 32 },
{ 1, 1 },
},