-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
ScrollView currently uses the following internally:
flickable := Flickable {
x: 0;
y: 0;
viewport_y <=> vertical_bar.value;
viewport_x <=> horizontal_bar.value;
width: root.width - root.scroll_bar_size - 2 * root.scroll_bar_padding;
height: root.height - root.scroll_bar_size;
@children
}
The problem with this code is that it always adds some padding for the scroll bars, even when they are disabled. I fixed this issue with the following:
flickable := Flickable {
x: 0;
y: 0;
viewport_y <=> vertical_bar.value;
viewport_x <=> horizontal_bar.value;
width: root.vertical_scrollbar_policy == ScrollBarPolicy.always-off ? root.width : root.width - root.scroll_bar_size - 2 * root.scroll_bar_padding;
height: root.horizontal_scrollbar_policy == ScrollBarPolicy.always-off ? root.height : root.height - root.scroll_bar_size;
@children
}
Also, is there a reason why only one scrollbar uses padding?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request