dlr-gtlab / gtlab-core

GTlab Core Framework
https://www.gtlab.de
Other
7 stars 2 forks source link

Draft: Resolve "Allow to detach MDI Tabs to make them their own standalone widget" #1201

Closed mariusalexander closed 4 months ago

mariusalexander commented 4 months ago

Description

I have looked into how we could implement the detach behavior of MDI Items. I successfully added a "detach" button, that does exactly that.

However, I could not resolve the ownership of the MDI Items and their widgets. And every solution feels hacky. I think we'll have to wait for #1199. I really would like to have this implemented, but I'll could not get this to work in the few hours I have spent and I dont want to spent anymore time on this for now. If anybody else is interested, go for it. Still, I wanted to save the little progress I have made.

Another issue I have faced is how we allow the widget to "redock" with the main area. Maybe a drag-and-drop system might work? But this might be difficult to implement. Since it's not easily possible to add a button to the window-bar we might have to implement our own window-bar like with the dock widgets. Or we might be able to intercept the "minimize/close" event (when the user minimizes/closes the window) to reattach it to the dock area.

Before undocking (notice the fancy button)

grafik

After widget was undocked it became its standalone window (how do we "redock" it?)

grafik

Closes #604

How Has This Been Tested?

Manually

Checklist: