ohos: servoshell: Use Flex{Column} to avoid Column bug

The `Column()` height and thus also the XComponent height
extends beyond the physical display for unknown reasons.
This is a problem on websites that have a footer bar, since the footer
is partially below the display end.
Using Flex with Column direction works as expected.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2025-05-22 20:47:23 +08:00
parent 4c1a09e17b
commit 9876a853dd
No known key found for this signature in database

View file

@ -76,7 +76,10 @@ struct Index {
}
build() {
Column() {
// We originally use `Column()` here, but for some reason the column
// extends beyond the edge of the screen. This does not happen with
// Flex.
Flex({ direction: FlexDirection.Column}) {
Row() {
Button('⇦').backgroundColor(Color.White)
.fontColor(Color.Black)