Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

widget.ImageSegment can't be aligned. #3505

Closed
2 tasks done
alexballas opened this issue Dec 26, 2022 · 1 comment
Closed
2 tasks done

widget.ImageSegment can't be aligned. #3505

alexballas opened this issue Dec 26, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@alexballas
Copy link
Contributor

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

When using the new widget.ImageSegment functionality, I can't seem to be able to define the alignment for it or control its position. When I resize the window text seems to align fine as per my code example, but image stays on the same position.

How to reproduce

check description, code examples and screenshot

Screenshots

Screenshot from 2022-12-27 01-09-16

Example code

package main

import (
	fyne "fyne.io/fyne/v2"
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/widget"
)

var currentmfolder string

func main() {

	myApp := app.New()
	myWindow := myApp.NewWindow("Test Dialog")
	richhead := widget.NewRichTextFromMarkdown(`
![Go2TV](go2tv-icon-small.png)

Cast your media files to UPnP/DLNA Media Renderers and Smart TVs

---
`)
	for i := range richhead.Segments {
		if seg, ok := richhead.Segments[i].(*widget.TextSegment); ok {
			seg.Style.Alignment = fyne.TextAlignCenter
		}

	}
	myWindow.SetContent(richhead)
	myWindow.ShowAndRun()
}

Fyne version

v2.3.0

Go compiler version

1.19.4

Operating system

Linux

Operating system version

Ubuntu 18.04

Additional Information

No response

@alexballas alexballas added the unverified A bug that has been reported but not verified label Dec 26, 2022
@andydotxyz andydotxyz added enhancement New feature or request and removed unverified A bug that has been reported but not verified labels Dec 31, 2022
@andydotxyz andydotxyz added this to the Dalwhinnie (early 2023) milestone Dec 31, 2022
andydotxyz added a commit to andydotxyz/fyne that referenced this issue Jul 24, 2023
@andydotxyz
Copy link
Member

Resolved (on develop) for v2.4.0 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants