Skip to content

Fix for text selection color #3

@zcream

Description

@zcream

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions