Skip to content

Commit

Permalink
Release 2.0.2, various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vranki committed Dec 30, 2013
1 parent 0267458 commit 76753c3
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 9 deletions.
1 change: 1 addition & 0 deletions qml/siilihai-mobile-nocomponents/CredentialsDialog.qml
Expand Up @@ -33,5 +33,6 @@ SimpleDialog {
siilihaimobile.credentialsEntered(upf.username, upf.password, remember.checked && upf.checked)
upf.reset()
}
Component.onCompleted: mainItem.backPressed.connect(clicked)
}
}
11 changes: 10 additions & 1 deletion qml/siilihai-mobile-nocomponents/InactiveScreen.qml
Expand Up @@ -40,13 +40,22 @@ Rectangle {
height: parent.height
width: totalforums ? parent.width * ((totalforums - busyforums) / totalforums) : 0
color: "white"
Behavior on width { SmoothedAnimation { velocity: 30 } }
}
Text {
anchors.centerIn: parent
font.pixelSize: parent.height / 3
text: "Updating.."
color: "white"
opacity: 0.5
}
}

Timer {
running: parent.visible
repeat: true
onTriggered: {
triggeredOnStart: true
onTriggered: {
var busycount = 0
for(var i=0;i<subscriptions.length;i++) {
if(subscriptions[i].beingUpdated || subscriptions[i].beingSynced || subscriptions[i].scheduledForUpdate) busycount++;
Expand Down
1 change: 1 addition & 0 deletions qml/siilihai-mobile-nocomponents/MessageDialog.qml
Expand Up @@ -32,6 +32,7 @@ SimpleDialog {
anchors.centerIn: parent
text: "Ok"
onClicked: siilihaimobile.dismissMessages()
Component.onCompleted: mainItem.backPressed.connect(clicked)
}
}

Expand Down
1 change: 1 addition & 0 deletions qml/siilihai-mobile-nocomponents/SettingsDialog.qml
Expand Up @@ -23,6 +23,7 @@ SimpleDialog {
text: "Close"
onClicked: topItem = false
anchors.horizontalCenter: parent.horizontalCenter
Component.onCompleted: mainItem.backPressed.connect(clicked)
}
}
}
1 change: 1 addition & 0 deletions qml/siilihai-mobile-nocomponents/Toolbar.qml
Expand Up @@ -24,6 +24,7 @@ Item {
siilihaimobile.selectedGroupId = ""
}
}
Component.onCompleted: mainItem.backPressed.connect(clicked)
}
ToolbarButton {
image: "gfx/Gnome-view-refresh.svg"
Expand Down
Expand Up @@ -57,6 +57,7 @@ SimpleDialog {
siilihaimobile.applyGroupSubscriptions()
forumSettingsDialog.topItem = false
}
Component.onCompleted: mainItem.backPressed.connect(clicked)
}
Item {width: 1; height: 50} // Spacer
}
Expand Down
15 changes: 15 additions & 0 deletions qml/siilihai-mobile-nocomponents/main.qml
Expand Up @@ -3,6 +3,7 @@ import "forum"
import "account"

Item {
id: mainItem
property string color1: "#7d7dc0"
property string color2: "#ffd884"
property string colorDark: "#003e5e"
Expand All @@ -19,6 +20,8 @@ Item {

property int defaultButtonHeight: 32
property int tallButtonHeight: 42
signal backPressed

Image {
source: "gfx/backbround-dark.png"
fillMode: Image.Tile
Expand Down Expand Up @@ -80,7 +83,19 @@ Item {
MessageDialog {}
InactiveScreen {}

// Hide the virtual keyboard if it is open
function hideVkb() {
Qt.inputMethod.hide();
}

// Android back button handling
focus: true // important - otherwise we'll get no key events

Keys.onReleased: {
if (event.key === Qt.Key_Back) {
console.log("Back button captured - wunderbar !")
event.accepted = true
backPressed()
}
}
}
20 changes: 19 additions & 1 deletion qml/siilihai-mobile-nocomponents/widgets/SimpleButton.qml
@@ -1,6 +1,7 @@
import QtQuick 2.0

Rectangle {
id: simpleButton
property string text: ""
property bool enabled: true
property bool outline: true
Expand All @@ -10,7 +11,7 @@ Rectangle {
property bool boldText: false
signal clicked
clip: true
radius: 10
radius: 6
color: bgColor
border.color: outline ? buttonColor : "transparent"
border.width: 2
Expand All @@ -30,4 +31,21 @@ Rectangle {
anchors.fill: parent
onClicked: if(enabled) parent.clicked()
}
// Bg fill
Rectangle {
anchors.fill: parent
radius: parent.radius
gradient: Gradient {
GradientStop {
position: 0;
color: "transparent"
}
GradientStop {
position: 1;
color: simpleButton.border.color;
}
}
opacity: 0.3
z: -100
}
}
2 changes: 1 addition & 1 deletion rpm/siilihai-mobile.yaml
@@ -1,6 +1,6 @@
Name: harbour-siilihai-mobile
Summary: Siilihai
Version: 2.0.1
Version: 2.0.2
Release: 1
Group: Qt/Qt
License: GPLv2
Expand Down
13 changes: 7 additions & 6 deletions siilihaimobile.pro
Expand Up @@ -2,10 +2,12 @@ TARGET=harbour-siilihai-mobile
CONFIG += sailfishapp
QT += core quick xml network svg

# Required for android
qmlfolder.source = qml/siilihai-mobile-nocomponents
qmlfolder.target = qml
DEPLOYMENTFOLDERS = qmlfolder
android {
# Required for android
qmlfolder.source = qml/siilihai-mobile-nocomponents
qmlfolder.target = qml
DEPLOYMENTFOLDERS = qmlfolder
}

# Always on
CONFIG += with_lib
Expand Down Expand Up @@ -39,8 +41,7 @@ SOURCES += main.cpp siilihaimobile.cpp
HEADERS += siilihaimobile.h

OTHER_FILES += \
rpm/harbour-siilihai-mobile.spec \
rpm/harbour-siilihai-mobile.yaml \
rpm/siilihai-mobile.yaml \
harbour-siilihai-mobile.desktop \
qml/siilihai-mobile-nocomponents/InactiveScreen.qml \
qml/siilihai-mobile-nocomponents/widgets/ConfirmationButton.qml
Expand Down

0 comments on commit 76753c3

Please sign in to comment.