Add an option to set selected text color

This commit is contained in:
Pavel Strakhov 2024-04-01 00:08:06 +01:00 committed by Jeremy Soller
parent 3c94352f3f
commit 10ae9a9b16
4 changed files with 22 additions and 2 deletions

View file

@ -138,6 +138,7 @@ fn main() {
let font_color = Color::rgb(0xFF, 0xFF, 0xFF);
let cursor_color = Color::rgb(0xFF, 0xFF, 0xFF);
let selection_color = Color::rgba(0xFF, 0xFF, 0xFF, 0x33);
let selected_text_color = Color::rgb(0xA0, 0xA0, 0xFF);
event_loop
.run(|event, elwt| {
@ -193,6 +194,7 @@ fn main() {
font_color,
cursor_color,
selection_color,
selected_text_color,
|x, y, w, h, color| {
// Note: due to softbuffer and tiny_skia having incompatible internal color representations we swap
// the red and blue channels here