diff --git a/apps/samples/list.cpp b/apps/samples/list.cpp index deeefd9..4924d67 100644 --- a/apps/samples/list.cpp +++ b/apps/samples/list.cpp @@ -8,7 +8,6 @@ const EsListViewEnumString colorStrings[] = { // We are using enum strings for the favorite color. // "\a ... ]" is a bit of rich text markup. // "#" sets the color to the hex code. - #define COLOR_RED (0) { "\a#e00]Red", -1 }, #define COLOR_GREEN (1) diff --git a/desktop/gui.cpp b/desktop/gui.cpp index da60c47..68c853d 100644 --- a/desktop/gui.cpp +++ b/desktop/gui.cpp @@ -7237,8 +7237,8 @@ bool UISetCursor(EsWindow *window) { CURSOR(case ES_CURSOR_MOVE_DRAG, 197, 13, 10, 10, 24, 24); CURSOR(case ES_CURSOR_ROTATE_HOVER, 228, 49, 9, 10, 24, 32); CURSOR(case ES_CURSOR_ROTATE_DRAG, 198, 49, 9, 10, 22, 22); - CURSOR(case ES_CURSOR_BLANK, 5, 13, 0, 0, 1, 1); - CURSOR(default, 23, 18, 1, 1, 15, 24); + CURSOR(case ES_CURSOR_BLANK, 0, 0, 0, 0, 1, 1); + CURSOR(default, 24, 19, 0, 0, 11, 20); } bool shadow = cursorStyle != ES_CURSOR_TEXT && api.global->showCursorShadow; diff --git a/kernel/graphics.cpp b/kernel/graphics.cpp index 14b42a8..5891e1a 100644 --- a/kernel/graphics.cpp +++ b/kernel/graphics.cpp @@ -6,6 +6,10 @@ #define CURSOR_SHADOW_OFFSET_X (0) #define CURSOR_SHADOW_OFFSET_Y (1) +#define CURSOR_PADDING_T (2) +#define CURSOR_PADDING_B (4) +#define CURSOR_PADDING_L (3) +#define CURSOR_PADDING_R (3) struct Surface : EsPaintTarget { bool Resize(size_t newResX, size_t newResY, uint32_t clearColor = 0, bool copyOldBits = false); @@ -483,7 +487,7 @@ void Surface::Draw(Surface *source, EsRectangle destinationRegion, int sourceX, } void Surface::CreateCursorShadow(Surface *temporary) { - const uint32_t kernel[] = { 14, 43, 82, 43, 14 }; + const uint32_t kernel[] = { 14, 43, 82, 39, 11 }; uint32_t *bits1 = (uint32_t *) bits; uint32_t *bits2 = (uint32_t *) temporary->bits; diff --git a/kernel/syscall.cpp b/kernel/syscall.cpp index e55b2f1..6f912e1 100644 --- a/kernel/syscall.cpp +++ b/kernel/syscall.cpp @@ -911,13 +911,14 @@ SYSCALL_IMPLEMENT(ES_SYSCALL_WINDOW_SET_CURSOR) { windowManager.cursorImageOffsetY = (int8_t) ((argument2 >> 8) & 0xFF); windowManager.cursorShadow = argument3 & (1 << 30); - int width = imageWidth + CURSOR_SHADOW_OFFSET_X; - int height = imageHeight + CURSOR_SHADOW_OFFSET_Y; + int width = imageWidth + CURSOR_PADDING_L + CURSOR_PADDING_R; + int height = imageHeight + CURSOR_PADDING_T + CURSOR_PADDING_B; if (windowManager.cursorSurface.Resize(width, height) && windowManager.cursorSwap.Resize(width, height) && windowManager.cursorTemporary.Resize(width, height)) { - windowManager.cursorSurface.SetBits((K_USER_BUFFER const void *) argument1, argument3 & 0xFFFFFF, ES_RECT_2S(imageWidth, imageHeight)); + windowManager.cursorSurface.SetBits((K_USER_BUFFER const void *) argument1, argument3 & 0xFFFFFF, + ES_RECT_4PD(CURSOR_PADDING_L, CURSOR_PADDING_T, imageWidth, imageHeight)); if (windowManager.cursorShadow) { windowManager.cursorSurface.CreateCursorShadow(&windowManager.cursorTemporary); diff --git a/res/Cursors.png b/res/Cursors.png index ee4dccd..da9be83 100644 Binary files a/res/Cursors.png and b/res/Cursors.png differ