summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels Weber <niels.weber@digia.com>2014-10-13 13:58:55 +0200
committerCaroline Chao <caroline.chao@digia.com>2014-10-15 08:27:34 +0200
commitc9339cdfd32f5a6fc4ccd9081f97c790e4252e66 (patch)
tree08aeefde2b3c3064c0d060cda82b651d5b8b6d73
parent08b4b04b994a51606924385f3e48f0a7b75fb7e3 (diff)
Add a link to conference Website to menu
Change-Id: Ic8367a306fb9306320a478adfa5208a8afa9bf76 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
-rw-r--r--qml/main.qml10
-rw-r--r--src/theme.cpp2
2 files changed, 9 insertions, 3 deletions
diff --git a/qml/main.qml b/qml/main.qml
index 0859980..46ea59c 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -91,7 +91,8 @@ ApplicationWindow {
append({name: Theme.text.favorites.arg(""), id: "favorites" })
append({name: Theme.text.floorPlan, id: "floorPlan" })
append({name: Theme.text.switchConf, id: "switchConf" })
- menuRectangle.height = Theme.sizes.buttonHeight * menuModel.count
+ append({name: Theme.text.toWebsite, id: "toWebsite" })
+ menuRectangle.height = Theme.sizes.menuItemHeight * menuModel.count
}
}
Repeater {
@@ -111,10 +112,10 @@ ApplicationWindow {
Rectangle {
z: 3
- height: Theme.sizes.buttonHeight
+ height: Theme.sizes.menuItemHeight
width: parent.width
color: !mouseArea.pressed ? Theme.colors.white : Theme.colors.gray_menu
- y: Theme.sizes.buttonHeight * index
+ y: Theme.sizes.menuItemHeight * index
Text {
z: 3
anchors.left: parent.left
@@ -196,6 +197,9 @@ ApplicationWindow {
stack.push(item)
}
break
+ case "toWebsite":
+ Qt.openUrlExternally(applicationClient.currentConferenceDetails.infopage)
+ break
default:
break
}
diff --git a/src/theme.cpp b/src/theme.cpp
index 646b579..ca1d0f3 100644
--- a/src/theme.cpp
+++ b/src/theme.cpp
@@ -88,6 +88,7 @@ Theme::Theme(QObject *parent)
m_text->insert(QLatin1String("floorPlan"), tr("Floor Plan"));
m_text->insert(QLatin1String("networkErrorInit"), tr("Network Error: check your device's network connection"));
m_text->insert(QLatin1String("endedEvent"), tr("The conference has now ended"));
+ m_text->insert(QLatin1String("toWebsite"), tr("Website (external)"));
m_colors = new QQmlPropertyMap(this);
m_colors->insert(QLatin1String("white"), QVariant("#ffffff"));
@@ -130,6 +131,7 @@ Theme::Theme(QObject *parent)
m_sizes->insert(QLatin1String("reloadButtonSize"), QVariant(applyRatio(50)));
m_sizes->insert(QLatin1String("twitterAvatarSize"), QVariant(applyRatio(80)));
m_sizes->insert(QLatin1String("menuPopupWidth"), QVariant(applyRatio(550)));
+ m_sizes->insert(QLatin1String("menuItemHeight"), QVariant(applyRatio(110)));
m_images = new QQmlPropertyMap(this);
m_images->insert(QLatin1String("back"), QVariant("qrc:/images/BackArrow.svg"));