mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
callActionBar: do not hide single button
Change-Id: I5030cb4a5b53f4828485792f82e7241ecd06164c GitLab: #810
This commit is contained in:
parent
7bb5ad0ee0
commit
b862c4483e
2 changed files with 5 additions and 5 deletions
|
@ -357,7 +357,7 @@ CallOverlayModel::eventFilter(QObject* object, QEvent* event)
|
||||||
void
|
void
|
||||||
CallOverlayModel::setControlRanges()
|
CallOverlayModel::setControlRanges()
|
||||||
{
|
{
|
||||||
overflowModel_->setRange(0, overflowIndex_ - 1);
|
overflowModel_->setRange(0, overflowIndex_);
|
||||||
overflowVisibleModel_->setRange(overflowIndex_, secondaryModel_->rowCount());
|
overflowVisibleModel_->setRange(overflowIndex_, secondaryModel_->rowCount());
|
||||||
overflowHiddenModel_->setRange(overflowIndex_, secondaryModel_->rowCount());
|
overflowHiddenModel_->setRange(overflowIndex_ + 1, secondaryModel_->rowCount());
|
||||||
}
|
}
|
||||||
|
|
|
@ -503,14 +503,14 @@ Control {
|
||||||
|
|
||||||
property int overflowIndex: {
|
property int overflowIndex: {
|
||||||
var maxItems = Math.floor(
|
var maxItems = Math.floor(
|
||||||
(overflowRect.remainingSpace - 24) / root.height) - 1
|
(overflowRect.remainingSpace) / (root.height + itemSpacing)) - 2
|
||||||
return Math.min(overflowItemCount, maxItems)
|
return Math.min(overflowItemCount, maxItems)
|
||||||
}
|
}
|
||||||
property int nOverflowItems: overflowItemCount - overflowIndex
|
property int nOverflowItems: overflowItemCount - overflowIndex
|
||||||
onNOverflowItemsChanged: {
|
onNOverflowItemsChanged: {
|
||||||
var diff = overflowItemListView.count - nOverflowItems
|
var diff = overflowItemListView.count - nOverflowItems
|
||||||
var effectiveOverflowIndex = overflowIndex
|
var effectiveOverflowIndex = overflowIndex
|
||||||
if (effectiveOverflowIndex === overflowItemCount - 1)
|
if (effectiveOverflowIndex === overflowItemCount - 2)
|
||||||
effectiveOverflowIndex += diff
|
effectiveOverflowIndex += diff
|
||||||
|
|
||||||
CallOverlayModel.overflowIndex = effectiveOverflowIndex
|
CallOverlayModel.overflowIndex = effectiveOverflowIndex
|
||||||
|
@ -523,7 +523,7 @@ Control {
|
||||||
ComboBox {
|
ComboBox {
|
||||||
id: overflowButton
|
id: overflowButton
|
||||||
|
|
||||||
visible: CallOverlayModel.overflowIndex < overflowItemCount
|
visible: CallOverlayModel.overflowIndex < overflowItemCount - 2
|
||||||
width: root.height
|
width: root.height
|
||||||
height: width
|
height: width
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue