// Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.0 OR LicenseRef-Slint-commercial export { NativeStyleMetrics as StyleMetrics } export component ScrollView { in-out property viewport-width <=> fli.viewport-width; in-out property viewport-height <=> fli.viewport-height; in-out property viewport-x <=> fli.viewport-x; in-out property viewport-y <=> fli.viewport-y; out property visible-width <=> fli.width; out property visible-height <=> fli.height; in-out property has-focus <=> native.has-focus; in property enabled <=> native.enabled; preferred-height: 100%; preferred-width: 100%; min-height: native.min-height; min-width: native.min-width; native := NativeScrollView { vertical-max: fli.viewport-height > fli.height ? fli.viewport-height - fli.height : 0phx; vertical-page-size: fli.height; horizontal-max: fli.viewport-width > fli.width ? fli.viewport-width - fli.width : 0phx; horizontal-page-size: fli.width; } fli := Flickable { x: native.native-padding-left; width: root.width - native.native-padding-left - native.native-padding-right; y: native.native-padding-top; height: root.height - native.native-padding-top - native.native-padding-bottom; @children interactive: false; viewport-y <=> native.vertical-value; viewport-x <=> native.horizontal-value; } }