HI, how we can check if VerticalScrollbar is visib...
# compose-desktop
s
HI, how we can check if VerticalScrollbar is visible or not if we want to use some custom style there ? SO that depending on visibility, we can hide show our custom design
2
a
I've done something similar in the past but I don't remember the code right now. I did something like checking if the first and last items of your list are fully visible.
a
Visible in what sense? Sometimes it’s invisible because it faded away, and sometimes because the viewport is larger than the content.
s
@Alexander Maryanovsky Visibility means, if scroll bar is present or not, When content is smaller than viewpoart, scrollbar is not rendered, right. SO my question was same to detect this if scrollbar is present or not according to content size
a
In
ScrollbarAdapter
you have
contentSize
and
viewportSize
. If the viewport size is greater than or equals to the content size, the scrollbar isn’t displayed.
👍 1
s
ok thanks, i will try that