Skip to content

Commit

Permalink
fix player controls might not appear until resize
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Jan 19, 2024
1 parent b105699 commit 03a3afc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1179,12 +1179,14 @@ void Player::layoutToolbars()
m_inSelectedToolBar->sizeHint().width() + 20;
bool twoRowsInUse = m_toolRow2->count() > 0;

if (totalWidth <= this->width() && !twoRowsInUse) {
// Everything still fits in one toolbar. Nothing to change.
return;
} else if (totalWidth > this->width() && twoRowsInUse) {
// Two toolbars still needed. Nothing to change.
return;
if (m_toolRow1->count() > 0) {
if (totalWidth <= this->width() && !twoRowsInUse) {
// Everything still fits in one toolbar. Nothing to change.
return;
} else if (totalWidth > this->width() && twoRowsInUse) {
// Two toolbars still needed. Nothing to change.
return;
}
}

// Remove all the widgets from the tool bar area
Expand Down

0 comments on commit 03a3afc

Please sign in to comment.