[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: don't show pined controls in fullscreen mode
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Sun Jun 19 18:56:52 UTC 2022
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
9758b416 by Pierre Lamot at 2022-06-19T18:41:34+00:00
qml: don't show pined controls in fullscreen mode
when the player uses the fullscreen mode, the video should take the whole screen
space, using pined controls in this mode limits the available space for the video
to be displayed. We fallback to the non-pined mode in this case.
- - - - -
a7cfc5d5 by Pierre Lamot at 2022-06-19T18:41:34+00:00
qt: move pin-controls settings to regular vlc settings
- - - - -
5 changed files:
- modules/gui/qt/dialogs/preferences/simple_preferences.cpp
- modules/gui/qt/maininterface/mainctx.cpp
- modules/gui/qt/maininterface/mainctx.hpp
- modules/gui/qt/player/qml/Player.qml
- modules/gui/qt/qt.cpp
Changes:
=====================================
modules/gui/qt/dialogs/preferences/simple_preferences.cpp
=====================================
@@ -849,8 +849,8 @@ SPrefsPanel::SPrefsPanel( qt_intf_t *_p_intf, QWidget *_parent,
CONFIG_BOOL( "metadata-network-access", MetadataNetworkAccessMode );
CONFIG_BOOL( "qt-menubar", menuBarCheck );
- ui.pinVideoControlsCheckbox->setChecked( p_intf->p_mi->pinVideoControls() );
- m_resetters.push_back(std::make_unique<PropertyResetter>(ui.pinVideoControlsCheckbox, "checked"));
+
+ CONFIG_BOOL( "qt-pin-controls", pinVideoControlsCheckbox );
QObject::connect( ui.pinVideoControlsCheckbox, &QCheckBox::stateChanged, p_intf->p_mi, &MainCtx::setPinVideoControls );
ui.colorSchemeComboBox->setModel( p_intf->p_mi->getColorScheme() );
=====================================
modules/gui/qt/maininterface/mainctx.cpp
=====================================
@@ -200,7 +200,6 @@ MainCtx::~MainCtx()
settings->setValue( "pl-dock-status", b_playlistDocked );
settings->setValue( "ShowRemainingTime", m_showRemainingTime );
settings->setValue( "interface-scale", m_intfUserScaleFactor );
- settings->setValue( "pin-video-controls", m_pinVideoControls );
/* Save playlist state */
settings->setValue( "playlist-visible", playlistVisible );
@@ -298,6 +297,9 @@ void MainCtx::loadPrefs(const bool callSignals)
loadFromVLCOption(m_smoothScroll, "qt-smooth-scrolling", &MainCtx::smoothScrollChanged);
loadFromVLCOption(m_maxVolume, "qt-max-volume", &MainCtx::maxVolumeChanged);
+
+ loadFromVLCOption(m_pinVideoControls, "qt-pin-controls", &MainCtx::pinVideoControlsChanged);
+
}
void MainCtx::loadFromSettingsImpl(const bool callSignals)
@@ -328,8 +330,6 @@ void MainCtx::loadFromSettingsImpl(const bool callSignals)
loadFromSettings(m_showRemainingTime, "MainWindow/ShowRemainingTime", false, &MainCtx::showRemainingTimeChanged);
- loadFromSettings(m_pinVideoControls, "MainWindow/pin-video-controls", false, &MainCtx::pinVideoControlsChanged);
-
const auto colorScheme = static_cast<ColorSchemeModel::ColorScheme>(getSettings()->value( "MainWindow/color-scheme", ColorSchemeModel::System ).toInt());
if (m_colorScheme->currentScheme() != colorScheme)
m_colorScheme->setCurrentScheme(colorScheme);
@@ -426,7 +426,7 @@ void MainCtx::setPinVideoControls(bool pinVideoControls)
return;
m_pinVideoControls = pinVideoControls;
- emit pinVideoControlsChanged(m_pinVideoControls);
+ emit pinVideoControlsChanged();
}
inline void MainCtx::initSystray()
=====================================
modules/gui/qt/maininterface/mainctx.hpp
=====================================
@@ -427,7 +427,7 @@ signals:
void requestInterfaceMinimized();
void intfScaleFactorChanged();
- void pinVideoControlsChanged( bool );
+ void pinVideoControlsChanged();
void hasAcrylicSurfaceChanged();
void acrylicActiveChanged();
=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -20,6 +20,7 @@ import QtQuick.Controls 2.4
import QtQuick.Layouts 1.11
import QtQml.Models 2.11
import QtGraphicalEffects 1.0
+import QtQuick.Window 2.11
import org.videolan.vlc 0.1
@@ -38,7 +39,7 @@ FocusScope {
&& Player.hasVideoOutput
&& playlistpopup.state !== "visible"
- property bool pinVideoControls: rootPlayer.hasEmbededVideo && MainCtx.pinVideoControls
+ property bool pinVideoControls: rootPlayer.hasEmbededVideo && MainCtx.pinVideoControls && ((MainCtx.intfMainWindow.visibility !== Window.FullScreen))
property bool hasEmbededVideo: MainCtx.hasEmbededVideo
readonly property int positionSliderY: controlBarView.y + controlBarView.sliderY
readonly property string coverSource: {
=====================================
modules/gui/qt/qt.cpp
=====================================
@@ -236,6 +236,9 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define QT_MENUBAR_TEXT N_( "Show the menu bar" )
#define QT_MENUBAR_LONGTEXT N_( "This option displays the classic menu bar" )
+#define QT_PIN_CONTROLS_TEXT N_("Pin video controls")
+#define QT_PIN_CONTROLS_LONGTEXT N_("Place video controls above and below the video instead of above")
+
#define FULLSCREEN_CONTROL_PIXELS N_( "Fullscreen controller mouse sensitivity" )
#define QT_COMPOSITOR_TEXT N_("Select Qt video integration backend")
@@ -372,6 +375,8 @@ vlc_module_begin ()
add_bool( "qt-embedded-open", false, QT_NATIVEOPEN_TEXT,
nullptr )
+ add_bool( "qt-pin-controls", false, QT_PIN_CONTROLS_TEXT, QT_PIN_CONTROLS_LONGTEXT )
+
add_obsolete_bool( "qt-advanced-pref" ) /* since 4.0.0 */
add_integer( "qt-initial-prefs-view", 0, INITIAL_PREFS_VIEW_TEXT, INITIAL_PREFS_VIEW_LONGTEXT )
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/72730375a56c68860ca4700bfa5aecad75913911...a7cfc5d557a4755d7388ee4dbb226abc11e59e52
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/72730375a56c68860ca4700bfa5aecad75913911...a7cfc5d557a4755d7388ee4dbb226abc11e59e52
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list