Web+ DL-window: fix scrollbar alignment
Similar to the vertical scrollbar, the horizontal scrollbar needs to be tweaked to fit nicely into the window. Fixes #19890 Change-Id: I2ad6cc4b948546d509fd697afb9d7df4fd9fc68f Reviewed-on: https://review.haiku-os.org/c/haiku/+/10227 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Adrien Destugues <[email protected]> Reviewed-by: Joachim Mairböck <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
384b810462
commit
3e6f397911
@@ -100,10 +100,13 @@ protected:
|
||||
{
|
||||
BScrollView::DoLayout();
|
||||
// Tweak scroll bar layout to hide part of the frame for better looks.
|
||||
BScrollBar* scrollBar = ScrollBar(B_VERTICAL);
|
||||
BScrollBar* scrollBar = ScrollBar(B_HORIZONTAL);
|
||||
scrollBar->MoveBy(-1, 1);
|
||||
scrollBar->ResizeBy(2, 0);
|
||||
scrollBar = ScrollBar(B_VERTICAL);
|
||||
scrollBar->MoveBy(1, -1);
|
||||
scrollBar->ResizeBy(0, 2);
|
||||
Target()->ResizeBy(1, 0);
|
||||
Target()->ResizeBy(1, 1);
|
||||
// Set the scroll steps
|
||||
if (BView* item = Target()->ChildAt(0)) {
|
||||
scrollBar->SetSteps(item->MinSize().height + 1,
|
||||
|
||||
Reference in New Issue
Block a user