~etherpulse/podbird/playback_rate

« back to all changes in this revision

Viewing changes to app/ui/SettingsPage.qml

  • Committer: Eran Uzan
  • Date: 2020-06-12 22:06:32 UTC
  • Revision ID: etherpulse@gmail.com-20200612220632-8ykmirqv6psr1wak
Added playback speed configuration to allow for faster / slower listening experience 

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
                }
126
126
            }
127
127
        }
 
128
        
 
129
        Component {
 
130
            id: playbackSpeedDialog
 
131
            Dialog {
 
132
                id: dialogInternal
 
133
                // TRANSLATORS: This strings refers to the playback speed of the episode. Users can set how fast/slow they
 
134
                // want to hear the episode playback.
 
135
                title: i18n.tr("Playback Speed")
 
136
                Slider {
 
137
                    id:slider
 
138
                    width: parent.width
 
139
                    minimumValue:0.25
 
140
                    maximumValue:5.0
 
141
                    value:podbird.settings.playbackSpeed ? podbird.settings.playbackSpeed : 1.0
 
142
                    function formatValue(v) { return v.toFixed(1)  }
 
143
                }
 
144
 
 
145
                Button {
 
146
                    text: i18n.tr("OK")
 
147
                    color: podbird.appTheme.positiveActionButton
 
148
                    onClicked: {
 
149
                        podbird.settings.playbackSpeed = slider.value.toFixed(1);
 
150
                        PopupUtils.close(dialogInternal)
 
151
                    }
 
152
                }
 
153
                Button {
 
154
                    text: i18n.tr("Cancel")
 
155
                    color: podbird.appTheme.neutralActionButton
 
156
                    onClicked: {
 
157
                        PopupUtils.close(dialogInternal)
 
158
                    }
 
159
                }
 
160
            }
 
161
        }
128
162
 
129
163
        Column {
130
164
            id: settingsColumn
179
213
                value: i18n.tr("%1 seconds").arg(podbird.settings.skipBack)
180
214
                onClicked: PopupUtils.open(skipBackDialog, settingsPage);
181
215
            }
 
216
            
 
217
             SingleValueListItem {
 
218
                divider.visible: false
 
219
                title.text: i18n.tr("Playback rate")
 
220
                value: podbird.settings.playbackSpeed ? podbird.settings.playbackSpeed : 1.0
 
221
                onClicked: PopupUtils.open(playbackSpeedDialog, settingsPage);
 
222
            }
182
223
 
183
224
            HeaderListItem {
184
225
                title.text: i18n.tr("Podcast Episode Settings")