Merge lp:~fboucault/ubuntu-ui-toolkit/scrollbar_lazy_steppers into lp:ubuntu-ui-toolkit/staging

Proposed by Florian Boucault
Status: Merged
Approved by: Cris Dywan
Approved revision: 2004
Merged at revision: 2010
Proposed branch: lp:~fboucault/ubuntu-ui-toolkit/scrollbar_lazy_steppers
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 21 lines (+2/-2)
1 file modified
src/Ubuntu/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml (+2/-2)
To merge this branch: bzr merge lp:~fboucault/ubuntu-ui-toolkit/scrollbar_lazy_steppers
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Andrea Bernabei (community) Approve
Review via email: mp+297338@code.launchpad.net

Commit message

Scrollbar: do not load the stepper icon until it is visible.

Description of the change

Scrollbar: do not load the stepper icon until it is visible.

To post a comment you must log in.
Revision history for this message
Andrea Bernabei (faenil) wrote :

lgtm.

Revision history for this message
Andrea Bernabei (faenil) wrote :

just fyi, I've been working on optimizations to scrollbarstyle as a sidetask, I will send the changes in an MR when I'm done.

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrea Bernabei (faenil) wrote :

I'm not entirely sure this is an actual "fix" :)

Using "visible ? url : "" " works ok for cases where visible only changes once (when the component is instantiated)

in this case, visible changes to false whenever the mouse leaves the proximity area, and back to true whenever a pointer device hovers over the proximity area of the scrollbar.

This means with this patch the image will be dropped and then recreated every time you leave and enter the proximity area again.

After a quick chat with Kaleo and zsombi, we agreed that we will let this change in, but I will take a note and benchmark if the startup boost that this change should bring is worth unloading/reloading the image every time the mouse moves around.

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml'
2--- src/Ubuntu/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml 2016-04-22 03:43:33 +0000
3+++ src/Ubuntu/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml 2016-06-14 13:36:59 +0000
4@@ -939,7 +939,7 @@
5 anchors.centerIn: parent
6 width: __stepperAssetWidth
7 rotation: isVertical ? 180 : 90
8- source: Qt.resolvedUrl("../artwork/toolkit_scrollbar-stepper.svg")
9+ source: visible ? Qt.resolvedUrl("../artwork/toolkit_scrollbar-stepper.svg") : ""
10 color: Qt.rgba(sliderColor.r, sliderColor.g, sliderColor.b,
11 sliderColor.a * ((flickableItem && flickableItem[scrollbarUtils.propAtBeginning])
12 ? __stepperImgOpacityDisabled
13@@ -982,7 +982,7 @@
14 anchors.centerIn: parent
15 width: __stepperAssetWidth
16 rotation: isVertical ? 0 : -90
17- source: Qt.resolvedUrl("../artwork/toolkit_scrollbar-stepper.svg")
18+ source: visible ? Qt.resolvedUrl("../artwork/toolkit_scrollbar-stepper.svg") : ""
19 color: Qt.rgba(sliderColor.r, sliderColor.g, sliderColor.b,
20 sliderColor.a * ((flickableItem && flickableItem[scrollbarUtils.propAtEnd])
21 ? __stepperImgOpacityDisabled

Subscribers

People subscribed via source and target branches