| 54 | } |
| 55 | |
| 56 | bool GM_SettingsListWidget::containsRemoveIcon(const QPoint &pos) const |
| 57 | { |
| 58 | QListWidgetItem* item = itemAt(pos); |
| 59 | if (!item) { |
| 60 | return false; |
| 61 | } |
| 62 | |
| 63 | const QRect rect = visualItemRect(item); |
| 64 | const int removeIconPosition = rect.right() - m_delegate->padding() - 16; |
| 65 | const int center = rect.height() / 2 + rect.top(); |
| 66 | const int removeIconYPos = center - (16 / 2); |
| 67 | |
| 68 | QRect removeIconRect(removeIconPosition, removeIconYPos, 16, 16); |
| 69 | |
| 70 | return removeIconRect.contains(pos); |
| 71 | } |
| 72 | |
| 73 | bool GM_SettingsListWidget::containsUpdateIcon(const QPoint &pos) const |
| 74 | { |