Commit Graph

84 Commits

Author SHA1 Message Date
tomasklaen
273374f4bd feat!: changed peek-{x} commands to toggle-{x}
Previously, all of the `peek-{element}` commands such as `peek-ui` would force the elements' visibility only until pressed again, OR MOUSE MOVED. This was sometimes annoying (small mouse movements would reset it), and limiting, for no really good reason.

With this, the commands are renamed to `toggle-{x}`, and toggle each element's permanent `min_visibility` between `0` and `1`.

ref #48
2022-09-19 16:25:32 +02:00
tomasklaen
08d4dd9e4d fix: removed leftover ending uncached range on some streams
The end time of the last cached range on fully buffered video is sometimes lower than reported duration, which was causing a redundant uncached range indicator at the end of the timeline.

ref #214
2022-09-19 15:00:49 +02:00
tomasklaen
c8f4f22d15 feat: added counters and other badges to control buttons
Implements control element `#{badge}` syntax. Example:

```
command:subtitles:script-binding uosc/subtitles#sub?Subtitles
```

ref #212
2022-09-19 14:47:14 +02:00
tomasklaen
b610b6cda5 fix: work around mpv's cycle window-maximized quirks
closes #203
2022-09-19 12:28:17 +02:00
tomasklaen
bc79205951 feat: display buffered time in timeline
closes #208
2022-09-19 11:37:08 +02:00
tomasklaen
e54744b475 refactor: assorted tweaks 2022-09-19 09:55:33 +02:00
tomasklaen
bfa322b7c3 fix: glitchy uncached ranges texture rendering
closes #215
2022-09-19 09:11:10 +02:00
christoph-heinrich
3deb8dbb52 refactor: move chapter and chapter ranges stuff around (#201) 2022-09-18 18:54:11 +02:00
tomasklaen
36dd0a622d feat!: convert timeline_chapters option into timeline_chapters_opacity
Controls opacity of chapter indicators with option to disable completely when set to `0`.

ref #206
2022-09-18 15:15:28 +02:00
tomasklaen
f6cad02037 fix: control element command broken when overriding shorthand title
ref #210
2022-09-18 14:51:18 +02:00
tomasklaen
3c85721f1a feat!: improve chapters rendering style
All of the old styles had visibility issues, and rendering code was a bit too overcomplicated. This fixes all if it by rendering chapters as diamond indicators on top of the timeline.

`timeline_chapters` option is now a boolean, and `timeline_chapters_opacity` & `timeline_chapters_width` have been removed.

This means chapter rendering is no longer configurable, as they resize based on timeline size, and inherit its opacity and border size, so I don't see what anyone would want to configure here, but I'm sure I'll get some requests as always :'(.

ref #206
2022-09-18 14:26:01 +02:00
tomasklaen
852b724b6a fix: timeline dragging not released when file is closed
closes #211
2022-09-18 13:14:12 +02:00
Zhong Lufan
d1f2f70227 fix: overriding control shorthand tooltip not working (#210) 2022-09-18 13:10:44 +02:00
tomasklaen
3793fa574a fix: font_bold options being ignored
closes #209
2022-09-18 13:05:29 +02:00
tomasklaen
fc4caee11e fix: removed leftover debugging code 2022-09-18 00:21:59 +02:00
tomasklaen
63b7573bde refactor!: removed color_ prefixes from options 2022-09-18 00:21:36 +02:00
tomasklaen
54e525c836 refactor: renamed from parse_ to serialize_chapters() 2022-09-18 00:15:40 +02:00
tomasklaen
c909409254 feat!: added textures to improve indicators and other visuals
Removes `timeline_cached_ranges` option.

closes #206
2022-09-18 00:11:21 +02:00
dyphire
32011e46d6 feat: add has_sub and has_chapter dispositions (#207) 2022-09-16 09:09:56 +02:00
tomasklaen
11668536cc style: code style reflow 2022-09-15 13:36:13 +02:00
Zhong Lufan
adead0f0e5 fix: menu item parser ignoring input-conf config (#204) 2022-09-15 13:15:03 +02:00
christoph-heinrich
16f75fb748 fix: text should be opaque (#202) 2022-09-15 08:48:51 +02:00
christoph-heinrich
a57c827242 fix: react to changes in the title property (#199) 2022-09-15 08:44:14 +02:00
christoph-heinrich
cf43630069 fix: mouse input with fractional scaling (#200)
Closes #192
2022-09-15 08:43:24 +02:00
christoph-heinrich
e7710128fe fix: rectangle borders not inheriting opacity (#195)
This caused problems with the opacity for speed notches.
2022-09-14 17:25:54 +02:00
tomasklaen
2f297c2834 feat: mouse wheel on menu now scrolls by 3 items at a time 2022-09-14 16:49:57 +02:00
tomasklaen
85b49002a8 feat: remove title option, use mpv's title config instead
ref #177
2022-09-14 16:45:57 +02:00
tomasklaen
fefe5f01d8 feat: added title option
ref #177
2022-09-14 16:29:10 +02:00
tomasklaen
d99194d297 feat: added peek-ui, peek-volume, and peek-top-bar commands
ref #48
2022-09-14 15:05:45 +02:00
tomasklaen
b87a9a59f4 feat: added text_border option
Controls border of any text or icon when drawn on top of video.

ref #185
2022-09-14 14:14:45 +02:00
tomasklaen
1f18b8b751 feat: improve volume slider visuals
I wanted to round the nudge as well, but thats just too much math and bezier curves.
2022-09-14 13:53:30 +02:00
christoph-heinrich
3d21df656b fix: menu ignoring parent opacity option (#196)
* fix: parent menu opacity
* fix: menu preview opacity
* fix: menu scrollbar opacity
2022-09-14 09:02:35 +02:00
christoph-heinrich
4b496b162d fix: menu hint_width calculated from title (#194) 2022-09-14 08:49:58 +02:00
Christoph Heinrich
18e6204317 fix: timeline not using real time width
Chapters and cache used the time width calculated from the time padding,
which was a rounded value, instead of the time width that is used for
the progress indicator and the time calculation for mouse input.

This led to e.g. the chapter line for a chapter at 0s being rendered one
pixel too far to the right.

Now the time_x and time_width are the same as in the other calculations
and the chapter and cache components decide for themselves how to deal
with that.

Chapter indicators are now correctly positioned, even at the extremes.

Cache now starts and ends exactly where the center pixel for the
progress line would be. This is inclusive, so e.g. for a 3 pixel wide
progress line, time would start 1.5 pixels in, but cache starts 1 pixel
in. This is to have clean edges for the cache at the start and the end.

The padding indicator for the cache is now moved one pixel outside of
the cache range instead of overlapping with the beginning and the end,
basically making the cache go from one wall to the other.
2022-09-13 22:22:39 +02:00
Christoph Heinrich
36dfebca52 fix: chapter line intersection not using rounded values
Lines used rounded coordinates for clean lines outside of the progress
indicator, but still used the non rounded ones when overlapping.
2022-09-13 22:22:39 +02:00
christoph-heinrich
1381d119c6 fix: pixel to time calculation (#172)
While things were sort of fine with `timeline_style=line`,
it was impossible to set the time to 0% or 100% when using
`timeline_style=bar`.
2022-09-13 21:59:02 +02:00
christoph-heinrich
44db2ac18f fix: has_playlist control disposition (#186)
Also replace all
`get_property_native('playlist-count')` with `state.playlist_count`
and all `state.playlist_count > 1` with `state.has_playlist`.
2022-09-13 21:49:12 +02:00
tomasklaen
e994867799 fix: TopBar not initializing all the values it needs
closes #193
2022-09-13 21:41:21 +02:00
tomasklaen
ebccd11328 feat!: consolidate all *_font_scale options into one font_scale
ref #185
2022-09-13 17:55:31 +02:00
tomasklaen
e8239e88c9 fix: menu item hint clipping not accounting for spacing
closes #191
2022-09-13 13:43:09 +02:00
tomasklaen
a110ddcc95 fix: shift+enter in menus was not bound to soft opening items 2022-09-13 13:33:52 +02:00
tomasklaen
fc8c554f85 fix: broken active item indexes in self updating menus 2022-09-13 13:24:48 +02:00
tomasklaen
bf012b2485 fix: volume position sometimes not adjusting to controls 2022-09-13 12:35:11 +02:00
tomasklaen
b98e58654d fix: controls bar invisible when timeline disabled while hovered
ref #188
2022-09-13 12:11:35 +02:00
tomasklaen
7f05a75db4 fix: top bar buttons not inheriting top bar visibility 2022-09-13 11:56:47 +02:00
tomasklaen
386953b78e tweak: switch to round icons 2022-09-13 11:48:49 +02:00
christoph-heinrich
079b0a4f50 fix: is_protocol() not returning a boolean (#180)
Returning a string instead of a boolean is fine in most cases,
but if the result gets compared against a boolean this breaks things.
2022-09-13 11:12:20 +02:00
tomasklaen
56a60629e1 fix: control bar buttons loosing focus on item load
closes #190
2022-09-13 10:25:50 +02:00
tomasklaen
193f0706af refactor!: active and selected_index menu API
Allows multiple items in a menu to be `active`. `select` flag is no longer on the item, but moved to the menu properties as `selected_index`.
2022-09-13 10:22:36 +02:00
tomasklaen
aeac6523d6 feat: add update-menu API
closes #171
2022-09-13 00:11:30 +02:00