feat(qt): opt-in ±10 s skip buttons beside Previous and Next
Settings > Appearance > Player & Visuals, mirrored on QbzPlayer.showSkipTen; hidden on hosts too narrow for the cluster. cc
This commit is contained in:
15 files changed
+187
No files matched your search
@@ -7495,3 +7495,19 @@ msgstr "Gastkünstler in Titelzeilen anzeigen"
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Append \"feat. …\" with the track's featured performers to the artist line of Qobuz track rows. Off by default."
|
||||
msgstr "Hängt \"feat. …\" mit den Gastinterpreten des Titels an die Künstlerzeile der Qobuz-Titelzeilen an. Standardmäßig aus."
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Show 10-second skip buttons"
|
||||
msgstr "Schaltflächen für 10-Sekunden-Sprünge anzeigen"
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Add ±10 s buttons beside Previous and Next in the player bar."
|
||||
msgstr "Fügt ±10-s-Schaltflächen neben Zurück und Weiter in der Player-Leiste hinzu."
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Back 10 seconds"
|
||||
msgstr "10 Sekunden zurück"
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Forward 10 seconds"
|
||||
msgstr "10 Sekunden vor"
|
||||
@@ -3121,3 +3121,19 @@ msgstr "Show featured artists in track rows"
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Append \"feat. …\" with the track's featured performers to the artist line of Qobuz track rows. Off by default."
|
||||
msgstr "Append \"feat. …\" with the track's featured performers to the artist line of Qobuz track rows. Off by default."
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Show 10-second skip buttons"
|
||||
msgstr "Show 10-second skip buttons"
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Add ±10 s buttons beside Previous and Next in the player bar."
|
||||
msgstr "Add ±10 s buttons beside Previous and Next in the player bar."
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Back 10 seconds"
|
||||
msgstr "Back 10 seconds"
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Forward 10 seconds"
|
||||
msgstr "Forward 10 seconds"
|
||||
@@ -7501,3 +7501,19 @@ msgstr "Mostrar artistas invitados en las filas de pistas"
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Append \"feat. …\" with the track's featured performers to the artist line of Qobuz track rows. Off by default."
|
||||
msgstr "Añade \"feat. …\" con los intérpretes invitados de la pista a la línea de artista en las filas de pistas de Qobuz. Desactivado por defecto."
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Show 10-second skip buttons"
|
||||
msgstr "Mostrar botones de salto de 10 segundos"
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Add ±10 s buttons beside Previous and Next in the player bar."
|
||||
msgstr "Añade botones de ±10 s junto a Anterior y Siguiente en la barra del reproductor."
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Back 10 seconds"
|
||||
msgstr "Retroceder 10 segundos"
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Forward 10 seconds"
|
||||
msgstr "Adelantar 10 segundos"
|
||||
@@ -7493,3 +7493,19 @@ msgstr "Afficher les artistes invités dans les lignes de piste"
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Append \"feat. …\" with the track's featured performers to the artist line of Qobuz track rows. Off by default."
|
||||
msgstr "Ajoute « feat. … » avec les interprètes invités du morceau sur la ligne d'artiste des lignes de piste Qobuz. Désactivé par défaut."
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Show 10-second skip buttons"
|
||||
msgstr "Afficher les boutons de saut de 10 secondes"
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Add ±10 s buttons beside Previous and Next in the player bar."
|
||||
msgstr "Ajoute des boutons ±10 s à côté de Précédent et Suivant dans la barre de lecture."
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Back 10 seconds"
|
||||
msgstr "Reculer de 10 secondes"
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Forward 10 seconds"
|
||||
msgstr "Avancer de 10 secondes"
|
||||
@@ -7476,3 +7476,19 @@ msgstr "トラック行にフィーチャリングアーティストを表示"
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Append \"feat. …\" with the track's featured performers to the artist line of Qobuz track rows. Off by default."
|
||||
msgstr "Qobuz のトラック行のアーティスト欄に、フィーチャリングされた演奏者を「feat. …」として追加します。既定ではオフです。"
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Show 10-second skip buttons"
|
||||
msgstr "10秒スキップボタンを表示"
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Add ±10 s buttons beside Previous and Next in the player bar."
|
||||
msgstr "プレーヤーバーの「前へ」「次へ」の横に ±10 秒ボタンを追加します。"
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Back 10 seconds"
|
||||
msgstr "10秒戻る"
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Forward 10 seconds"
|
||||
msgstr "10秒進む"
|
||||
@@ -7483,3 +7483,19 @@ msgstr "Gastartiesten in trackregels tonen"
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Append \"feat. …\" with the track's featured performers to the artist line of Qobuz track rows. Off by default."
|
||||
msgstr "Voegt \"feat. …\" met de gastartiesten van de track toe aan de artiestregel van Qobuz-trackregels. Standaard uit."
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Show 10-second skip buttons"
|
||||
msgstr "Knoppen voor 10 seconden springen tonen"
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Add ±10 s buttons beside Previous and Next in the player bar."
|
||||
msgstr "Voegt ±10 s-knoppen toe naast Vorige en Volgende in de spelerbalk."
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Back 10 seconds"
|
||||
msgstr "10 seconden terug"
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Forward 10 seconds"
|
||||
msgstr "10 seconden vooruit"
|
||||
@@ -7493,3 +7493,19 @@ msgstr "Mostrar artistas convidados nas linhas de faixa"
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Append \"feat. …\" with the track's featured performers to the artist line of Qobuz track rows. Off by default."
|
||||
msgstr "Acrescenta \"feat. …\" com os intérpretes convidados da faixa à linha do artista nas linhas de faixa do Qobuz. Desligado por padrão."
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Show 10-second skip buttons"
|
||||
msgstr "Mostrar botões de salto de 10 segundos"
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Add ±10 s buttons beside Previous and Next in the player bar."
|
||||
msgstr "Adiciona botões de ±10 s ao lado de Anterior e Seguinte na barra do reprodutor."
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Back 10 seconds"
|
||||
msgstr "Recuar 10 segundos"
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Forward 10 seconds"
|
||||
msgstr "Avançar 10 segundos"
|
||||
@@ -7514,3 +7514,19 @@ msgstr "Показывать приглашённых артистов в стр
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Append \"feat. …\" with the track's featured performers to the artist line of Qobuz track rows. Off by default."
|
||||
msgstr "Добавляет «feat. …» с приглашёнными исполнителями трека к строке артиста в строках треков Qobuz. По умолчанию выключено."
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Show 10-second skip buttons"
|
||||
msgstr "Показывать кнопки перемотки на 10 секунд"
|
||||
|
||||
#: qbz-qt/qml/settings/AppearanceSettings.qml
|
||||
msgid "Add ±10 s buttons beside Previous and Next in the player bar."
|
||||
msgstr "Добавляет кнопки ±10 с рядом с «Назад» и «Вперёд» на панели воспроизведения."
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Back 10 seconds"
|
||||
msgstr "Назад на 10 секунд"
|
||||
|
||||
#: qbz-qt/qml/shell/TransportControls.qml
|
||||
msgid "Forward 10 seconds"
|
||||
msgstr "Вперёд на 10 секунд"
|
||||
@@ -289,6 +289,14 @@ Column {
|
||||
onToggled: function (v) { QbzBridge.settingsBool("show-volume-steppers", v) }
|
||||
}
|
||||
}
|
||||
SettingRow { kioskHost: root.kioskHost;
|
||||
label: QbzSession.tr("Show 10-second skip buttons", QbzSession.trRev)
|
||||
description: QbzSession.tr("Add ±10 s buttons beside Previous and Next in the player bar.", QbzSession.trRev)
|
||||
QbzToggle { kioskHost: root.kioskHost;
|
||||
checked: root.doc.showSkipTen === true
|
||||
onToggled: function (v) { QbzBridge.settingsBool("show-skip-ten", v) }
|
||||
}
|
||||
}
|
||||
SettingRow { kioskHost: root.kioskHost;
|
||||
label: QbzSession.tr("Startup page", QbzSession.trRev)
|
||||
description: QbzSession.tr("Choose which page to show when the app starts", QbzSession.trRev)
|
||||
|
||||
@@ -320,6 +320,7 @@ Rectangle {
|
||||
id: centreTransport
|
||||
anchors.centerIn: parent
|
||||
height: 34
|
||||
compact: root.width < 900
|
||||
playCircle: false
|
||||
favorite: root.npFavorite
|
||||
ephemeral: root.npEphemeral
|
||||
|
||||
@@ -605,6 +605,7 @@ Rectangle {
|
||||
TransportControls {
|
||||
id: classicTransport
|
||||
visible: root.isClassic
|
||||
compact: root.width < 1100
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
playCircle: false
|
||||
@@ -630,6 +631,7 @@ Rectangle {
|
||||
TransportControls {
|
||||
id: centreTransport
|
||||
visible: !root.isClassic
|
||||
compact: root.width < 1366
|
||||
anchors.centerIn: parent
|
||||
playCircle: true
|
||||
favorite: root.npFavorite
|
||||
|
||||
@@ -27,6 +27,10 @@ Row {
|
||||
property bool ephemeral: false
|
||||
/// AppShell's one shared hover-tooltip overlay.
|
||||
property var tooltip: null
|
||||
/// A host whose zone cannot fit the ±10 s pair (see PlayerBar's column
|
||||
/// budget) sets this; the pair then hides even with the pref on.
|
||||
property bool compact: false
|
||||
readonly property bool skipTenVisible: QbzPlayer.showSkipTen && !tc.compact
|
||||
|
||||
/// Emitted by "+" with the button as anchor, so the flyout is owned
|
||||
/// by the bar (one menu, both mount points).
|
||||
@@ -94,6 +98,16 @@ Row {
|
||||
}
|
||||
}
|
||||
|
||||
QbzIconButton {
|
||||
visible: tc.skipTenVisible
|
||||
name: "skip-back-10"
|
||||
btnEnabled: QbzPlayer.npHasTrack
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: QbzPlayer.seekBy(-10)
|
||||
tooltip: tc.tooltip
|
||||
tooltipKey: "npb-skip-back-10"
|
||||
tooltipText: QbzSession.tr("Back 10 seconds", QbzSession.trRev)
|
||||
}
|
||||
QbzIconButton {
|
||||
name: "skip-back"
|
||||
btnEnabled: QbzPlayer.npHasTrack
|
||||
@@ -166,6 +180,16 @@ Row {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: QbzPlayer.next()
|
||||
}
|
||||
QbzIconButton {
|
||||
visible: tc.skipTenVisible
|
||||
name: "skip-forward-10"
|
||||
btnEnabled: QbzPlayer.npHasTrack
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: QbzPlayer.seekBy(10)
|
||||
tooltip: tc.tooltip
|
||||
tooltipKey: "npb-skip-forward-10"
|
||||
tooltipText: QbzSession.tr("Forward 10 seconds", QbzSession.trRev)
|
||||
}
|
||||
QbzIconButton {
|
||||
name: QbzPlayer.npRepeatMode === 2 ? "repeat-1" : "repeat"
|
||||
active: QbzPlayer.npRepeatMode > 0
|
||||
|
||||
@@ -198,6 +198,7 @@ pub fn publish_current() {
|
||||
publish(&snapshot);
|
||||
// The layers-glyph preference (see `publish_show_context_icon`).
|
||||
publish_show_context_icon();
|
||||
publish_show_skip_ten();
|
||||
// Seed the two output LEDs + the volume-lock flag at shell entry too, so
|
||||
// the stamp is correct before the first track ever plays (the bridge
|
||||
// defaults are the unlit SYST/DEFAULT pair).
|
||||
@@ -260,6 +261,13 @@ pub fn publish_show_context_icon() {
|
||||
crate::player_bridge::ui(move |mut b| b.as_mut().set_show_context_icon(show));
|
||||
}
|
||||
|
||||
/// The ±10 s buttons preference (ui_prefs `show_skip_ten`), re-published on
|
||||
/// shell entry and from the Settings toggle.
|
||||
pub fn publish_show_skip_ten() {
|
||||
let show = crate::settings_qt::pref_bool("show_skip_ten", false);
|
||||
crate::player_bridge::ui(move |mut b| b.as_mut().set_show_skip_ten(show));
|
||||
}
|
||||
|
||||
// --- Pure-UI toggles (mutate + republish) --------------------------------
|
||||
|
||||
pub fn set_volume(volume: f32) {
|
||||
|
||||
@@ -157,6 +157,10 @@ pub mod qbz_player {
|
||||
// "Show track playing context" pref (Playback settings) — feeds the
|
||||
// SongCard layers icon.
|
||||
#[qproperty(bool, show_context_icon)]
|
||||
// "Show 10-second skip buttons" (Appearance > Player & Visuals) —
|
||||
// ui_prefs `show_skip_ten`, mirrored here so TransportControls reads
|
||||
// one property on every bar.
|
||||
#[qproperty(bool, show_skip_ten)]
|
||||
type QbzPlayer = super::QbzPlayerRust;
|
||||
|
||||
/// Registers this object's Qt-thread hop (Main.qml boots EVERY
|
||||
@@ -347,6 +351,7 @@ pub struct QbzPlayerRust {
|
||||
np_context_kind: QString,
|
||||
np_context_id: QString,
|
||||
show_context_icon: bool,
|
||||
show_skip_ten: bool,
|
||||
}
|
||||
|
||||
impl Default for QbzPlayerRust {
|
||||
@@ -412,6 +417,7 @@ impl Default for QbzPlayerRust {
|
||||
// open (then it reads false). `now_playing::publish_show_context_icon`
|
||||
// re-publishes it on shell entry and on the Settings toggle.
|
||||
show_context_icon: crate::settings_qt::show_context_icon(),
|
||||
show_skip_ten: crate::settings_qt::pref_bool("show_skip_ten", false),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2220,6 +2220,8 @@ pub struct SettingsDoc {
|
||||
pub wc_position_index: i32,
|
||||
#[serde(rename = "showWindowControls")]
|
||||
pub show_window_controls: bool,
|
||||
#[serde(rename = "showSkipTen")]
|
||||
pub show_skip_ten: bool,
|
||||
#[serde(rename = "showVolumeSteppers")]
|
||||
pub show_volume_steppers: bool,
|
||||
#[serde(rename = "miniDefaultViews")]
|
||||
@@ -2753,6 +2755,7 @@ pub async fn publish_snapshot() {
|
||||
wc_position_index: index_of(WC_POSITION_VALUES, &pref_str("wc_position", "right"), 1),
|
||||
show_window_controls: pref_bool("show_window_controls", true),
|
||||
show_volume_steppers: pref_bool("show_volume_steppers", false),
|
||||
show_skip_ten: pref_bool("show_skip_ten", false),
|
||||
mini_default_views: MINI_VIEW_LABELS.iter().map(|l| qbz_i18n::t(l)).collect(),
|
||||
mini_default_view_index: index_of(
|
||||
MINI_VIEW_VALUES,
|
||||
@@ -3694,6 +3697,13 @@ pub async fn settings_bool(runtime: &Arc<AppRuntime<LoggingAdapter>>, key: &str,
|
||||
crate::shell_bridge::ui(move |mut b| b.as_mut().set_show_window_controls(value));
|
||||
Ok(Apply::None)
|
||||
}
|
||||
"show-skip-ten" => {
|
||||
save_pref("show_skip_ten", serde_json::json!(value));
|
||||
// Live mirror on the domain bridge (the §5.6 pattern): the bar
|
||||
// reads QbzPlayer.showSkipTen, not the settings document.
|
||||
crate::player_bridge::ui(move |mut b| b.as_mut().set_show_skip_ten(value));
|
||||
Ok(Apply::None)
|
||||
}
|
||||
"show-volume-steppers" => {
|
||||
save_pref("show_volume_steppers", serde_json::json!(value));
|
||||
Ok(Apply::None)
|
||||
|
||||
Reference in new issue
Block a user