=> 232da2f992013ea80976f55a2f45f55202917478
[1mdiff --git a/src/ui/color.c b/src/ui/color.c[m [1mindex 05ec1f6f..656de6f0 100644[m [1m--- a/src/ui/color.c[m [1m+++ b/src/ui/color.c[m [36m@@ -85,6 +85,7 @@[m [mvoid setThemePalette_Color(enum iColorTheme theme) {[m const int accentLo = (prefs->accent == cyan_ColorAccent ? teal_ColorId : brown_ColorId);[m const int altAccentHi = (prefs->accent == cyan_ColorAccent ? orange_ColorId : cyan_ColorId);[m const int altAccentLo = (prefs->accent == cyan_ColorAccent ? brown_ColorId : teal_ColorId);[m [32m+[m[32m const iColor altAccentMid = mix_Color(get_Color(altAccentHi), get_Color(altAccentLo), 0.5f);[m switch (theme) {[m case pureBlack_ColorTheme: {[m copy_(uiBackground_ColorId, black_ColorId);[m [36m@@ -123,7 +124,7 @@[m [mvoid setThemePalette_Color(enum iColorTheme theme) {[m copy_(uiInputTextFocused_ColorId, white_ColorId);[m copy_(uiInputFrame_ColorId, gray25_ColorId);[m copy_(uiInputFrameHover_ColorId, accentHi);[m [31m- copy_(uiInputFrameFocused_ColorId, altAccentHi);[m [32m+[m[32m set_Color(uiInputFrameFocused_ColorId, altAccentMid);[m copy_(uiInputCursor_ColorId, altAccentHi);[m copy_(uiInputCursorText_ColorId, black_ColorId);[m copy_(uiHeading_ColorId, accentHi);[m [36m@@ -171,10 +172,12 @@[m [mvoid setThemePalette_Color(enum iColorTheme theme) {[m mix_Color(get_Color(black_ColorId), get_Color(gray25_ColorId), 0.7f));[m copy_(uiInputBackgroundFocused_ColorId, black_ColorId);[m copy_(uiInputText_ColorId, gray75_ColorId);[m [31m- copy_(uiInputTextFocused_ColorId, white_ColorId);[m [32m+[m[32m //copy_(uiInputTextFocused_ColorId, white_ColorId);[m [32m+[m[32m set_Color(uiInputTextFocused_ColorId, mix_Color(get_Color(white_ColorId),[m [32m+[m[32m get_Color(altAccentHi), 0.15f));[m copy_(uiInputFrame_ColorId, uiInputBackground_ColorId);[m copy_(uiInputFrameHover_ColorId, accentHi);[m [31m- copy_(uiInputFrameFocused_ColorId, altAccentHi);[m [32m+[m[32m set_Color(uiInputFrameFocused_ColorId, altAccentMid);[m copy_(uiInputCursor_ColorId, altAccentHi);[m copy_(uiInputCursorText_ColorId, black_ColorId);[m copy_(uiHeading_ColorId, accentHi);[m [1mdiff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c[m [1mindex 8ed52022..bd6927a6 100644[m [1m--- a/src/ui/inputwidget.c[m [1m+++ b/src/ui/inputwidget.c[m [36m@@ -39,7 +39,7 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m # include "macos.h"[m #endif[m [m [31m-static const int refreshInterval_InputWidget_ = 256;[m [32m+[m[32mstatic const int refreshInterval_InputWidget_ = 512;[m static const size_t maxUndo_InputWidget_ = 64;[m static const int unlimitedWidth_InputWidget_ = 1000000; /* TODO: WrapText disables some functionality if maxWidth==0 */[m [m [36m@@ -216,6 +216,7 @@[m [mstruct Impl_InputWidget {[m iArray undoStack;[m int font;[m iClick click;[m [32m+[m[32m int wheelAccum;[m int cursorVis;[m uint32_t timer;[m iTextBuf * buffered; /* pre-rendered static text */[m [36m@@ -600,6 +601,7 @@[m [mvoid init_InputWidget(iInputWidget *d, size_t maxLen) {[m splitToLines_(&iStringLiteral(""), &d->lines);[m setFlags_Widget(w, fixedHeight_WidgetFlag, iTrue); /* resizes its own height */[m init_Click(&d->click, d, SDL_BUTTON_LEFT);[m [32m+[m[32m d->wheelAccum = 0;[m d->timer = 0;[m d->cursorVis = 0;[m d->buffered = NULL;[m [36m@@ -1467,6 +1469,31 @@[m [mstatic iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {[m ? SDL_SYSTEM_CURSOR_IBEAM[m : SDL_SYSTEM_CURSOR_ARROW);[m }[m [32m+[m[32m if (ev->type == SDL_MOUSEWHEEL && contains_Widget(w, coord_MouseWheelEvent(&ev->wheel))) {[m [32m+[m[32m const int lineHeight = lineHeight_Text(d->font);[m [32m+[m[32m if (isPerPixel_MouseWheelEvent(&ev->wheel)) {[m [32m+[m[32m d->wheelAccum -= ev->wheel.y;[m [32m+[m[32m }[m [32m+[m[32m else {[m [32m+[m[32m d->wheelAccum -= ev->wheel.y * 3 * lineHeight;[m [32m+[m[32m }[m [32m+[m[32m int lineDelta = d->wheelAccum / lineHeight;[m [32m+[m[32m if (lineDelta < 0) {[m [32m+[m[32m lineDelta = iMax(lineDelta, -d->visWrapLines.start);[m [32m+[m[32m if (!lineDelta) d->wheelAccum = 0;[m [32m+[m[32m }[m [32m+[m[32m else if (lineDelta > 0) {[m [32m+[m[32m lineDelta = iMin(lineDelta,[m [32m+[m[32m lastLine_InputWidget_(d)->wrapLines.end - d->visWrapLines.end);[m [32m+[m[32m if (!lineDelta) d->wheelAccum = 0;[m[41m [m [32m+[m[32m }[m [32m+[m[32m d->wheelAccum -= lineDelta * lineHeight;[m [32m+[m[32m d->visWrapLines.start += lineDelta;[m [32m+[m[32m d->visWrapLines.end += lineDelta;[m [32m+[m[32m d->inFlags |= needUpdateBuffer_InputWidgetFlag;[m [32m+[m[32m refresh_Widget(d);[m [32m+[m[32m return iTrue;[m [32m+[m[32m }[m switch (processEvent_Click(&d->click, ev)) {[m case none_ClickResult:[m break;[m [36m@@ -1497,6 +1524,7 @@[m [mstatic iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {[m selectAll_InputWidget(d);[m }[m }[m [32m+[m[32m refresh_Widget(d);[m return iTrue;[m }[m case aborted_ClickResult:[m [36m@@ -1889,12 +1917,11 @@[m [mstatic void draw_InputWidget_(const iInputWidget *d) {[m wrapText.wrapFunc = NULL;[m wrapText.context = NULL;[m }[m [31m- unsetClip_Paint(&p);[m /* Draw the insertion point. */[m [31m- if (isFocused && d->cursorVis) {[m [31m- iInt2 curSize;[m [31m- iRangecc cursorChar = iNullRange;[m [31m- int visWrapsAbove = 0;[m [32m+[m[32m if (isFocused && d->cursorVis && contains_Range(&visLines, d->cursor.y)) {[m [32m+[m[32m iInt2 curSize;[m [32m+[m[32m iRangecc cursorChar = iNullRange;[m [32m+[m[32m int visWrapsAbove = 0;[m for (int i = d->cursor.y - 1; i >= visLines.start; i--) {[m const iInputLine *line = constAt_Array(&d->lines, i);[m visWrapsAbove += numWrapLines_InputLine_(line);[m [36m@@ -1938,6 +1965,7 @@[m [mstatic void draw_InputWidget_(const iInputWidget *d) {[m cursorChar);[m }[m }[m [32m+[m[32m unsetClip_Paint(&p);[m drawChildren_Widget(w);[m }[m [m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).