On Wed, 15 Apr 2026 23:20:00 GMT, Alexander Zuev <[email protected]> wrote:
> Make caret color closer to the background color so it does appear as disabled > caret. > > Here is the comparison of default caret and the caret after the fix is > applied: > Default white background: <img width="126" height="36" alt="white_editable" > src="https://github.com/user-attachments/assets/35620f59-8ed6-40f4-8b52-00757acf3efc" > /> > After fix white background: <img width="124" height="38" > alt="white_noneditable" > src="https://github.com/user-attachments/assets/10a5bd08-ebc2-42e5-99e1-4a048a323666" > /> > Default red background: <img width="140" height="52" alt="red_editable" > src="https://github.com/user-attachments/assets/f0c327a4-aee3-4802-98ed-915e314be36c" > /> > After fix with red background: <img width="130" height="36" > alt="red_noneditable" > src="https://github.com/user-attachments/assets/c3baaf41-6a67-4be2-98c0-d1e260fc53ae" > /> > > > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). Marked as reviewed by aivanov (Reviewer). src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java line 702: > 700: int green = (caretColor.getGreen() + bg.getGreen()) > / 2; > 701: int blue = (caretColor.getBlue() + bg.getBlue()) / 2; > 702: int alpha = 127; Would it be enough to change the alpha component of the caret only? ------------- PR Review: https://git.openjdk.org/jdk/pull/30758#pullrequestreview-4147817065 PR Review Comment: https://git.openjdk.org/jdk/pull/30758#discussion_r3117579053
