Skip to content

Conversation

@101paul
Copy link
Contributor

@101paul 101paul commented Oct 10, 2025

Hey there ! Thanks for the feedback

This is a follow-up to my previous PR #7743 .

I’ve updated the implementation so that the margin change for the fullscreen button now occurs only when entering fullscreen mode. In normal mode, the margins remain untouched to keep the layout consistent.
Added a small tooltip for the fullscreen button as a friendly hint.
I’ve also reverted the unintended changes in app/src/main/res/values/languages.xml.
These updates should make the fullscreen layout behave smoothly and keep the UI consistent in both modes.

@osamasayed585
Copy link
Contributor

I think if we’re going to change this part, we should apply the adjustment suggested by krwow

@101paul
Copy link
Contributor Author

101paul commented Oct 13, 2025

I think if we’re going to change this part, we should apply the adjustment suggested by krwow

I think the existing design works well overall. The only concern is that the icon appears a bit too close to the progress bar — adjusting that spacing should address the issue for now.


<dimen name="normal_button_margin_bottom">0dp</dimen>
<dimen name="normal_button_margin_end">0dp</dimen>
<dimen name="fullscreen_button_margin_bottom">11dp</dimen>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

11dp is a bit too much imo because that doesn't align anymore with the video duration and progress texts in the left.

Everything up to 5dp looks still okay, but it shouldn't be much more in my opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it done 🎉

Comment on lines 918 to 931
private fun setFullscreenButtonMargin(isFullscreen: Boolean) {
val layoutParams = playerControlsBinding.fullscreen.layoutParams as ViewGroup.MarginLayoutParams

if (isFullscreen) {
// Add extra bottom margin in fullscreen
layoutParams.bottomMargin = resources.getDimensionPixelSize(R.dimen.fullscreen_button_margin_bottom)
layoutParams.marginEnd = resources.getDimensionPixelSize(R.dimen.fullscreen_button_margin_end)
} else {
// Reset to default margin
layoutParams.bottomMargin = resources.getDimensionPixelSize(R.dimen.normal_button_margin_bottom)
layoutParams.marginEnd = resources.getDimensionPixelSize(R.dimen.normal_button_margin_end)
}

playerControlsBinding.fullscreen.layoutParams = layoutParams
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put this logic into CustomExoPlayerView.kt and call it from there from within onFullscreenChange, see https://github.com/libre-tube/LibreTube/blob/master/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt#L824.

That way it also works if playing downloaded videos offline :)

Copy link
Contributor Author

@101paul 101paul Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hii @Bnyro
I’ve moved the fullscreen button margin logic into CustomExoPlayerView.kt and it’s now called inside onFullscreenChange() like you suggested. It should now work properly even for downloaded videos offline :)

All changes are pushed to the fix-video-margins branch. Excited to see it merged

Thanks for the guidance !

@Bnyro
Copy link
Member

Bnyro commented Oct 23, 2025

I think if we’re going to change this part, we should apply the adjustment suggested by krwow

I think it's fine to merge both, but perhaps it makes sense if you could test #7757 @101paul to see if it makes sense to apply these changes here as well after #7757 in your opinion.

@101paul
Copy link
Contributor Author

101paul commented Oct 24, 2025

I just went ahead and tested #7757 together with my PR by merging them and everything is working flawlessly :)
It looks great and I think applying these changes after #7757 will work really smoothly!

@Bnyro Bnyro force-pushed the fix-video-margins branch from e8e3aca to 8cf2b65 Compare October 25, 2025 09:41
@Bnyro Bnyro force-pushed the fix-video-margins branch from 8cf2b65 to de5e365 Compare October 25, 2025 09:42
Copy link
Member

@Bnyro Bnyro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Bnyro Bnyro merged commit 6834234 into libre-tube:master Oct 25, 2025
3 checks passed
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.

3 participants