Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add element display and position options #298

Merged
merged 15 commits into from
Jan 10, 2025

Conversation

Samillion
Copy link
Owner

@Samillion Samillion commented Jan 8, 2025

Fixes: #295

Useful for controlling font size and adjusting the position of affected elements if the font size or type make the appearance of some elements unpleasant.

Changes:

  • Add chapter_title_font_size option
  • Add tooltip_font_size option
  • Apply title, chapter title and play button suggestions and fix by @Keith94
  • Add new elements position options
  • Match title and chapter title height with their font size for a more accurate hitbox
# title height position above seekbar
title_height=96
# title height position if a chapter title is below it
title_with_chapter_height=108
# chapter title height position above seekbar
chapter_title_height=91
# time codes height position
time_codes_height=35
# time codes height position with portrait window
time_codes_centered_height=57
# tooltip height position offset
tooltip_height_offset=2
# if tooltip contains many characters, it is moved to the left by offset
tooltip_left_offset=3
# if cache speed is enabled, adjust the main tooltip for cache
tooltip_cache_speed_offset=5
# portrait window width trigger to move some elements
portrait_window_trigger=930
# hide volume bar trigger window width
hide_volume_bar_trigger=1150
# osc height offset if title above seekbar is disabled
notitle_osc_h_offset=25
# osc height offset if chapter title is disabled or doesn't exist
nochapter_osc_h_offset=10
# seek hover timecodes tooltip height position offset
seek_hover_tooltip_h_offset=0
# osc height without offsets
osc_height=132

Useful for controlling font size and adjusting the position of affected elements if the font size or type make the appearance of some elements unpleasant.
@Keith94
Copy link
Contributor

Keith94 commented Jan 8, 2025

With the seekbar hover timecodes, how do we move that up? can it be an option? :)

@Keith94
Copy link
Contributor

Keith94 commented Jan 8, 2025

Mouse clicks are going through the title and chapter title because the osc_height_offset wasn't touched

@Samillion
Copy link
Owner Author

This would go with the new adjustments, right?

local osc_height_offset = (no_title and 25 or 0) + ((no_chapter or not chapter_index) and 10 or 0)

@Keith94
Copy link
Contributor

Keith94 commented Jan 8, 2025

Sweet, I'll check on it later today. Thanks.

Our time zones must be not aligned very well (it's 9am) haha.

@Samillion
Copy link
Owner Author

Our time zones must be not aligned very well (it's 9am) haha.

😱 6 PM for me lol. Take all the time you need, no rush at all.

@Keith94
Copy link
Contributor

Keith94 commented Jan 8, 2025

I know it sounds nitpicky but maybe the OSC height offset approach can take into account the new options for height you added?

title_height=96
title_with_chapter_height=108

I'm assuming the offset values you mentioned above wouldn't work if someone was adding additional height to these new options.

@Samillion
Copy link
Owner Author

Shouldn't be a problem at all. Will add offsets for title, chapter title and seek hover timecodes soon.

@Samillion
Copy link
Owner Author

  • Adjusted osc_height_offset to match recent changes.
  • Added more element display and position options
# osc height offset if title above seekbar is disabled
notitle_osc_h_offset=25
# osc height offset if chapter title is disabled or doesn't exist
nochapter_osc_h_offset=10
# seek hover timecodes tooltip height position offset
seek_hover_tooltip_h_offset=0

@Keith94
Copy link
Contributor

Keith94 commented Jan 9, 2025

I found that using these defaults relieve all of the overlapping.

notitle_osc_h_offset = 28, to notitle_osc_h_offset = 24
nochapter_osc_h_offset = 10, to nochapter_osc_h_offset = 14,
Line 1742: h = 27 to h = 22

Perhaps the overall height (line 1654) should be adjustable too since I was having issues with it being slightly too tall when both titles were disabled. Wasn't able to fix that.

@Samillion
Copy link
Owner Author

Samillion commented Jan 9, 2025

Line 1742: h = 27 to h = 22

Are you using title_font_size=22? I guess we can make this match title font size

h = user_opts.title_font_size

Perhaps the overall height (line 1654) should be adjustable too since I was having issues with it being slightly too tall when both titles were disabled. Wasn't able to fix that.

Can add osc_height

nochapter_osc_h_offset = 10, to nochapter_osc_h_offset = 14,

In your testing, 14 was better than 10 in default values or in your specific config?

@Samillion
Copy link
Owner Author

Added osc_height option. Let me know if the other adjustments should be added as well, please.

@Keith94
Copy link
Contributor

Keith94 commented Jan 10, 2025

There is basically a small pixel where clicking the title or chapter title while hovering it doesn't act on the title itself:

explorer_3jIKCgtUlK.mp4

So you have to actually decrease these offsets to remedy that:

notitle_osc_h_offset = 23
nochapter_osc_h_offset = 8

Only small issue left is if you have both titles disabled:

show_chapter_title=no
show_title=no

osc_height should be more like 115 instead of 130, which can be remedied by the new osc_height option. :)

@Samillion
Copy link
Owner Author

Awesome, thank you so much for testing and finding the appropriate values, will confirm and apply shortly.

Should this change be made?

Line 1742: h = 27 to h = 22

Are you using title_font_size=22? I guess we can make this match title font size

h = user_opts.title_font_size

@Keith94
Copy link
Contributor

Keith94 commented Jan 10, 2025

I was using the default 24, but after some brief testing this change would be good to have.

You could change both of these

h = user_opts.title_font_size
h = user_opts.chapter_title_font_size for chapter title

@Samillion
Copy link
Owner Author

Done. Thanks again for all the tests.

Let me know if there is anything that needs adjusting. No rush at all.

@Keith94
Copy link
Contributor

Keith94 commented Jan 10, 2025

Crap I forgot to test with both things enabled.

I would make this change instead and undo the offset changes I mentioned (sorry lol)

osc_height = 132,
notitle_osc_h_offset = 25,
nochapter_osc_h_offset = 10,

@Samillion
Copy link
Owner Author

😆 yeah, that's why I was confused when I asked earlier. No worries at all, adjusted to the new values: 25, 10, 132

@Keith94
Copy link
Contributor

Keith94 commented Jan 10, 2025

For a default what do you think about: seek_hover_tooltip_h_offset=5 Yay or nay?

@Samillion
Copy link
Owner Author

That overlaps chapter title if it exists.

image

But that's the beauty of these options, for the users to adjust them for the use case they have, or even different ones with auto profiles.

@Keith94
Copy link
Contributor

Keith94 commented Jan 10, 2025

Of course, sounds good. Did you find a fix for #294 (comment) ?

@Samillion
Copy link
Owner Author

Of course, sounds good. Did you find a fix for #294 (comment) ?

It's a niche scenario that can be fixed by adjusting portrait_window_trigger=930 and/or hide_volume_bar_trigger=1150

Any further adjustments would honestly be a bloat to address possible timecode values, font type and size.

@Samillion
Copy link
Owner Author

aMV4MKV_700b

@Samillion Samillion merged commit 5bf1544 into main Jan 10, 2025
@Samillion Samillion deleted the dev_elements_display_feat branch January 10, 2025 20:05
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.

Is it possible to adjust the position of title or seekbar tooltip?
2 participants