aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickicon.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make QQuickIcon a value typeJ-P Nurmi2017-05-101-37/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickIcon no longer inherits QObject, but becomes a light-weight implicitly shared Q_GADGET-type, that is passed by value the same way fonts and colors are. Before: SUB: OS: Fedora 25 (Workstation Edition) SUB: QPA: xcb SUB: GL_VENDOR: Intel Open Source Technology Center SUB: GL_RENDERER: Mesa DRI Intel(R) Haswell Desktop SUB: GL_VERSION: 3.0 Mesa 13.0.4 SUB: running: benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml SUB: 110 frames SUB: 109 frames SUB: 109 frames SUB: 109 frames SUB: 109 frames SUB: Average: SUB: 109.2 frames; using samples; MedianAll=109; StdDev=0.447214, CoV=0.00409536 After: [...] SUB: running: benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml SUB: 123 frames SUB: 124 frames SUB: 124 frames SUB: 122 frames SUB: 125 frames SUB: Average: SUB: 123.6 frames; using samples; MedianAll=124; StdDev=1.14018, CoV=0.00922472 Change-Id: I604532204fb94fc0726d0c9b8b6097f9ebc265e8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickIcon: fix the type of the source propertyJ-P Nurmi2017-04-241-3/+3
| | | | | | | | | | | | | | | | | | | For example, something like: Button { icon.source: "../images/drawer.png" } did not work in the Gallery example, even though it works fine for Image elements etc. The URL needs to be resolved relative to the caller. By making the property an URL instead of a plain string, the QML engine does the correct thing automatically. Note: icon.source.length no longer works in auto tests, so it got replaced by a compare(). Change-Id: I5fdb3aa55003d2f04e5458b7636e4dae3fa9857c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickIcon: pass signal argumentsJ-P Nurmi2017-04-031-5/+5
| | | | | | | | This makes it possible for QQuickAbstractButton to sync its icon with the icon from QQuickAction by simply connecting signals to the setters. Change-Id: I6b944dd598d66389bdb06f4f2874aa813c1246c7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add QQuickIcon::colorJ-P Nurmi2017-02-201-1/+24
| | | | | | | | | This will be used by the built-in styles to visualize various states (gray when disabled, accent color when active...) and can be also set or overridden by the users. Change-Id: I293348415d7e66dea163190cdf35d60ce5407b5b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add QQuickIconMitch Curtis2017-02-091-0/+128
This adds the initial API needed to add support for setting icons on buttons, etc., and is also necessary for action support. Follow up commits will add the actual support for icons. Change-Id: I9ab892aa4fe43210e7b18bed3e0ebcec2edb9c91 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>