core icon indicating copy to clipboard operation
core copied to clipboard

Add dock widget support

Open kkoreilly opened this issue 8 months ago • 6 comments

Describe the feature

This would be somewhat similar to the already existing splits, except instead of having a gradient handle for how much space each component should get, there would be discrete buttons that toggle each component between being displayed or not.

In fact, it may make sense to add dock functionality as an option on splits, since you may want to use both at the same time; they are not mutually exclusive. I put an example of how this could look below, although we would probably need more than just a bool option, depending on where you want to place the dock and how many different modalities you want it to have; in #742, one of the example dock widgets appears to support going between hidden, small, and full size.

I can probably work on this soon, although it would be helpful to have some more feedback about dock positioning and modalities for intended use cases.

Relevant code

sp := core.NewSplits(parent).SetDock(true)
core.NewText(sp).SetText("First")
core.NewText(sp).SetText("Second")

kkoreilly avatar Jun 27 '24 12:06 kkoreilly