ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #08830
[Merge] lp:~renatofilho/ubuntu-calendar-app/fix-1556945 into lp:ubuntu-calendar-app
Renato Araujo Oliveira Filho has proposed merging lp:~renatofilho/ubuntu-calendar-app/fix-1556945 into lp:ubuntu-calendar-app.
Commit message:
Use QSystemInfo API to detect if there is mouse attached.
Requested reviews:
Ubuntu Calendar Developers (ubuntu-calendar-dev)
Related bugs:
Bug #1556945 in Ubuntu Calendar App: "bottom edge obscures calendar events"
https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1556945
For more details, see:
https://code.launchpad.net/~renatofilho/ubuntu-calendar-app/fix-1556945/+merge/288942
--
Your team Ubuntu Calendar Developers is requested to review the proposed merge of lp:~renatofilho/ubuntu-calendar-app/fix-1556945 into lp:ubuntu-calendar-app.
=== modified file 'calendar.qml'
--- calendar.qml 2016-03-07 15:58:43 +0000
+++ calendar.qml 2016-03-14 15:26:35 +0000
@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.4
+import QtSystemInfo 5.5
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.0
import QtOrganizer 5.0
@@ -428,11 +429,6 @@
tabs.selectedTabIndex = settings.defaultViewIndex;
}
tabs.isReady = true
- // WORKAROUND: Due the missing feature on SDK, they can not detect if
- // there is a mouse attached to device or not. And this will cause the
- // bootom edge component to not work correct on desktop.
- // We will consider that a mouse is always attached until it get implement on SDK.
- QuickUtils.mouseAttached = true
} // End of Component.onCompleted:
Keys.onTabPressed: {
@@ -733,4 +729,18 @@
}
}
}
+
+ // WORKAROUND: Due the missing feature on SDK, they can not detect if
+ // there is a mouse attached to device or not. And this will cause the
+ // bootom edge component to not work correct on desktop.
+ Binding {
+ target: QuickUtils
+ property: "mouseAttached"
+ value: (mouseList.count > 1)
+ }
+
+ InputDeviceManager {
+ id: mouseList
+ filter: InputInfo.Mouse | InputInfo.TouchPad
+ }
}
References