changeset c7bf901a313c in sao:default
details: https://hg.tryton.org/sao?cmd=changeset&node=c7bf901a313c
description:
Use default align to 0 for expanded widget
As the widget are not really expanded, it is better to align them on
top/start
then in the middle.
issue10898
review375851002
diffstat:
src/view/form.js | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (25 lines):
diff -r 287382c0d95e -r c7bf901a313c src/view/form.js
--- a/src/view/form.js Tue Oct 26 19:40:49 2021 +0200
+++ b/src/view/form.js Thu Oct 28 09:02:01 2021 +0200
@@ -81,11 +81,19 @@
}
if (attributes.xalign === undefined) {
- attributes.xalign = 0.5;
+ if (attributes.xexpand) {
+ attributes.xalign = 0;
+ } else {
+ attributes.xalign = 0.5;
+ }
}
if (attributes.yalign === undefined) {
- attributes.yalign = 0.5;
+ if (attributes.yexpand) {
+ attributes.yalign = 0;
+ } else {
+ attributes.yalign = 0.5;
+ }
}
this.container.add(widget, attributes);