Comments (6)
I'm not sure I agree that the only solution is a messy one... Can't you just get the minimum before turning on wrapping and cache that value?
from fyne.
What about when you need to update the text while it's already displayed (and update the positioning of an icon you want to position immediately to the right of the text string)?
BTW here is a case internally where it would be useful - https://github.com/fyne-io/fyne/blob/develop/dialog/text.go#L38
from fyne.
This could also supersede #4648
from fyne.
What I'm not really getting is why it's not just a right aligned icon with text filling the available space
from fyne.
As far as I can tell you can't achieve the desired positioning:
- If you put the label and icon in an HBox, the text will always be forced to its minSize of "..." (using TruncateEllipsis)
- If you put the label and icon in a border with label as center, and icon as right, then the icon will float all the way to the right with the available space, rather than immediately to the right of the end of the label's text
- Writing a custom layout, you still need to know how much space the text takes up if the full thing can be displayed in the label (which is different from label MinSize which is only big enough for "...")
from fyne.
Related Issues (20)
- Support Software Rendering for X11 by allowing to disable GLX HOT 13
- Issue with SetSystemTrayIcon when using jpg format
- Licence has self conflicting wording, possible typo HOT 3
- What means MinSize() of Entry? HOT 5
- Is there a separate window.Run function HOT 2
- Production app running a test app when importing Appearance Screen HOT 4
- SetIcon don't work HOT 1
- App freezes when rapidly modifying content of container HOT 5
- fyne package does not work with main package not in the current directory HOT 2
- Android packaging fails: could not determine kind of name for C.ALooper_pollAll HOT 6
- binding.Untyped crashes when set to nil HOT 1
- AppTab does not display blue indicator line if you create it empty and then Append items to it later. HOT 1
- Automatically remove focus from a widget that is no longer in the object tree HOT 6
- Internal support for custom colored fyne.Resource theming. HOT 10
- widget not have Date Picker HOT 2
- blured scaled zoom gui HOT 1
- Form layout allocates a new 2d slice on each MinSize and Layout call HOT 6
- App Crash on IOS Simulator HOT 6
- Add SizeName property to Hyperlink widget HOT 1
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.