Skip to content

Commit

Permalink
Merge pull request #289 from Samillion/dev_json_locale_fix
Browse files Browse the repository at this point in the history
fix: improve button tooltip position for all locales (languages)
  • Loading branch information
Samillion authored Dec 31, 2024
2 parents 322f20e + 4a9db08 commit 249c76d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,20 @@ ModernZ supports mpv's built-in console/select ([v0.39+](https://github.com/mpv-

- [Download default modernz.conf](./modernz.conf)

2. Example short configuration:
2. Example of a short configuration:

```EditorConfig
# Seekbar colors (Hex format)
# Seekbar color (hex format)
seekbarfg_color=#B7410E
# Interface options
showplaylist=no
playlist_button=no
title=${media-title}
scalewindowed=1.0
windowcontrols=auto
window_top_bar=auto
```

For a full list of options, [check out the detailed user options here](docs/USER_OPTS.md).
For a full list of options, [check out the detailed list here](docs/USER_OPTS.md).

## Controls

Expand Down
2 changes: 1 addition & 1 deletion docs/TRANSLATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ModernZ currently has translations for the following languages:
"screenshot": "Screenshot",
"stats_info": "Information",
"cache": "Cache",
"buffering": "Buffering"
"buffering": "Buffering",
"zoom_in": "Zoom In",
"zoom_out": "Zoom Out",
"download": "Download",
Expand Down
2 changes: 1 addition & 1 deletion docs/USER_OPTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Create `modernz.conf` in your mpv script-opts directory:

| Option | Value | Description |
| ------------------------ | -------- | -------------------------------------------------------------------------- |
| seekbarhandlesize | 0.8 | size ratio of the seekbar handle (range: 0 ~ 1) |
| seekbarhandlesize | 0.7 | size ratio of the seekbar handle (range: 0 ~ 1) |
| handle_always_visible | no | control handle visibility: `yes` always visible, `no` show on slider hover |
| seekrange | yes | show seek range overlay |
| seekrangealpha | 150 | transparency of the seek range |
Expand Down
14 changes: 7 additions & 7 deletions extras/locale/modernz-locale.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"screenshot": "Capture d'écran",
"stats_info": "Informations",
"cache": "Cache",
"buffering": "Chargement"
"buffering": "Chargement",
"zoom_in": "Agrandir",
"zoom_out": "Rétrécir",
"download": "Télécharger",
Expand All @@ -45,7 +45,7 @@
"screenshot": "Bildschirmaufnahme",
"stats_info": "Informationen",
"cache": "Zwischenspeicher",
"buffering": "Pufferung"
"buffering": "Pufferung",
"zoom_in": "Vergrößern",
"zoom_out": "Verkleinern",
"download": "Herunterladen",
Expand All @@ -72,7 +72,7 @@
"screenshot": "Captura de pantalla",
"stats_info": "Información",
"cache": "Caché",
"buffering": "Cargando"
"buffering": "Cargando",
"zoom_in": "Ampliar",
"zoom_out": "Reducir",
"download": "Descargar",
Expand All @@ -99,7 +99,7 @@
"screenshot": "Zrzut ekranu",
"stats_info": "Informacja",
"cache": "Pamięć podręczna",
"buffering": "Buforowanie"
"buffering": "Buforowanie",
"zoom_in": "Powiększ",
"zoom_out": "Pomniejsz",
"download": "Pobierz",
Expand All @@ -126,7 +126,7 @@
"screenshot": "スクリーンショット",
"stats_info": "情報",
"cache": "キャッシュ",
"buffering": "読み込み中"
"buffering": "読み込み中",
"zoom_in": "拡大",
"zoom_out": "縮小",
"download": "ダウンロード",
Expand All @@ -153,7 +153,7 @@
"screenshot": "截屏",
"stats_info": "信息",
"cache": "缓存",
"buffering": "缓冲中"
"buffering": "缓冲中",
"zoom_in": "放大",
"zoom_out": "缩小",
"download": "下载",
Expand All @@ -180,7 +180,7 @@
"screenshot": "لقطة شاشة",
"stats_info": "معلومات",
"cache": "ذاكرة التخزين المؤقت",
"buffering": "جار التحميل"
"buffering": "جار التحميل",
"zoom_in": "تكبير",
"zoom_out": "تصغير",
"download": "تنزيل",
Expand Down
2 changes: 1 addition & 1 deletion modernz.conf
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ tooltip_hints=yes

# Progress bar settings
# size ratio of the seekbar handle (range: 0 ~ 1)
seekbarhandlesize=0.8
seekbarhandlesize=0.7
# control handle visibility: "yes" always visible, "no" show on slider hover
handle_always_visible=no
# show seek range overlay
Expand Down
6 changes: 3 additions & 3 deletions modernz.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1275,11 +1275,11 @@ local function render_elements(master_ass)
if mouse_hit(element) then
local tooltiplabel = element.tooltipF
local an = 1
local ty = element.hitbox.y1
local ty = element.hitbox.y1 - 2
local tx = get_virt_mouse_pos()

if ty < osc_param.playresy / 2 then
ty = element.hitbox.y2
ty = element.hitbox.y2 - 2
an = 7
end

Expand All @@ -1295,7 +1295,7 @@ local function render_elements(master_ass)
end

if tx > osc_param.playresx / 2 then --move tooltip to left side of mouse cursor
tx = tx - string.len(tooltiplabel) * 8
tx = tx - string.len(tooltiplabel) * 3
end

elem_ass:new_event()
Expand Down

0 comments on commit 249c76d

Please sign in to comment.