Ticket #8659: fixed-width.patch

File fixed-width.patch, 948 bytes (added by humdinger, 8 years ago)

Giving the scrollView a fixed size, setting explicit min-size.

  • src/preferences/media/MediaWindow.cpp

    diff --git src/preferences/media/MediaWindow.cpp src/preferences/media/MediaWindow.cpp
    index 9d599b8..889e122 100644
    MediaWindow::InitWindow()  
    405405    BLayoutBuilder::Group<>(this, B_HORIZONTAL)
    406406        .SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING,
    407407            B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
    408         .Add(scrollView)
     408        .Add(scrollView, 0.0f)
    409409        .AddGroup(B_VERTICAL)
    410410            .SetInsets(0, 0, 0, 0)
    411411            .Add(fTitleView)
    MediaWindow::InitWindow()  
    413413
    414414    // Start the window
    415415    fInitCheck = InitMedia(true);
    416     if (fInitCheck != B_OK) {
     416    if (fInitCheck != B_OK)
    417417        PostMessage(B_QUIT_REQUESTED);
    418     } else  if (IsHidden()) {
     418    else if (IsHidden())
    419419            Show();
     420
     421    if (LockLooper()) {
     422        float padding = scrollView->Bounds().Width() + 16;
     423        scrollView->SetExplicitMinSize(BSize(padding, B_SIZE_UNSET));
     424        UnlockLooper();
    420425    }
    421426}
    422427