[QScintilla] QScintilla v2.9 QsciLexerCustom margin behaviour?

Phil Thompson phil at riverbankcomputing.com
Tue Apr 14 17:48:16 BST 2015


On 07/04/2015 9:53 pm, Matic Kukovec wrote:
> On 7.4.2015 21:58, Phil Thompson wrote:
>> On 07/04/2015 8:18 pm, Matic Kukovec wrote:
>>> On 5.4.2015 13:36, Phil Thompson wrote:
>>>> On 04/04/2015 5:38 pm, Matic Kukovec wrote:
>>>>> Hi Phil,
>>>>> 
>>>>> The number margin background color turns white when applying a 
>>>>> QsciLexerCustom.
>>>>> If the document is opened with a built-in lexer or without a lexer,
>>>>> the number margin color is the default gray.
>>>>> 
>>>>> Is this the correct behaviour? This didn't happen in the previous 
>>>>> version.
>>>> 
>>>> Should be fixed in tonight's snapshot.
>>>> 
>>>> Thanks,
>>>> Phil
>>> 
>>> Tried the last two snapshots and the number margin is still white on 
>>> a
>>> QsciLexerCustom.
>>> Just to let you know.
>> 
>> The change I made fixed it for me. Make sure you are really using the 
>> updated snapshot. If so send me a short, complete application that 
>> demonstrates the problem.
>> 
>> Phil
> 
> Hey Phil,
> 
> Here is an example. You can switch lexers in lines 37/38. Line 37 has
> the white margin.
> I'm on Windows 7 64-bit using snapshot 'eb936ad1f826' with Python3.4
> 64-bit and PyQt4.11.3.
> 
> Oh, I just realized I should mention that I'm only compiling
> QScintilla, not the entire PyQt4!
> Compiled the source and just overwrote the 'qscintilla2.dll' in
> 'Python34\Lib\site-packages\PyQt4'.

You need to provide a proper reimplementation of description(), ie. one 
that only returns a non-empty string for valid styles.

Phil


More information about the QScintilla mailing list