Commit Graph

258 Commits

Author SHA1 Message Date
tomasklaen
7f2803046a feat: add time_precision option
Number that determines sub second fraction precision to display in timeline timestamps. Default is `0`.

closes #127
2022-08-23 22:39:08 +02:00
tomasklaen
761fa996e0 feat: add an ability to open submenus
With this, users can set up keybinds to send `show-submenu` message to
uosc with menu ID to open just that.
Example: `script-message-to uosc show-submenu "Foo > Bar"`

closes #75
2022-08-23 19:10:22 +02:00
tomasklaen
ef7688fa97 fix: show timeline adjacent elements during peek-timeline even when cursor is hidden 2022-08-23 18:36:47 +02:00
tomasklaen
3ea9fbc848 fix: correct hovered menu item detection 2022-08-23 18:30:49 +02:00
tomasklaen
ac33b435f5 fix: adjust and visualize time area padding due to line width 2022-08-23 18:21:23 +02:00
tomasklaen
fb279fecc6 fix: color chapters to the left of the progress line with foreground color 2022-08-23 14:28:07 +02:00
tomasklaen
e194b255d9 fix: make menu item navigation select the scrolled to index 2022-08-23 13:40:35 +02:00
tomasklaen
894dfa0a36 feat: preselect previous folder when navigating up the file tree 2022-08-23 13:11:04 +02:00
tomasklaen
5e05f51756 refactor: tidy up drives menu 2022-08-23 09:20:43 +02:00
Zhong Lufan
17232fbfdc feat: navigating to other drives on Windows (#124) 2022-08-23 08:20:51 +02:00
tomasklaen
895c783be8 3.0.0 2022-08-22 11:48:31 +02:00
tomasklaen
af117c1ce7 Update urls to new repo 2022-08-22 11:33:21 +02:00
tomasklaen
7eca20008e Implement timeline_chapters_width option
closes #119
2022-08-22 11:14:10 +02:00
tomasklaen
2b9ce54b86 Tweak defaults 2022-08-22 10:43:56 +02:00
tomasklaen
b37082d185 Remove timeline_elements option 2022-08-21 14:14:59 +02:00
Eva
78d6dfa137 Display playlist position in window title 2022-08-21 12:23:02 +02:00
tomasklaen
ebf49d5917 Disable unwanted diagnostics warning 2022-08-20 22:50:24 +02:00
tomasklaen
52baad25d0 Fix menu button closing the menu immediately after opening it
closes #77
2022-08-20 22:12:58 +02:00
tomasklaen
8a85070f27 Add nil checks and code style tweaks 2022-08-20 22:06:05 +02:00
tomasklaen
cb542459bd Implement timeline_elements option 2022-08-20 21:28:30 +02:00
tomasklaen
f85d7cfcdc Prefix chapters and chapters_opacity options with timeline_ 2022-08-20 20:59:37 +02:00
tomasklaen
814edb52cb Implement line timeline style 2022-08-20 20:55:24 +02:00
Don Johnny
9830f3981c Fix subtitle loader not normalizing path correctly 2022-08-19 13:22:21 +02:00
christoph-heinrich
f2264a5bf2 Menu width configuration 2022-08-17 16:01:43 +02:00
tomasklaen
6c7d83b8ad Slim down the header 2022-08-17 09:51:51 +02:00
Christoph Heinrich
a003928611 Update dimensions only when necessary 2022-08-17 09:32:43 +02:00
Christoph Heinrich
52aa396087 Update menu offsets when dimensions change 2022-08-17 09:32:43 +02:00
Christoph Heinrich
81b5baaa43 Add chapter title to hovered time
Long titles are wrapped at a width of roughly 25 characters and
the titles are always shown in bold with a small additional spacing
between time and title.

Closes #85
2022-08-16 18:57:01 +02:00
Christoph Heinrich
1ba31c46c2 Remove goto for lua 5.1 compatiblity
goto was introduced in lua 5.2.
mpv supports lua 5.1, so user scripts should too.
2022-08-16 09:55:55 +02:00
Christoph Heinrich
8dffb8aded Correct speed scrolling direction
5f31a248ee overwrote the direction change
from 35f058d760. This corrects that.
2022-08-16 09:55:05 +02:00
Natural-Harmonia-Gropius
4148991490 better text_width_estimate 2022-08-15 11:06:54 +02:00
christoph-heinrich
5f31a248ee Allow speed to be modified by a factor 2022-08-15 10:22:15 +02:00
Christoph Heinrich
35f058d760 Consistant scrolling direction
Scrolling up to change a value is semantically associated with
increasing that value.
Volume already worked this way, and the same is true for seeking
by scrolling outside of the UI, but scrolling up on the timeline
seeked backwards and scrolling up on the speed widget reduced speed.
Now scrolling on the timeline or outside of the UI seeks in the same
direction and speed also increases when scrolling up on the widget.
2022-08-15 10:05:31 +02:00
Christoph Heinrich
b1c0466c11 Allow negative numbers for timeline_step
The restriction of only allowing positive numbers for `timeline_step`
has been lifted, allowing users to set negative numbers
if they want to reverse the scrolling direction of timeline seeking.
This was already possible for speed and volume.
2022-08-15 10:05:31 +02:00
Christoph Heinrich
4eb93bc25b Update subtitle, audio, video and chapter menu lists
The playlist menu list would reflect changes of the underlying data.
That now also happens for the menu lists of all three tracks as well as
chapters. Closes #21
2022-08-15 09:20:18 +02:00
Christoph Heinrich
377a5ef3c6 Allow creating empty folders
So far it was not possible to create an empty folder that was then was
later filled up with commands (or folders).
Because of that the structure of input.conf had to be based around
the menu.
By creating empty folders with the `ignore` command, that requirement
has been loosened a bit.
Trimming whitespace from `command` was necessary to check for "ignore".
2022-08-14 15:15:13 +02:00
Christoph Heinrich
77550ef999 Trim whitespace at the end of the context menu line 2022-08-14 15:15:13 +02:00
Natural-Harmonia-Gropius
a751449168 show volume-bar only when has_audio 2022-08-14 14:17:22 +02:00
Christoph Heinrich
ca885c9ec0 Add UI scaling
Fixes #81

Uses a new option `ui_scale` for scaling the UI as well as the
`display-hidpi-scale` property.
Has been inspired by the scaling in console.lua
2022-08-14 13:24:42 +02:00
Christoph Heinrich
3466ea5299 Fix menu crash when quickly repeatedly opening and closing submenu
Opening and closing a submenu very quickly very quickly
(smashing right and left arrow as fast as I possibly can)
resulted in a nil error.
2022-08-14 13:03:41 +02:00
Christoph Heinrich
3cff450016 Show more information for tracks 2022-08-14 12:42:25 +02:00
Christoph Heinrich
a07a43cd6b Fix hint width estimation
Use the actual font size of hints to estimate their width.
`item_content_spacing` is not needed in the calculation of `hint_width`,
because it is already considered in the calculation of `title_clip_x`,
otherwise we'll end up with twice the spacing.
2022-08-14 12:37:39 +02:00
Christoph Heinrich
276b590e07 Update and render on remaining time changes 2022-08-14 12:27:18 +02:00
Christoph Heinrich
17d400c442 Fix speed dial crash
When dragging the speed dial and letting go over the timeline,
`this:fadeout` was called, but that function does not exist.
Introduced in 755194352f
2022-08-14 12:04:50 +02:00
Christoph Heinrich
46b3b638c6 Fix menu selection initialization and scroll position
When the menu was initialized without items and then the items and
active item were set afterwards (like is the case with playlist),
then the initialization of the selection and scroll position would
not work.
2022-08-14 11:25:45 +02:00
Christoph Heinrich
f5873fa278 Remove 100ms leeway in chapter menu
Due to the 100 leeway, a chapter starting at 00:00 would not be active,
when the playback time also was 00:00.
2022-07-19 23:08:29 +02:00
Christoph Heinrich
bd34d77540 Fix initial invocation of pause indicator
When starting the player paused, the static pause indicator
was not shown.
Now starting a video paused will properly show the static indicator
and the flash indicator is only shown when the state actually changes.
2022-07-14 23:53:11 +02:00
Christoph Heinrich
0000e9a02e Automatically choose rendering frequency 2022-07-14 09:55:38 +02:00
Christoph Heinrich
2fb7e5348d Render on cache updates
The updated state of the cache was not visible when the player was
paused and not interacted with.

Now a render is requested on every cache update, which happens roughly
two times per second for me.
2022-07-12 08:38:32 +02:00
tomasklaen
945594b702 Try to use existing title property for playlist items 2022-06-27 09:29:11 +02:00