From f19d3378173bfcf354bb3335c191c821f9bed58d Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 17 Sep 2019 16:39:45 -0400 Subject: [PATCH] Move hover preview height from settings to theme --- src/python/config_files.py | 1 - src/qml/Base/MediaPlayer/OSD.qml | 2 +- src/themes/Default.qpl | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/python/config_files.py b/src/python/config_files.py index f67d74c5..a0d28036 100644 --- a/src/python/config_files.py +++ b/src/python/config_files.py @@ -115,7 +115,6 @@ class UISettings(JSONConfigFile): "autoHideOSDAfterMsec": 3000, "defaultVolume": 100, "startMuted": False, - "hoverPreviewHeight": 192, }, "keys": { "startPythonDebugger": "Alt+Shift+D", diff --git a/src/qml/Base/MediaPlayer/OSD.qml b/src/qml/Base/MediaPlayer/OSD.qml index 7282db4d..4a7d59f0 100644 --- a/src/qml/Base/MediaPlayer/OSD.qml +++ b/src/qml/Base/MediaPlayer/OSD.qml @@ -97,7 +97,7 @@ HColumnLayout { contentItem: VideoPreview { id: preview implicitHeight: Math.min( - window.settings.media.hoverPreviewHeight, + theme.mediaPlayer.hoverPreview.maxHeight, media.height - osd.height - theme.spacing ) implicitWidth: Math.min( diff --git a/src/themes/Default.qpl b/src/themes/Default.qpl index 71527a38..743ba392 100644 --- a/src/themes/Default.qpl +++ b/src/themes/Default.qpl @@ -359,6 +359,9 @@ chat: mediaPlayer: + hoverPreview: + int maxHeight: 192 + progress: int height: 8 color background: hsluv(0, 0, 0, 0.5)