slint/internal/compiler/widgets/native/std-widgets-impl.slint
Olivier Goffart 7947d44e59 Run the syntax_updater on our widgets
This is commit is just the output of running the syntax updater on the
files in the internal/compiler/widgets directory.
No extra manual steps were done.

Note: In order to run the updater, I did a hack so that the updater wouldn't
choke on internal item used by the styles by commenting out the check in
ElementType::lookup_type_for_child_element
2023-01-11 10:52:48 +01:00

31 lines
1.2 KiB
Text

// Copyright © SixtyFPS GmbH <info@slint-ui.com>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
export { NativeStyleMetrics as StyleMetrics }
export component ScrollView inherits NativeScrollView {
in-out property <length> viewport-width <=> fli.viewport-width;
in-out property <length> viewport-height <=> fli.viewport-height;
in-out property <length> viewport-x <=> fli.viewport-x;
in-out property <length> viewport-y <=> fli.viewport-y;
out property <length> visible-width <=> fli.width;
out property <length> visible-height <=> fli.height;
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: root.native-padding-left;
width: root.width - root.native-padding-left - root.native-padding-right;
y: root.native-padding-top;
height: root.height - root.native-padding-top - root.native-padding-bottom;
@children
interactive: false;
viewport-y <=> root.vertical-value;
viewport-x <=> root.horizontal-value;
}
}