Skip to content

Commit b903ab6

Browse files
committed
Several updates for the audio file preview feature
1 parent b735566 commit b903ab6

File tree

5 files changed

+54
-1
lines changed

5 files changed

+54
-1
lines changed

res/main/i18n/default/actions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
"export_settings_to_clipboard": "Export settings to clipboard",
3030
"export_settings_to_file": "Export settings to file...",
3131

32+
"file_preview": {
33+
"pause": "Pause",
34+
"play": "Play",
35+
"stop": "Stop"
36+
},
37+
3238
"font_scaling": {
3339
"select": "Font scaling",
3440
"value:pc": "{@value} %",

res/main/i18n/default/labels.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,14 @@
218218
},
219219
"file_list": "File list",
220220
"file_name": "File name",
221-
"file_preview": "File preview",
221+
"file_preview": {
222+
"": "File preview",
223+
"audio_channels": "Audio channels:",
224+
"auto_play": "Automatic play",
225+
"duration": "Duration:",
226+
"sample_format": "Sample format:",
227+
"sample_rate": "Sample rate:"
228+
},
222229
"filter": "Filter",
223230
"filters": "Filters",
224231

res/main/schema/modern.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,6 +1635,16 @@
16351635
</style>
16361636

16371637
<style class="FileDialog::FileList" parents="ListBox"></style>
1638+
1639+
<style class="FileDialog::FilePreview::Heading" parents="Label">
1640+
<allocation.hfill value="true" />
1641+
<text.layout.halign value="-1" />
1642+
<font.bold value="true" />
1643+
</style>
1644+
1645+
<style class="FileDialog::FilePreview::Value" parents="Label">
1646+
<text.layout.halign value="-1" />
1647+
</style>
16381648

16391649
<style class="FileDialog::FilterComboBox" parents="ComboBox">
16401650
<color value="bg_light"/>

res/main/ui/about.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<?xml version="1.0"?>
2+
13
<window ui:inject="AboutDialog" title="titles.about">
24
<grid rows="2" cols="2" spacing="8" expand="true" fill="true">
35
<align halign="0" valign="-1">

res/main/ui/audio_file_preview.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0"?>
2+
3+
<preview halign="-1" valign="-1">
4+
<vbox>
5+
<label ui:inject="FileDialog::FilePreview::Heading" text="labels.file_preview.audio_channels" hfill="true" />
6+
<label ui:inject="FileDialog::FilePreview::Value" ui:id="audio_channels" />
7+
<label ui:inject="FileDialog::FilePreview::Heading" text="labels.file_preview.sample_rate" />
8+
<label ui:inject="FileDialog::FilePreview::Value" ui:id="sample_rate" />
9+
<label ui:inject="FileDialog::FilePreview::Heading" text="labels.file_preview.sample_format" />
10+
<label ui:inject="FileDialog::FilePreview::Value" ui:id="sample_format" />
11+
<label ui:inject="FileDialog::FilePreview::Heading" text="labels.file_preview.duration" />
12+
<label ui:inject="FileDialog::FilePreview::Value" ui:id="duration" />
13+
14+
<grid rows="3" cols="2">
15+
<cell cols="2">
16+
<fader ui:id="play_position" />
17+
</cell>
18+
<button ui:id="play_pause" text="actions.file_preview.play" />
19+
<button ui:id="stop" text="actions.file_preview.stop" />
20+
<cell cols="2">
21+
<hbox>
22+
<check ui:id="auto_play" id="_ui_preview_auto_play" />
23+
<label text="labels.file_preview.auto_play" />
24+
</hbox>
25+
</cell>
26+
</grid>
27+
</vbox>
28+
</preview>

0 commit comments

Comments
 (0)