mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 21:46:03 +03:00
Fixes buttons clickable area in the activities list.
- Their size was not correctly calculated so it was hard to filter the clicks on the list. User had to click multiple times before clicking on the right acceptable area. Signed-off-by: Camila San <hello@camila.codes>
This commit is contained in:
parent
9f9be7814c
commit
3673603e5a
1 changed files with 4 additions and 3 deletions
|
@ -171,9 +171,9 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||
|
||||
// save info to be able to filter mouse clicks
|
||||
_buttonHeight = buttonSize;
|
||||
_spaceBetweenButtons = leftMargin;
|
||||
_primaryButtonWidth = primaryButton.rect.size().width();
|
||||
_secondaryButtonWidth = secondaryButton.rect.size().width();
|
||||
_spaceBetweenButtons = secondaryButton.rect.left() - primaryButton.rect.right();
|
||||
|
||||
} else if(activityType == Activity::Type::ErrorType){
|
||||
|
||||
|
@ -187,11 +187,12 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||
|
||||
// save info to be able to filter mouse clicks
|
||||
_buttonHeight = buttonSize;
|
||||
_spaceBetweenButtons = leftMargin;
|
||||
_primaryButtonWidth = primaryButton.rect.size().width();
|
||||
_secondaryButtonWidth = secondaryButton.rect.size().width();
|
||||
_spaceBetweenButtons = secondaryButton.rect.left() - primaryButton.rect.right();
|
||||
|
||||
} else {
|
||||
_spaceBetweenButtons = margin * offset;
|
||||
_spaceBetweenButtons = leftMargin;
|
||||
_primaryButtonWidth = 0;
|
||||
_secondaryButtonWidth = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue