01-05-2013 03:15 PM
This is from Beta 3 release notes ("Fixed in this release" section):
#4050102
When you were using a QML Container with a LeftToRight stack layout with one element aligned to the left and the second aligned to the right (using the HorizontalAlignment.Right property), both elements used to be aligned side-by-side instead of to each side.
However, this still does not work in Gold SDK.
I wanted to reopen this issue but could not find it in Issue Tracker. How can I resubmit this bug?
Thank you.
01-05-2013 03:44 PM
01-05-2013 04:02 PM - edited 01-05-2013 04:14 PM
Haven't tried this in QML but can confirm this doesn't work in C++. ![]()
I've set container's background to red color. The container takes all the space but the items are positioned side-by-side on the left.
Container *container = Container::create() .layout(StackLayout::create().orientation(LayoutOrientation::LeftToRight)) .add(Label::create() .horizontal(HorizontalAlignment::Left) .text("Label1")) .add(Label::create() .horizontal(HorizontalAlignment::Right) .text("Label2")) .background(Color::Red); setContent(container);
Screenshot:
01-05-2013 08:18 PM
01-06-2013 01:54 AM
Thanks Peter.
I'm using solution with the empty container and space quotas already. (Dock layout allows labels to overlap, which is bad for me.) This solution works well except the fact that margins between left and right control become duplicated because of invisible container between them.
Setting half right margin for the left control and half left margin for the right control is inconvenient. Release notes for Beta 2 ("Known issues" section) and release notes for Beta 3 ("Fixed in this release" section) both tell us that horizontal alignment should work within left-to-right stack.
So I'm wondering why they documented this issue as fixed in Beta 3. I'd be happy if someone from BlackBerry team came here and clarified the situation.
01-08-2013 04:44 PM
Looks like this bug still exists. I've logged it in Issue Tracker here:
HorizontalAlignment::Right does not align controls
Thanks for bringing this up.