Comments (5)
I don't think this is the fault of a layout. The "canvas.Text" is a draw primitive - it has no awareness of standard widget sizes etc. using a "Label" in this place would align perfectly.
The layout is correctly asking the item to fill that space and the text responds by putting it at the top left.
This sort of misalignment can happen if you mix canvas primitives and widgets - they serve different purposes.
from fyne.
I think the special case code in first column was because a form expects the left will normally be text... so it is simulating a theme label for you. Maybe that is the bug?
from fyne.
I did not see the possibility to use text in the formlayout as a bug.
Bug or not, I liked the possibility to use text instead of labels because it can give you a very condensed layout that way without the spacing between labels.
If you offer the use of text in the first column I rather thought it would be consistent if you could use text in the second column as well.
from fyne.
I did not see the possibility to use text in the formlayout as a bug.
Yes, but the thing that causes the bug is our special handling of text on the left, not adding more special handling on the right? If you are using it for condensed usage but we add the code in you suggest then won't it behave exactly like a label and the condensed usage will be taken away?
from fyne.
Yes, but the thing that causes the bug is our special handling of text on the left, not adding more special handling on the right?
Yes, correct
If you are using it for condensed usage but we add the code in you suggest then won't it behave exactly like a label and the condensed usage will be taken away?
I think the effect of condensed text (rows) is still there as you can see on the first three rows in the screenshot attached.
An example of mixed labels and text in the "altered"/fixed formLayout (textformlayout.go).
form := container.New(l.NewTextFormLayout(),
canvas.NewText("text 1", colornames.Yellow), canvas.NewText("text 4", colornames.Yellow),
canvas.NewText("text 2", colornames.Yellow), canvas.NewText("text 5", colornames.Yellow),
canvas.NewText("text 3", colornames.Yellow), canvas.NewText("text 6", colornames.Yellow),
widget.NewLabel("label 1"), canvas.NewText("text 7", colornames.Green),
widget.NewLabel("label 2"), canvas.NewText("text 8", colornames.Green),
widget.NewLabel("label 3"), canvas.NewText("text 9", colornames.Green),
canvas.NewText("text 10", colornames.Orange), widget.NewLabel("label 4"),
canvas.NewText("text 11", colornames.Orange), widget.NewLabel("label 5"),
canvas.NewText("text 12", colornames.Orange), widget.NewLabel("label 6"),
widget.NewLabel("label 7"), widget.NewLabel("label 10"),
widget.NewLabel("label 8"), widget.NewLabel("label 11"),
widget.NewLabel("label 9"), widget.NewLabel("label 12"),
)
window.SetContent(form)
from fyne.
Related Issues (20)
- cmd/fyne: command ”get” is broken with Go 1.22 HOT 14
- How does fyne obtain the device model or serial number of an Android device? HOT 1
- Please add a way to embed the `FyneApp.toml` metadata into the `go build`. HOT 2
- Add default file name extension support to file dialogs HOT 1
- Collections widgets should scroll with Home/End/Page Up/Page Down when focused HOT 10
- Input control highlighting bug for scale = small / large HOT 3
- Race condition during system tray menu refresh
- Can I package fyne app with some static resource? HOT 1
- Android folder in folder doesn't work
- Paste multiline text into a multilineEntry sometimes ignores newlines HOT 6
- fyne release -os android does not seem to zip align the apk properly HOT 4
- Panic on window resize on macOS. HOT 4
- Fyne Program got SIGSEGV signal on changing windows or closing windows, on MacOS with M2 HOT 4
- Building with fyne release does not set Metadata().Release to true HOT 11
- SVGs are drawn weird with `NewThemedResource()` HOT 1
- Label and Slider not aligned in a FormItem HOT 1
- Access icons by names that describe the icon image HOT 5
- NewListWithData too many iterations
- Checkboxes in bound list exhibits odd behavior HOT 9
- RichText leaks memory when replacing segments HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fyne.