Opened 7 years ago

Last modified 6 years ago

#8549 new bug

[Media] briefly shows scrollbars after selecting mixer from the list view (easy)

Reported by: diver Owned by: yourpalal
Priority: normal Milestone: R1
Component: Add-Ons/Media/Mixer Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Attachments (1)

media.png (63.6 KB) - added by diver 6 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 6 years ago by yourpalal

I can't reproduce this. What are you doing before selecting the mixer? Also, if the scrollbars are in the mixer view (I suspect so..) then this is probably a DefaultMediaTheme issue, as that view is provided by the media kit.

comment:2 Changed 6 years ago by diver

Description: modified (diff)

Select Audio settings and then Audio mixer. Visible on a slow hardware.

Changed 6 years ago by diver

Attachment: media.png added

comment:3 Changed 6 years ago by yourpalal

Summary: [Media] breefly shows scrollbars after selecting mixer from the list view[Media] briefly shows scrollbars after selecting mixer from the list view (easy)

comment:4 Changed 6 years ago by diver

Component: Preferences/MediaAdd-Ons/Media/Mixer

comment:5 Changed 6 years ago by irtusb

Cc: irtusb@… added

Although I'm still learning about the GUI API, can anyone give me a hint what files should I take a look to fix this?

comment:6 Changed 6 years ago by diver

Probably Audio mixer and DefaultMediaTheme sources.

Last edited 6 years ago by diver (previous) (diff)

comment:7 in reply to:  6 ; Changed 6 years ago by irtusb

As far I can see, this issue has something to do with the usage of BTabView in DefaultMediaTheme source file. Is it safe to use Layout-classes to solve this, or should I stick with fixed size/position items? I'm referencing the last warning presented by leavengood in Laying It All Out, Part 1

comment:8 in reply to:  7 Changed 6 years ago by yourpalal

Replying to irtusb:

As far I can see, this issue has something to do with the usage of BTabView in DefaultMediaTheme source file. Is it safe to use Layout-classes to solve this, or should I stick with fixed size/position items? I'm referencing the last warning presented by leavengood in Laying It All Out, Part 1

It is probably safe to use them, yes. The main issue to be wary of is backwards-compatibility with non-layout-aware apps. Hopefully this won't be an issue, the layout API attempts to be backwards-compatible in this way, but it could have problems. As you work, you should develop a small test application that uses the media kit views in a non-layouted context and test with it while you're working. The Media preflet already uses the layout kit, so it should be fine for sure.

There's also some documentation on the layout api in the haiku book, here: http://api.haiku-os.org/layout_intro.html

comment:9 Changed 6 years ago by irtusb

After a week diving in the code, I came into a strange situation: MediaWindow::_MakeParamView() calls BMediaTheme::ViewFor(fParamWeb, &hint), the later returns the TabView that is on the ticket's image (Gain controls and Setup). The problem is that any attempt to modify the code in ViewFor() is not reflected in the final executable. It is not being executed at all (put some printf there, and returned a new BStringView).

What can I do now? I compile using "jam -q Media", gcc2hybrid and a recent git checkout (no more than a week old)

comment:10 in reply to:  9 Changed 6 years ago by anevilyak

Replying to irtusb:

The problem is that any attempt to modify the code in ViewFor() is not reflected in the final executable. It is not being executed at all (put some printf there, and returned a new BStringView).

The files in src/kits/media/ belong to libmedia.so, not the media preflet, so you'd need to be updating/replacing that instead.

comment:11 Changed 6 years ago by irtusb

thanks anevilyak, now everything makes sense

comment:12 Changed 6 years ago by irtusb

Cc: irtusb@… removed

I give up, this turned to be too hard for me now =( maybe another time

Note: See TracTickets for help on using tickets.