Skip to content

osc.lua: add floating layout#17550

Merged
kasper93 merged 2 commits intompv-player:masterfrom
kasper93:osc-floating
Mar 13, 2026
Merged

osc.lua: add floating layout#17550
kasper93 merged 2 commits intompv-player:masterfrom
kasper93:osc-floating

Conversation

@kasper93
Copy link
Member

@kasper93 kasper93 commented Mar 10, 2026

image image

@Samillion
Copy link
Contributor

I genuinely think this is beautiful to the point that I think it's worthy to be default when it's up and running. Well done.

In fact, osc.lua is just missing a new look for icons and it will have a mass appeal. This combined with guido's QoL options with console and select = perfection.

@kasper93 kasper93 marked this pull request as ready for review March 11, 2026 19:53
@kasper93
Copy link
Member Author

kasper93 commented Mar 11, 2026

Updated. I think it's fine now. Fine tuning can always be done, but I consider this ready for merge. This should be more touch friendly, where default bottombar layout forces you to edge with touch on the border of the screen.

@na-na-hi
Copy link
Contributor

Can you remove the blur? It looks like low res texture from N64 games. And combining it with high res text and icons look really strange.

@llyyr
Copy link
Contributor

llyyr commented Mar 12, 2026

maybe you could combine the windowcontrols in the box itself for the no title bar version

@kasper93
Copy link
Member Author

Can you remove the blur? It looks like low res texture from N64 games. And combining it with high res text and icons look really strange.

Sure. Without blur. It has more flat look now, but maybe it's ok. Don't think shadow would do any better, hmm.
image

maybe you could combine the windowcontrols in the box itself for the no title bar version

I don't want to bloat box itself, there is a lot going on there already.

@kasper93
Copy link
Member Author

kasper93 commented Mar 12, 2026

Current status.

image

@dyphire
Copy link
Contributor

dyphire commented Mar 12, 2026

I genuinely think this is beautiful to the point that I think it's worthy to be default when it's up and running. Well done.

I also agree that it can be provided by default.

@na-na-hi
Copy link
Contributor

I also agree that it can be provided by default.

It would degrade mouse usability, see #9791. Current layout has everything usable at the bottom border which better respects Fitts's law.

@avih
Copy link
Member

avih commented Mar 12, 2026

I like this layout, and I do use the box layout by default, but this could have issues with the mpv console.

Regardless of what it does now, the console could play nice with bottom layouts, but it's hard to do that with middle OSC layouts.

@dyphire
Copy link
Contributor

dyphire commented Mar 12, 2026

I also agree that it can be provided by default.

It would degrade mouse usability, see #9791. Current layout has everything usable at the bottom border which better respects Fitts's law.

Yes, it makes sense. The new layout is very similar to the UI of QuickTime Player and IINA on Mac, and it is rare to see users complaining about it. But there's nothing wrong with keeping it as it is, just offering a new layout is already a good improvement.

@kasper93
Copy link
Member Author

I also agree that it can be provided by default.

It would degrade mouse usability, see #9791. Current layout has everything usable at the bottom border which better respects Fitts's law.

For real though, it wouldn't degrade mouse usability, because #9791 is not resolved and the window edges/corners are not used as mouse hit targets. In the bottom bar layout you still have to aim exactly at the icon you want to press, they do not extend to the corner/edge, which would help with Fitts's law. I agree that if it were implemented properly it would be better.

I also agree that the general idea is to have full width seekbar in media player, but we have this already, so no point in changing and there are alternatives like UOSC or ModernZ that are doing it better anyway, so no point in competing in this area, I wanted to have modern alternative that is more appealing.

The new layout, however, is better for touch control, because it is genuinely hard to tap the exact corners of the screen when you are holding the device. Arguably it may also be better for mouse control, because the travel distance to reach elements positioned closer to the center of the screen is statistically shorter than going to a far edge. It also places information directly in front of the viewer, which for large projection systems or screens may be preferable to spanning the whole width of the projected area. That said, the floating seek bar is a bit small in comparison, and I do like the bottombar approach for that case. I don't like data density for both of them, but mpv likes to put more information than needed everywhere.

I have never suggested making this the default, because I know mpv purists will not like it. It is not the layout from 0.29.1. However, if the argument is that the mpv UI is the pinnacle of accessibility and usability, then I kindly have to disagree. It is functional, sure, and I like it, but it is far from perfect.

Side note: we could make this floating layout wider to span most of the available area. I'm not sure what would be preferred here.

Also, could we please focus feedback to this PR and suggestions for improving the current implementation, instead of sidetracking the discussion into topics not covered in this PR? I would love to improve this further, but I'm not a UI designer. I do my best to make it functional and preserve the OSC spirit. I was thinking that some color accent, like the mpv purple, might make it more appealing, but I'm not sure where it could be added without making it look too candy like.

@kasper93 kasper93 force-pushed the osc-floating branch 2 times, most recently from ef00092 to e84c98b Compare March 12, 2026 20:34
@ghost
Copy link

ghost commented Mar 13, 2026

i think if you refine, this look even better, this corner side won't look empty, you can try add playlist here too

it will look like this, much more cleaner

@kasper93
Copy link
Member Author

i think if you refine, this look even better, this corner side won't look empty, you can try add playlist here too

OSC, shows also chapters there, so it is more useful to pure window title.

Floating layout is more rounded comparet to square bar layout, so fluent
icons are better match here.
@kasper93 kasper93 merged commit 88e741a into mpv-player:master Mar 13, 2026
28 of 30 checks passed
@kasper93 kasper93 deleted the osc-floating branch March 13, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants