Skip to content

Commit

Permalink
Enable zoom in/out
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus Tomlinson committed Apr 10, 2020
1 parent 7728b86 commit bb95146
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 13 deletions.
28 changes: 28 additions & 0 deletions icloud-for-linux.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import QtQuick 2.9
import QtQuick.Controls 1.0
import QtQuick.Window 2.3
import QtWebEngine 1.5

Expand All @@ -13,11 +14,25 @@ Window {
anchors.fill: parent
zoomFactor: 0.8

Action {
shortcut: "Ctrl+-"
onTriggered: windowParent.zoomFactor -= 0.1;
}
Action {
shortcut: "Ctrl++"
onTriggered: windowParent.zoomFactor += 0.1;
}
Action {
shortcut: "Ctrl+="
onTriggered: windowParent.zoomFactor += 0.1;
}

url: "https://www.icloud.com/" + Qt.application.arguments[1]

onNewViewRequested: function(request) {
if (request.requestedUrl.toString().startsWith('https://www.icloud.com/')) {
var newWindow = windowComponent.createObject(windowParent);
newWindow.webView.zoomFactor = windowParent.zoomFactor / 0.8
request.openIn(newWindow.webView);
}
else {
Expand Down Expand Up @@ -45,6 +60,19 @@ Window {
WebEngineView {
id: webView_
anchors.fill: parent

Action {
shortcut: "Ctrl+-"
onTriggered: webView_.zoomFactor -= 0.1;
}
Action {
shortcut: "Ctrl++"
onTriggered: webView_.zoomFactor += 0.1;
}
Action {
shortcut: "Ctrl+="
onTriggered: webView_.zoomFactor += 0.1;
}
}
}
}
2 changes: 1 addition & 1 deletion snap/gui/calendar.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=0.4
Version=0.5
Name=iCloud Calendar
GenericName=iCloud Calendar
Comment=iCloud Calendar
Expand Down
2 changes: 1 addition & 1 deletion snap/gui/contacts.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=0.4
Version=0.5
Name=iCloud Contacts
GenericName=iCloud Contacts
Comment=iCloud Contacts
Expand Down
2 changes: 1 addition & 1 deletion snap/gui/drive.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=0.4
Version=0.5
Name=iCloud Drive
GenericName=iCloud Drive
Comment=iCloud Drive
Expand Down
2 changes: 1 addition & 1 deletion snap/gui/find-my-friends.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=0.4
Version=0.5
Name=iCloud Find My Friend
GenericName=iCloud Find My Friend
Comment=iCloud Find My Friend
Expand Down
2 changes: 1 addition & 1 deletion snap/gui/find-my-iphone.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=0.4
Version=0.5
Name=iCloud Find My iPhone
GenericName=iCloud Find My iPhone
Comment=iCloud Find My iPhone
Expand Down
2 changes: 1 addition & 1 deletion snap/gui/keynote.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=0.4
Version=0.5
Name=iCloud Keynote
GenericName=iCloud Keynote
Comment=iCloud Keynote
Expand Down
2 changes: 1 addition & 1 deletion snap/gui/mail.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=0.4
Version=0.5
Name=iCloud Mail
GenericName=iCloud Mail
Comment=iCloud Mail
Expand Down
2 changes: 1 addition & 1 deletion snap/gui/notes.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=0.4
Version=0.5
Name=iCloud Notes
GenericName=iCloud Notes
Comment=iCloud Notes
Expand Down
2 changes: 1 addition & 1 deletion snap/gui/numbers.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=0.4
Version=0.5
Name=iCloud Numbers
GenericName=iCloud Numbers
Comment=iCloud Numbers
Expand Down
2 changes: 1 addition & 1 deletion snap/gui/pages.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=0.4
Version=0.5
Name=iCloud Pages
GenericName=iCloud Pages
Comment=iCloud Pages
Expand Down
2 changes: 1 addition & 1 deletion snap/gui/photos.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=0.4
Version=0.5
Name=iCloud Photos
GenericName=iCloud Photos
Comment=iCloud Photos
Expand Down
2 changes: 1 addition & 1 deletion snap/gui/reminders.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=0.4
Version=0.5
Name=iCloud Reminders
GenericName=iCloud Reminders
Comment=iCloud Reminders
Expand Down
3 changes: 2 additions & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: icloud-for-linux
version: '0.4'
version: '0.5'
summary: iCloud for Linux
description: iCloud for Linux

Expand All @@ -25,6 +25,7 @@ parts:
stage-packages:
- qmlscene
- qml-module-qtquick2
- qml-module-qtquick-controls
- qml-module-qtquick-window2
- qml-module-qtwebengine
- qml-module-qtquick-dialogs
Expand Down

0 comments on commit bb95146

Please sign in to comment.