Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for text selection color #3

Open
zcream opened this issue Oct 2, 2021 · 0 comments
Open

Fix for text selection color #3

zcream opened this issue Oct 2, 2021 · 0 comments

Comments

@zcream
Copy link

zcream commented Oct 2, 2021

The text selection color was previously hardcoded, and the default blue caused contrast issues with dark theme.
You can just have

	priv->self->color(c);
static pointer _editor_set_background_color(scheme *s, pointer args) {
	ASSERT(s->ext_data != NULL);
	Fl_Highlight_Editor_P *priv = (Fl_Highlight_Editor_P*)(s->ext_data);
	pointer arg = s->vptr->pair_car(args);

	SCHEME_RET_IF_FAIL(s, arg != s->NIL, "This function expects argument.");

	int c;
	if(s->vptr->is_integer(arg))
		c = s->vptr->ivalue(arg);
	else if(s->vptr->is_string(arg))
		c = named_to_fltk_color(s->vptr->string_value(arg), FL_BLACK);
	else {
		SCHEME_RET_IF_FAIL(s, false, "This function expects number or string argument.");
		return s->F;
	}

    /* Anmol - comment out default color */
	//priv->self->color(c, FL_SELECTION_COLOR);
	return s->T;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant