slint icon indicating copy to clipboard operation
slint copied to clipboard

Rename Flickable/Scrollview viewport vs. content properties

Open tronical opened this issue 3 years ago • 1 comments

The Flickable/ScrollView allows showing content that is larger than the size of the Flickable/Scrollview element.

The current API uses the following terms and properties:

Flickable.width/Flickable.height: The size of the Flickable element.
viewport_width/viewport_height/viewport_x/viewport_y: The size of the content.

The use of the term "viewport" is inconsistent with other toolkits such as Flutter or Qt, where the Flickable/Scrollview is the view port. Similarly, Wikipedia says that the "viewport is a region of the screen used to display a portion of the total image to be shown" or " the viewport is the visible portion of a 2D area which is larger than the visualization device". Therefore it is misleading to call viewport_height the height of the larger content area.

I propose we rename

`viewport_*`

to

`content_*`

tronical avatar Jul 28 '22 13:07 tronical

We can rename and keep the older one as deprecated, so it's not a breaking change.

ogoffart avatar Aug 14 '22 16:08 ogoffart