Skip to content

Commit

Permalink
Make dialog behave better when canvases have styles applied.
Browse files Browse the repository at this point in the history
This change sets up the overlays so that the style from the upper canvas
is always used. This prevents bold characters from the lower canvas from
"bleeding through" to the final result.
  • Loading branch information
gcla committed Jul 3, 2022
1 parent b938897 commit 06abc4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion widgets/dialog/dialog.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,9 @@ type IOpenExt interface {
func OpenExt(w IOpenExt, container gowid.ISettableComposite, width gowid.IWidgetDimension, height gowid.IWidgetDimension, app gowid.IApp) {
ov := overlay.New(w, container.SubWidget(),
gowid.VAlignMiddle{}, height, // Intended to mean use as much vertical space as you need
gowid.HAlignMiddle{}, width)
gowid.HAlignMiddle{}, width, overlay.Options{
IgnoreLowerStyle: true,
})

if _, ok := width.(gowid.IRenderFixed); ok {
w.SetContentWidth(gowid.RenderFixed{}, app) // fixed or weight:1, ratio:0.5
Expand Down

0 comments on commit 06abc4f

Please sign in to comment.