Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Resizing Window Changes Widget Size #1319

@DapperMongoose

Description

@DapperMongoose

Describe the bug

On Linux when resizing the window the size of all widgets gets changed.

How to reproduce

Launch the program and resize with drag handles

CogentResizeBug.mp4

Example code

package main

import (
	"cogentcore.org/core/core"
	"cogentcore.org/core/events"
	"fmt"
)

func main() {
	b := core.NewBody()
	core.NewText(b).SetText("Minimal Reproduction")
	textField := core.NewTextField(b)
	textField.StartFocus()

	btn := core.NewButton(b).SetText("Submit")

	btn.OnClick(func(e events.Event) {
		core.MessageSnackbar(b, fmt.Sprintf("button click, text content: %v", textField.Text()))
		textField.SetText("")
	})

	//btn.SetKey(keymap.Enter)
	//btn.SetShortcut(keymap.Enter.Chord())
	btn.SetShortcut("Command+S")

	b.RunMainWindow()
}

Relevant output

See screen recording

Platform

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctlyconfirmedThis bug has been confirmed

    Type

    No type

    Projects

    Status

    In progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions