I sort of checked this out, enough to think that it might be overkill for 
my plugin. For one under no circumstances would I expect my plugin to be 
put into a pane, it's window is too small for that. 

So beyond that I was searching through some of Leo's source and I saw a 
pattern that seemed like it might fit the bill:

self.sheet = c.config.getData('qt-gui-plugin-style-sheet')

if self.sheet:

    self.sheet = '\n'.join(self.sheet)

    self.setStyleSheet(self.sheet)

However... when inspecting the stylesheet I see that the @ colors are still 
there, nothing has been substituted. What am I doing wrong?

On Tuesday, August 25, 2015 at 3:49:35 PM UTC-4, john lunzer wrote:
>
> Sounds like a plan, I'll check it out soon, thanks for the link to the 
> demo widget.
>
> On Tuesday, August 25, 2015 at 1:18:30 PM UTC-4, Terry Brown wrote:
>>
>> On Tue, 25 Aug 2015 10:14:17 -0700 (PDT) 
>> john lunzer <[email protected]> wrote: 
>>
>> > I'm at the point where I'm trying to convert my quick-replace 
>> > @command to a plugin and I looked around in the current plugins but I 
>> > couldn't find an example of how I apply Leo's main stylesheet to 
>> > floating QtWidgets. I'm trying to match Leo's look and feel. Any 
>> > guidance would be greatly appreciated. 
>>
>> I'd aim for free_layout integration. 
>>
>> https://github.com/leo-editor/snippets/blob/master/examples/demo_widget.py 
>>
>> then your widget can be mixed into the pane layout in the main window 
>> or opened in its own window (which supports panes and other widgets 
>> too).  I think this will handle the stylesheet thing as well. 
>>
>> Cheers -Terry 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to