summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandro S. Andrade <sandroandrade@kde.org>2016-11-18 00:09:49 (GMT)
committerSandro S. Andrade <sandroandrade@kde.org>2016-11-18 00:09:49 (GMT)
commitc268535d3959e21aa3e4b3e51933285a8efa0c8a (patch)
treebc2a46654aabb6dd00da3bf2098b893d173231b1
parent561406275f67de9567004860d00bcb9ff7174a49 (diff)
Add some more android polishingv16.11.80
-rw-r--r--android/AndroidManifest.xml1
-rw-r--r--src/app/qml/Main.qml5
-rw-r--r--src/app/qml/MinuetMenu.qml18
-rw-r--r--src/app/qml/PianoView/PianoView.qml2
4 files changed, 17 insertions, 9 deletions
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index 0a97c39..fddc89a 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -6,7 +6,6 @@
android:theme="@style/MinuetTheme">
<activity android:name="org.qtproject.qt5.android.bindings.QtActivity"
android:label="Minuet"
- android:screenOrientation="portrait"
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
diff --git a/src/app/qml/Main.qml b/src/app/qml/Main.qml
index 71a8945..2b95787 100644
--- a/src/app/qml/Main.qml
+++ b/src/app/qml/Main.qml
@@ -24,6 +24,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import QtQuick.Window 2.0
+import QtQuick.Controls.Material 2.0
ApplicationWindow {
id: applicationWindow
@@ -35,6 +36,8 @@ ApplicationWindow {
Component {
id: androidToolBar
ToolBar {
+ Material.primary: "#181818"
+ Material.foreground: "white"
RowLayout {
spacing: 20
anchors.fill: parent
@@ -177,7 +180,7 @@ ApplicationWindow {
MinuetMenu {
id: minuetMenu
onBackPressed: core.soundController.reset()
- onCurrentExerciseChanged: if (Qt.platform.os == "android") drawer.close()
+ onCurrentExerciseChanged: if (Qt.platform.os == "android" && currentExercise != undefined) drawer.close()
}
}
diff --git a/src/app/qml/MinuetMenu.qml b/src/app/qml/MinuetMenu.qml
index 3bf0016..6ed5d33 100644
--- a/src/app/qml/MinuetMenu.qml
+++ b/src/app/qml/MinuetMenu.qml
@@ -24,9 +24,9 @@ import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
-ColumnLayout {
+Item {
anchors.fill: parent
- spacing: 0
+ //spacing: 0
property var currentExercise: undefined
@@ -38,14 +38,18 @@ ColumnLayout {
}
Image {
+ id: image
+
source: "qrc:/qml/images/minuet-drawer.png"
- Layout.preferredWidth: parent.width; Layout.preferredHeight: 0.53125 * Layout.preferredWidth
+ width: parent.width; height: 0.53125 * width
fillMode: Image.PreserveAspectFit
-// visible: Qt.platform.os == "android"
}
Item {
- Layout.preferredWidth: parent.width; Layout.preferredHeight: (stackView.depth > 1) ? 50:0
+ id: breadcrumb
+
+ width: parent.width; height: (stackView.depth > 1) ? 50:0
+ anchors.top: image.bottom
clip: true
RowLayout {
anchors.fill: parent
@@ -53,6 +57,7 @@ ColumnLayout {
id: backButton
fillMode: Image.Pad
+ width: 24; height: 24
horizontalAlignment: Image.AlignHCenter
verticalAlignment: Image.AlignVCenter
source: "qrc:/keyboard_arrow_left.png"
@@ -90,7 +95,8 @@ ColumnLayout {
StackView {
id: stackView
- Layout.preferredWidth: parent.width; Layout.fillHeight: true
+ width: parent.width; height: parent.height - image.height - breadcrumb.height
+ anchors.top: breadcrumb.bottom
clip: true
focus: true
diff --git a/src/app/qml/PianoView/PianoView.qml b/src/app/qml/PianoView/PianoView.qml
index 84b310e..9b72c6a 100644
--- a/src/app/qml/PianoView/PianoView.qml
+++ b/src/app/qml/PianoView/PianoView.qml
@@ -89,7 +89,7 @@ Flickable {
Row {
id: octaveNumber
- width: parent.width; height: 20
+ width: parent.width; height: 18
anchors.left: parent.left
anchors.leftMargin: 2 * keyWidth