aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Schwender <55576758+jschwe@users.noreply.github.com>2025-05-24 09:37:46 +0800
committerGitHub <noreply@github.com>2025-05-24 01:37:46 +0000
commit78f74d0d5ec885a68a9ee467168de5a91082bba6 (patch)
tree78d68c0eb54c5f4f04c11f7e3b5fbed3742d62b5
parentd18000fee8d1f4ef95be21525b013ca5213f9d59 (diff)
downloadservo-78f74d0d5ec885a68a9ee467168de5a91082bba6.tar.gz
servo-78f74d0d5ec885a68a9ee467168de5a91082bba6.zip
ohos: servoshell: Use Flex{Column} to avoid Column bug (#37087)
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. Testing: Manual inspection with DevEco Testing inspecting the height of the children elements in ArkUI Fixes: Part of the servoshell surface extending beyond the physical screen on ohos Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
-rw-r--r--support/openharmony/entry/src/main/ets/pages/Index.ets5
1 files changed, 4 insertions, 1 deletions
diff --git a/support/openharmony/entry/src/main/ets/pages/Index.ets b/support/openharmony/entry/src/main/ets/pages/Index.ets
index 1d84d4478db..9c6cb06537b 100644
--- a/support/openharmony/entry/src/main/ets/pages/Index.ets
+++ b/support/openharmony/entry/src/main/ets/pages/Index.ets
@@ -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)