Commit Graph

686 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
christoph-heinrich
5e2c930551 feat: scroll to new position after moving item in menu (#552) 2023-05-05 08:50:17 +02:00
Eva
3369454a68 fix: take window_border_size into account for tooltip positioning (#554) 2023-05-04 23:26:28 +02:00
Eva
7b2f36efc1 fix: take window_border_size into account for thumbnail positioning (#553) 2023-05-04 23:24:21 +02:00
natural-harmonia-gropius
9960906abb fix: show empty placeholder for empty menus (#546) 2023-05-03 10:46:21 +02:00
Eva
85618617f7 fix: translate fallback chapter title (#540) 2023-04-28 09:15:25 +02:00
Eva
f4ef5e8990 fix: translate built-in menu titles (#539) 2023-04-27 14:51:50 +02:00
tomasklaen
618e4728f4 fix: remove redundant menu title translation 2023-04-27 08:48:42 +02:00
Eva
26b062d84f fix: update spanish, french, romanian translations (#537) 2023-04-26 20:36:58 +02:00
natural-harmonia-gropius
ff88fabdb6 fix: translate topbar when no file (#533) 2023-04-26 15:06:19 +02:00
natural-harmonia-gropius
6216f64ac8 fix: update simplified chinese translation (#534) 2023-04-26 15:06:04 +02:00
christoph-heinrich
c15164b390 feat: german translation (#532) 2023-04-26 15:02:56 +02:00
Eva
ec907cacc4 feat: romanian translation (#531) 2023-04-26 09:03:10 +02:00
Eva
c69df10164 tweak: handle plural in audio track list (#530) 2023-04-26 09:02:45 +02:00
Eva
e7f4989da1 fix: use string type for all translation formatting 2023-04-25 21:35:20 +02:00
Eva
1fb0528f9e fix: take parameter values into account when caching translations 2023-04-25 21:35:20 +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
tomasklaen
ec4e51e954 feat: dynamic localization strings and caching
`t()` now works as `string.format()` → `t('Foo %d %s', 42, 'bar')`
2023-04-25 10:01:57 +02:00
christoph-heinrich
1947f1b614 test: add chapter ranges pattern tests (#519) 2023-04-25 09:44:42 +02:00
Eva
64023fbb6c feat: spanish translation (#523) 2023-04-25 09:44:15 +02:00
Eva
987f2ea728 feat: french translation (#521) 2023-04-25 09:43:55 +02:00
natural-harmonia-gropius
cbbb40611e fix: en locale not working (#526) 2023-04-25 09:39:00 +02:00
natural-harmonia-gropius
55087ca3fa fix: language priority (#525) 2023-04-25 09:36:21 +02:00
Eva
398947d931 perf: cache menu title translation (#524) 2023-04-25 09:35:32 +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
christoph-heinrich
588609bf45 tweak: treat italic as a width offset rather then a factor (#506) 2023-04-15 10:30:23 +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
ebe512a69d fix: delayed seeking timer initialization placed in the wrong function 2023-04-07 08:57:46 +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
19f421f67c fix: premature thumbnail hiding during drag seeking 2023-03-29 23:13:51 +02:00
tomasklaen
21b37ce33b fix: submenus vertically misaligned when opened via show-submenu message
closes #459
2023-03-29 17:08:53 +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
tomasklaen
00daff7ca2 fix: hide thumbnail when dragging timeline
ref #358
2023-03-29 10:04:28 +02:00
tomasklaen
984f8aa2c8 feat: clicking on playlist indicator in top bar now opens playlist menu
closes #480, closes #481
2023-03-29 09:44:59 +02:00
christoph-heinrich
4dd9bf8a71 tweak: add padding to title (#484)
Long titles with short items would lead to the title touching the edge
of the menu, which doesn't look good. Adding padding like is already
with the items remedies this.
2023-03-29 09:13:35 +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