aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/universal/qquickuniversalfocusrectangle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QQuickUniversalFocusRectangle: optimize string usageAnton Kudryavtsev2016-03-291-2/+4
| | | | | | | | | | Replace QString::arg() chain with multi-arg overloaded function. It's faster because of args are replaced in one pass. While touching the code, also cache width and height of bound. Change-Id: Id8d19143f426ed1998713204dc9c8d4b51e58db5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QQuickUniversalFocusRectangle: proper construction of vectorAnton Kudryavtsev2016-03-291-1/+1
| | | | | | | | | ... with known size and known value by according ctor. Don't use appending for this case. Change-Id: Ib2bf9703bb03bdfa628d1ae78c6d0353e991b3e4 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Optimize QQuickUniversalFocusRectangle::paint()J-P Nurmi2016-02-061-11/+22
| | | | | | Change-Id: I75cc70df9f5eef5a1e0132ea8ec90938305dfde2 Task-number: QTBUG-50575 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickUniversalFocusRectangle: avoid unnecessary paintsJ-P Nurmi2016-02-061-0/+3
| | | | | | | | | | | | | Drawing a double-dashed focus rectangle gets seemingly expensive if the active focus control is eg. a SwipeView that covers the whole screen. In fact, SwipeView does not even request a focus rectangle (useSystemFocusVisuals: false), so it makes no sense to waste CPU cycles drawing a huge double-dashed rectangle. It's a bit unclear why QQuickPaintedItem even calls paint() when it's hidden... Change-Id: I57a8dd309674b8a6e99749544242a00dc02471ee Task-number: QTBUG-50575 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Universal: make FocusRectangle transparent for positioners & SwipeViewJ-P Nurmi2016-01-121-0/+2
| | | | | | | | | | The focus rectangle follows (is re-parented to) the current active focus control, but it should never be added to the delegate model of a positioner or container. Change-Id: I2979f4ffbb6a833b5f031988b3cc969a93d3c541 Task-number: QTBUG-50404 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Universal: focus rectangleJ-P Nurmi2015-12-121-0/+66
Change-Id: I74005dcce5f1f41e9455b882f313952f88c364f9 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>