Re: [code] Textadept theming: style-name for inactive-selection background?

From: Mitchell <>
Date: Tue, 6 Nov 2018 16:34:24 -0500 (EST)

Hi Phil,

On Tue, 6 Nov 2018, Phil S. wrote:

> Hi all, I checked the manual, API doc, and Quick Reference book, plus the
> built-in themes and found nothing on this 'edge case' of theming:
> When text is selected in a buffer and I enter a command-entry, the
> selection-background color turns light and I need to change that as the
> foreground does maintain the (also light) color from my theme -- so I get
> light-on-light.
> This unwanted light background color isn't in the theme, it must be something
> underlying (scintilla? gtk? Xorg?) or some Textadept hardcoded default?
> Question being, is there a style name or something for this?
> To illustrate, check the unreadable selection in screenshot #2 here, when
> focus has moved to the command-entry (with screenshot #1 being the theme's
> *usual* selection background)

It's one of the GTK theme settings. I don't remember which one. The link below has more information and probably applies also to GTK 2.0.

The "GUI Theme" section in the manual mentions you'll have to use a GTK resource file and style text fields with a particular style. My own *~/.gtkrc-2.0* file styles the text fields with a dark theme:

   style "textadept-style" {
     # The color used for the background of most widgets.
     fg[NORMAL] = "#999999"
     fg[ACTIVE] = "#999999"
     fg[PRELIGHT] = "#B3B3B3"
     fg[SELECTED] = "#B3B3B3"
     fg[INSENSITIVE] = "#666666"

     # The color used for the foreground of most widgets.
     bg[NORMAL] = "#333333"
     bg[ACTIVE] = "#1A1A1A"
     bg[PRELIGHT] = "#4D4D4D"
     bg[SELECTED] = "#4D4D4D"
     bg[INSENSITIVE] = "#1A1A1A"

     # The color used for the background of widgets displaying editable text.
     base[NORMAL] = "#1A1A1A"
     base[ACTIVE] = "#999999"
     base[SELECTED] = "#808080"
     base[PRELIGHT] = "#333333"
     base[INSENSITIVE] = "#1A1A1A"

     # The color used for foreground of widgets using base for the background
     # color.
     text[NORMAL] = "#999999"
     text[ACTIVE] = "#333333"
     text[SELECTED] = "#333333"
     text[PRELIGHT] = "#B3B3B3"
     text[INSENSITIVE] = "#666666"

   widget "textadept*" style "textadept-style"

I hope this helps.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Tue 06 Nov 2018 - 16:34:24 EST

This archive was generated by hypermail 2.2.0 : Wed 07 Nov 2018 - 06:30:41 EST