fix WPFHelper.measure_visual_content - 'left edge' calculation for right align; 'bottom edge' for bottom align
This commit is contained in:
1 parent
c26c145b2f
commit
0191856733
1 file changed
+2
-2
@@ -376,7 +376,7 @@ namespace mbts.ui {
|
||||
switch (x_content_align) {
|
||||
case HorizontalAlignment.Left: content_left = border_thickness.Left + padding.Left; break;
|
||||
case HorizontalAlignment.Center: content_left = 0.5 * (result_width - content_width); break;
|
||||
case HorizontalAlignment.Right: content_left = result_width - border_thickness.Right - padding.Right; break;
|
||||
case HorizontalAlignment.Right: content_left = result_width - border_thickness.Right - padding.Right - content_width; break;
|
||||
default: goto case HorizontalAlignment.Center;
|
||||
}
|
||||
} else {
|
||||
@@ -408,7 +408,7 @@ namespace mbts.ui {
|
||||
switch (y_content_align) {
|
||||
case VerticalAlignment.Top: content_top = border_thickness.Top + padding.Top; break;
|
||||
case VerticalAlignment.Center: content_top = 0.5 * (result_height - content_height); break;
|
||||
case VerticalAlignment.Bottom: content_top = result_height - border_thickness.Bottom - padding.Bottom; break;
|
||||
case VerticalAlignment.Bottom: content_top = result_height - border_thickness.Bottom - padding.Bottom - content_height; break;
|
||||
default: goto case VerticalAlignment.Center;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user