From 949d83803061c859966463bad2afdc568953a064 Mon Sep 17 00:00:00 2001 From: Fatih Uzunoglu Date: Thu, 13 Aug 2020 23:20:10 +0300 Subject: [PATCH] qt: update miniplayer default controlbar customization Signed-off-by: Pierre Lamot --- .../gui/qt/player/playercontrolbarmodel.cpp | 70 +++++++++++-------- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/modules/gui/qt/player/playercontrolbarmodel.cpp b/modules/gui/qt/player/playercontrolbarmodel.cpp index 877b77a8baaf..cea05e97a4da 100644 --- a/modules/gui/qt/player/playercontrolbarmodel.cpp +++ b/modules/gui/qt/player/playercontrolbarmodel.cpp @@ -27,34 +27,48 @@ enum default_align { SIZE }; -static const QVector MAIN_TB_DEFAULT[default_align::SIZE] = { - // left - {{PlayerControlBarModel::LANG_BUTTON}, - {PlayerControlBarModel::MENU_BUTTON}}, - // center - {{PlayerControlBarModel::RANDOM_BUTTON}, - {PlayerControlBarModel::PREVIOUS_BUTTON}, - {PlayerControlBarModel::PLAY_BUTTON}, - {PlayerControlBarModel::NEXT_BUTTON}, - {PlayerControlBarModel::LOOP_BUTTON}}, - // right - {{PlayerControlBarModel::VOLUME}, - {PlayerControlBarModel::FULLSCREEN_BUTTON}} - }; - -static const QVector MINI_TB_DEFAULT[default_align::SIZE] = { - // left - {}, - // center - {{PlayerControlBarModel::RANDOM_BUTTON}, - {PlayerControlBarModel::PREVIOUS_BUTTON}, - {PlayerControlBarModel::PLAY_BUTTON}, - {PlayerControlBarModel::NEXT_BUTTON}, - {PlayerControlBarModel::LOOP_BUTTON}}, - // right - {{PlayerControlBarModel::VOLUME}, - {PlayerControlBarModel::PLAYER_SWITCH_BUTTON}} - }; +static const QVector MAIN_TB_DEFAULT[default_align::SIZE] = +{ + { + // left + {PlayerControlBarModel::LANG_BUTTON}, + {PlayerControlBarModel::MENU_BUTTON} + }, + { + // center + {PlayerControlBarModel::RANDOM_BUTTON}, + {PlayerControlBarModel::PREVIOUS_BUTTON}, + {PlayerControlBarModel::PLAY_BUTTON}, + {PlayerControlBarModel::NEXT_BUTTON}, + {PlayerControlBarModel::LOOP_BUTTON} + }, + { + // right + {PlayerControlBarModel::VOLUME}, + {PlayerControlBarModel::FULLSCREEN_BUTTON} + } +}; + +static const QVector MINI_TB_DEFAULT[default_align::SIZE] = +{ + { + // left + {PlayerControlBarModel::ARTWORK_INFO} + }, + { + // center + {PlayerControlBarModel::RANDOM_BUTTON}, + {PlayerControlBarModel::PREVIOUS_BUTTON}, + {PlayerControlBarModel::PLAY_BUTTON}, + {PlayerControlBarModel::NEXT_BUTTON}, + {PlayerControlBarModel::LOOP_BUTTON} + }, + { + // right + {PlayerControlBarModel::VOLUME}, + {PlayerControlBarModel::PLAYER_SWITCH_BUTTON} + } +}; PlayerControlBarModel::PlayerControlBarModel(QObject *_parent) : QAbstractListModel(_parent)