Hello Thomas,

Yesterday, I mentioned that disabling the timer resolved the issue, meaning 
the UI dragging problem disappeared. However, the layout functionality was 
affected. I suspect the problem lies in the run_layout function.

I also tried reducing the timer delay, but the issue still persists.

Today, I further traced the code and focused on the restoreFromLayout 
function in qt_layout.py. When I removed vr3 as shown below, the UI behaved 
normally:
if *0*: # has_vr3 
           if (vr3 := self.find_widget('viewrendered3_pane')) is None:
                   import leo.plugins.viewrendered3 as vr3_mod 
                   vr3 = vr3_mod.getVr3({'c': self.c}) 
            vr3.setParent(self)

At this point, the UI issue was resolved. I did some additional testing and 
found that enabling viewrendered.py in @enabled-plugins instead of 
viewrendered3.py prevented the UI's border dragging issue in Leo.

Therefore, the root cause seems to be related to vr3. My initial guess is 
that there might be an issue with the hierarchy or parent-child 
relationship set by vr3.  I will investigate this further when I have more 
time.

Best regards
在2024年11月27日星期三 UTC+8 20:27:35<[email protected]> 写道:

> I added the timer to prevent a problem that I think was a race condition.  
> With a timer, the delay time is always going to be a guess and maybe it 
> needs to be smaller for your machine.  Still, I don't understand why an 
> extra status bar gets shown.  The layout code does not touch the status bar 
> at all.
>
> I have never seen your symptoms so it's hard for me to know how to 
> proceed.  I don't want to completely eliminate the timer but the delay 
> could be adjusted.  Would you please remind me of your OS and PyQt 
> versions? Also, if you have an unusual  graphics card I would think it 
> could be involved somehow.
>
> Also, would you try reducing the delay in steps, and see how low it has to 
> go before the symptoms disappear? I could try the same value and see if I 
> notice any problems because of it. I could try increasing it to see if I 
> get your symptoms that way.
>
> On Wednesday, November 27, 2024 at 3:26:56 AM UTC-5 [email protected] 
> wrote:
>
>>   I used a simple approach: version rollback to locate the issue. So far, 
>> I've found that removing the line
>>  QtCore.QTimer.singleShot(300, run_layout) 
>>  in qt_frame.py resolves the problem. Can you help me take a look?  
>>
>> 在2024年11月19日星期二 UTC+8 10:59:29<[email protected]> 写道:
>>
>>> What you describe makes me think that the extra status bar is not 
>>> actually part of the main Leo window.  It is all very strange!
>>>
>>> On Monday, November 18, 2024 at 7:53:29 PM UTC-5 [email protected] wrote:
>>>
>>>>   This effect is indeed from taking a photo. When using a screenshot, 
>>>> the status area disappears and turns black, like in the image below.
>>>> [image: 2024-11-19_08-51.png]  
>>>>
>>>> 在2024年11月18日星期一 UTC+8 21:04:07<[email protected]> 写道:
>>>>
>>>>> I don't know.  I haven't noticed any problem while dragging or 
>>>>> resizing.  But there have been one or two times when I've come back to an 
>>>>> open Leo window and had some feature missing, like the main menu bar. I 
>>>>> can't reproduce the behavior as yet. I don't see how the layout system 
>>>>> per 
>>>>> se could be causing an issue like this, but maybe all the UI elements 
>>>>> need 
>>>>> something like a size policy or minimum size set.  That would be a pain 
>>>>> and 
>>>>> *shouldn't* be necessary. I've seen online that some people seem to have 
>>>>> various Qt problems when they don't.
>>>>>
>>>>> The layout system never touches the status bar.  Someone could write a 
>>>>> new layout to move it but no standard layout does so.
>>>>>
>>>>> I'm fascinated by the moire pattern in your image. Please tell me you 
>>>>> didn't print out the screen shot, flatten it onto a table, and take a 
>>>>> picture of it. Yet I don't see another way you could have gotten the 
>>>>> visible pattern.
>>>>>
>>>>> On Monday, November 18, 2024 at 3:29:01 AM UTC-5 [email protected] 
>>>>> wrote:
>>>>>
>>>>>>  When I resize the window by dragging the border, the following issue 
>>>>>> occasionally occurs: the tab area disappears, and the status bar appears 
>>>>>> multiple times. It also happens while dragging.  Ver: 6.8.2
>>>>>> [image: 3.jpg]  
>>>>>
>>>>>

-- 
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 view this discussion visit 
https://groups.google.com/d/msgid/leo-editor/615768d3-1c35-4863-9e14-a27b97e81086n%40googlegroups.com.

Reply via email to