Skip to content

Commit

Permalink
qt: update miniplayer default controlbar customization
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Lamot <pierre@videolabs.io>
  • Loading branch information
fuzun authored and chubinou committed Nov 16, 2020
1 parent 5338ee4 commit 949d838
Showing 1 changed file with 42 additions and 28 deletions.
70 changes: 42 additions & 28 deletions modules/gui/qt/player/playercontrolbarmodel.cpp
Expand Up @@ -27,34 +27,48 @@ enum default_align {
SIZE
};

static const QVector<PlayerControlBarModel::IconToolButton> 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<PlayerControlBarModel::IconToolButton> 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<PlayerControlBarModel::IconToolButton> 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<PlayerControlBarModel::IconToolButton> 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)
Expand Down

0 comments on commit 949d838

Please sign in to comment.