added setting for focus on hover for #161

This commit is contained in:
itsmattkc
2018-12-17 21:53:42 +11:00
parent 302310ab7b
commit 467d271d5c
8 changed files with 90 additions and 30 deletions
+6 -1
View File
@@ -31,7 +31,8 @@ Config::Config()
drop_on_media_to_replace(true),
autoscroll(AUTOSCROLL_PAGE_SCROLL),
audio_rate(48000),
fast_seeking(false)
fast_seeking(false),
hover_focus(false)
{}
void Config::load(QString path) {
@@ -111,6 +112,9 @@ void Config::load(QString path) {
} else if (stream.name() == "FastSeeking") {
stream.readNext();
fast_seeking = (stream.text() == "1");
} else if (stream.name() == "HoverFocus") {
stream.readNext();
hover_focus = (stream.text() == "1");
}
}
}
@@ -158,6 +162,7 @@ void Config::save(QString path) {
stream.writeTextElement("Autoscroll", QString::number(autoscroll));
stream.writeTextElement("AudioRate", QString::number(audio_rate));
stream.writeTextElement("FastSeeking", QString::number(fast_seeking));
stream.writeTextElement("HoverFocus", QString::number(hover_focus));
stream.writeEndElement(); // configuration
stream.writeEndDocument(); // doc