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

From: Mitchell <m.att.foicica.com>
Date: Tue, 6 Nov 2018 19:04:45 -0500 (EST)

Hi Gabriel,

On Tue, 6 Nov 2018, Gabriel Dubatti wrote:

> Hi Phil and Mitchel,
>
> El 6/11/18 a las 19:16, Phil S. escribió:
>> Hi Mitchell,
>>
>> thanks that got me hopeful as I do have my own gtkrc file already on my
>> system, so I tried it:
>>
>> https://imgur.com/a/hGYBFHd
>>
>> As shown, I added the whole "textadept-style" rule you gave, using 5 'debug
>> colors' (red, green, blue, yellow, magenta) for the 5 possible states for
>> all 4 style targets (fb, bg, base, text), alas.. this *does* take effect
>> except NOT for the "out-of-focus text selection" bgcolor, to wit notice
>> that light-gray bgcolor for the selection in the top-left..
>>
>>
>> Most curious indeed =) AFAIK there are more known gtkrc states than those 5
>> either, IIRC.. ponderous!
>>
>>
>>
>> On 11/6/18 10:34 PM, Mitchell wrote:
>>> 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)
>>>>
>>>> https://imgur.com/a/zZ051j3
>>>
>>> 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.
>>>
>>>    https://www.gtk.org/tutorial1.2/gtk_tut-21.html#ss21.2
>>>
>>> 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.
>>>
>>> Cheers,
>>> Mitchell
>
> I noticed that in a multiple selection, only the last selection changes the
> background color when the focus goes to a buffer in another view that also
> has a selection (or when something is selected there).
>
> Could it be a feature in Scintilla? or a bug?

I don't know the answer to this :(

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 06 Nov 2018 - 19:04:45 EST

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