Home » U++ Library support » U++ Library : Other (not classified elsewhere) » ScrollBarSize() - Is it (possibly) a bug?
ScrollBarSize() - Is it (possibly) a bug? [message #58936] |
Tue, 27 September 2022 01:35 |
Lance
Messages: 527 Registered: March 2007
|
Contributor |
|
|
I was looking for some member function in ScrollBar to retieve the scrollbar size, or expose the const Style *style
which can in turn access the barsize value, but to no avail. Until I find this function
inline int ScrollBarSize() { return ScrollBar::StyleDefault().barsize; }//!!
A search in the Upp src indicates many libraries make use of this function, including in HeaderCtrl
void HeaderCtrl::FrameLayout(Rect& r)
{
LayoutFrameTop(r, this, invisible ? 0 : GetHeight());
LayoutFrameBottom(r, &sb, sb.IsShown() ? ScrollBarSize() : 0);
}
void HeaderCtrl::FrameAddSize(Size& sz)
{
if(!invisible)
sz.cy += GetHeight();
if(sb.IsVisible())
sz.cy += ScrollBarSize();
}
Does this imply that a customized ScrollBar Style shall not disagree on barsize with the default ScrollBar Style? Is this restriction necessary? or shall we expose int ScrollBar::ScrollBarSize()const(elevate it to a public member function from a private one as it is now)?
|
|
|
Goto Forum:
Current Time: Mon Apr 29 14:10:35 CEST 2024
Total time taken to generate the page: 0.02031 seconds
|