Commit Graph

276 Commits

Author SHA1 Message Date
tomasklaen
128c76c3ba feat: menu items now accept selectable and align options
Allows creating placeholder items like "Empty" that can't be selected or clicked.
2023-05-15 11:22:53 +02:00
tomasklaen
9c544bf565 fix: removed add-intl-directory API
It doesn't make sense for uosc to be the internationalization provider for other scripts.
2023-05-15 09:51:16 +02:00
tomasklaen
fb1268f0e4 fix: don't translate strings from input.conf
closes #561
2023-05-15 09:39:07 +02:00
Eva
f4ef5e8990 fix: translate built-in menu titles (#539) 2023-04-27 14:51:50 +02:00
Eva
23abd31025 tweak: include number in fallback edition title (#529) 2023-04-25 21:28:20 +02:00
Eva
f403f92c1d fix: translate audio channels and devices list (#520) 2023-04-25 19:21:51 +02:00
tomasklaen
e23eea6e43 feat: add-intl-directory APi for scripts to extend localization 2023-04-25 10:51:39 +02:00
natural-harmonia-gropius
3c70ffd927 feat: internationalization (#518)
Adds `languages` option to specify localization language priority.
Built in languages can be found in `scripts/uosc_shared/intl`.
2023-04-24 11:37:58 +02:00
christoph-heinrich
f274101fbd fix: failing to detect macos platform (#513)
With the change to use the new `platform` property,
the platform 'macos' also got renamed to 'darwin',
but the platform checks were not adjusted to the new name.
2023-04-19 09:11:56 +02:00
christoph-heinrich
3d55917068 tweak: elements with min_visibility > 0.5 cause a margin (#508) 2023-04-16 00:04:17 +02:00
tomasklaen
ec52252380 4.7.0 2023-04-15 10:34:30 +02:00
tomasklaen
a0b18eabec fix: uncalled for autohide timer triggering on init 2023-04-10 22:24:13 +02:00
tomasklaen
e1b663f930 fix: unloading a file to idle was causing stale current directory path
closes #502
2023-04-10 22:07:58 +02:00
christoph-heinrich
6d58ef4c99 feat: apply margin to osd-margin-* (#499)
* feat: apply margin to `osd-margin-y` and `osd-margin-x`

The margins were already set for `osc-margins` and
`user-data/osc/margins`, but osd messages have their own properties
`osd-margin-x` and `osd-margin-y`.
Offsetting `osd-margin-x` and `osd-margin-y` by our margin prevents
overlap of osd messages with the GUI.
2023-04-09 08:48:15 +02:00
tomasklaen
50c9629538 refactor: removed unused function param 2023-04-07 09:01:56 +02:00
tomasklaen
fac2370208 fix: more timeline seeking, dragging, and autohide related tweaks and fixes
Includes how mouse events are dispatched which now handles deduplication and ensures `down` event won't fine `move` as well, which was causing exact and slow seeks in quick succession when clicking on timeline without moving the mouse, causing glitchy looking seeking.

ref #496
2023-04-06 10:47:09 +02:00
tomasklaen
8d85068b7c fix: cursor events not refreshing autohide timer
ref #496
2023-04-05 17:10:37 +02:00
tomasklaen
808fa59418 fix: autohide un-registering cursor events when menu is open
closes #495
2023-04-03 21:53:30 +02:00
christoph-heinrich
5fbfac3eca fix: only enable/disable mouse keybinds when they change (#492)
The keybindings 'mbtn_left' and 'wheel' were enabled/disabled on every
render, resulting in log files being spammed with corresponding debug
messages.
To avoid that only call the enable/disable function when the current
decision is different to the last one.
2023-04-02 09:05:21 +02:00
tomasklaen
bcb3c811ca fix: image disposition returning false positives
closes #458
2023-03-29 11:09:00 +02:00
tomasklaen
08734f1dda refactor: use mpv's new platform prop to detect platform
closes #462
2023-03-29 10:41:12 +02:00
Tomas Klaen
f635df18f7 refactor: cursor events consolidated into one interface (#483)
`mbtn_left` and `wheel` events are now only fired on a `cursor.on_{event}` object, which resets at the beginning of each frame, so elements need to bind these listeners in their render functions. These properties are overwritable which allows elements to take over cursor event handling from their parents if necessary.
2023-03-29 09:08:18 +02:00
tomasklaen
9839e7b726 fix: elements staying visible after switching to fullscreen
closes #482
2023-03-27 16:54:38 +02:00
tomasklaen
02228282be refactor: uppercase constants 2023-03-27 16:52:32 +02:00
xfzv
1ed8a7a823 fix: add ac3 to audio types (#468) 2023-03-04 16:20:51 +01:00
christoph-heinrich
cb14638ae0 fix: use the new console margins API
A recently merged PR https://github.com/mpv-player/mpv/pull/11226 made
the console use the new user-data property instead of
shared-script-properties, resulting in our margins being ignored.

This sets the `user-data/osc/margins` property in addition to the old
shared-script-property to keep compatiblity with older mpv versions.
2023-02-27 09:45:30 +01:00
tomasklaen
f039af5732 feat: added menu keybinds to move and delete items in playlists
`ctrl+up/down` moves a selected item up/down, and `del` deletes it.
2023-02-20 16:12:22 +01:00
tomasklaen
94ec120923 4.6.0 2023-02-15 09:59:39 +01:00
christoph-heinrich
30d6e12001 feat: add on_close command to menu API (#449) 2023-02-07 08:45:04 +01:00
tomasklaen
75de632fbd fix: 54bb9d6 prevented loading audio/subtitle tracks from other video files
closes #442
2023-01-30 18:11:32 +01:00
christoph-heinrich
fd54373be8 fix: infinite margin on initialization (#362) 2023-01-30 14:41:05 +01:00
tomasklaen
543c4a71f1 feat: added autoload_types option
Controls what file types to look for when deciding next file to play.

Comma separated list of: `video`, `audio`, `image`, `subtitle`

closes #387
2023-01-30 12:57:05 +01:00
tomasklaen
54bb9d6a77 feat: split media_types option into video_types, audio_types, and image_types 2023-01-30 11:44:15 +01:00
tomasklaen
7647cac9f8 feat: trim unnecessary 00: from timestamps in durations shorter than an hour
closes #401
2023-01-30 10:58:22 +01:00
tomasklaen
9ebc600d37 feat: added show-submenu-blurred message listener
closes #441
2023-01-30 10:14:39 +01:00
tomasklaen
32cc283397 feat: flash top bar when new file is loaded
closes #380
2023-01-18 12:15:14 +01:00
tomasklaen
8183163f2a feat: added options to display alternative top bar title
Added option `top_bar_alt_title`, which accepts an alternative title template to be displayed, and `top_bar_alt_title_place` that controls where it should be displayed. It can be either `below` to place it below the main one, or `toggle` to show it in place of the main title when user clicks the top bar or calls the `toggle-title` binding.

The `top_bar_title` now also accepts a custom top bar title template if user wants it to be different from the one defined in `mpv.conf`.

closes #402
2023-01-18 12:06:10 +01:00
Tomas Klaen
c5ccd1b4ef feat: added an API to overwrite uosc key bindings (#430)
This allows 3rd party scripts to replace the handling of built in uosc key bindings with their own logic.

Example that replaces uosc's basic stream quality menu with christoph-heinrich/mpv-quality-menu:

```lua
mp.commandv('script-message-to', 'uosc', 'overwrite-binding', 'stream-quality', 'script-binding quality_menu/video_formats_toggle')
```
2023-01-18 09:48:31 +01:00
christoph-heinrich
11f9067182 fix: mouse-pos can be nil (#418) 2023-01-05 15:57:30 +01:00
christoph-heinrich
5a02c6d205 fix: touch input (#412)
`mouse-pos.hover` may or may not be false during touch input
(contrary to mouse input, where false means the cursor left the window)

Detecting a change to false as a leave event, while allowing any
other mouse-pos update to cause an enter event solves this.
2023-01-02 08:51:49 +01:00
Michael
e66c8fbf88 feat: added destination_time option and deprecated total_time (#399)
`destination_time` accepts one of `total`, `playtime-remaining` (scaled by the current speed), `time-remaining` (remaining length of file).

`total_time` is deprecated, but still works as expected.
2022-12-27 09:17:12 +01:00
xfzv
ea371b5740 fix: add dts to media_types (#398) 2022-12-24 10:41:45 +01:00
dyphire
e33db65c1c feat: add use_trash option (#394) 2022-12-23 15:51:37 +01:00
tomasklaen
17c8ed6291 4.5.0 2022-12-07 18:14:11 +01:00
christoph-heinrich
4ef8ff55bb fix: always enabled cache triggering uncached ranges (#385) 2022-12-06 23:18:36 +01:00
christoph-heinrich
8b863a611f fix: osd resolution initializing incorrectly (#383)
* fix: only update resolution when it's > 0

* fix: only render after the resolution has been initialized

* chore: update type annotation to fix warning
2022-12-04 09:09:20 +01:00
tomasklaen
107e758144 fix: open-config-directory not opening correct folder on windows
closes #365
2022-11-11 09:45:14 +01:00
tomasklaen
5f5bf4b842 fix: file menu not updating active item and other menu issues
- Preselecting previous folder wasn't working sometimes.
- `join_path()` didn't account for drive letters already having a separator.

Also refactors how `open_file_navigation_menu()` stores menu items value. As a side effect this is now a lot faster as we don't have to serialize each item's path into meta table, but instead we now store just a path string and handle it as needed.

closes #355
2022-10-31 11:10:25 +01:00
tomasklaen
e8060c74ad refactor: don't overwrite default libraries and expose join_path() and path_separator() types 2022-10-31 09:47:46 +01:00
tomasklaen
64feeb04b7 4.4.0 2022-10-28 22:25:04 +02:00