You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Many areas take in something like impl Into<Vec2>, but this only allows setting a hard (logical) pixel size, which is limited because it can't work based on the viewable area, percentage, etc...
Describe the solution you'd like
It would be most convenient if the arguments that took a size took an enum instead, perhaps with a few useful heads like:
enumSize{LogicalPixel(float,float),// Logical pixels...DevicePixel(float,float),// Device pixels...ScreenPercentage(float,float),// 0.0 to 1.0 for the size of the overall screen dimensionsParentPercentage(float,float),// 0.0 to 1.0 for the available size the parent is offering itSelfPercantage(float,float),// Multiplier of the 'preferred' size (so (2.0, 2.0) of a label// would double it's default size in each dimension)}
Describe alternatives you've considered
Only real alternative that I see currently is calculating everything manually at every location you want to do something other than logical pixels, or reimplementing all the widgets and areas/panels.
The text was updated successfully, but these errors were encountered:
I'm not convinced this is an improvement. The current system has the benefit of being simple: there is only one unit and one coordinate system. Going away from this will open up a can of complexity
DevicePixel - I see no reason to want to say "this button should be this many physical pixels wide so that it looks different on different on different displays". Seems like an invitation to portability problems
ScreenPercentage/ParentPercentage: Is Size::ScreenPercentage(0.2, 0.5) really better than vec2(0.2, 0.5) * screen_size ?
ParentPercentage: what parent? the immediate one? and what size? it's current, or its maximum?
I think I need some concrete user stories to be convinced of this.
PS: You are also confusing percentages (0%-100%) with fractions (0-1)
Is your feature request related to a problem? Please describe.
Many areas take in something like
impl Into<Vec2>
, but this only allows setting a hard (logical) pixel size, which is limited because it can't work based on the viewable area, percentage, etc...Describe the solution you'd like
It would be most convenient if the arguments that took a size took an enum instead, perhaps with a few useful heads like:
Describe alternatives you've considered
Only real alternative that I see currently is calculating everything manually at every location you want to do something other than logical pixels, or reimplementing all the widgets and areas/panels.
The text was updated successfully, but these errors were encountered: