Support landscape mode

This commit is contained in:
Andrea Scarpino 2015-07-03 17:19:19 +02:00
parent 4efa44bcdd
commit 60a910539e
5 changed files with 16 additions and 11 deletions

View file

@ -1,5 +1,5 @@
/* /*
Copyright (C) 2014 Andrea Scarpino <me@andreascarpino.it> Copyright (C) 2014-2015 Andrea Scarpino <me@andreascarpino.it>
All rights reserved. All rights reserved.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
@ -26,25 +26,25 @@ Page {
readonly property color defaultStrokeColor: Qt.rgba(0, 0, 0, 1) readonly property color defaultStrokeColor: Qt.rgba(0, 0, 0, 1)
readonly property color defaultFillColor: Qt.rgba(1, 1, 1, 1) readonly property color defaultFillColor: Qt.rgba(1, 1, 1, 1)
allowedOrientations: Orientation.All
Column { Column {
anchors.fill: parent anchors.fill: parent
Row { Row {
id: menu id: menu
spacing: 10 spacing: Theme.paddingSmall
width: parent.width width: parent.width
// Workaround: we don't want the Slider animation to resize this! // Workaround: we don't want the Slider animation to resize this!
height: Theme.itemSizeMedium height: Theme.itemSizeMedium
IconTextSwitch { IconTextSwitch {
id: edit
checked: true checked: true
icon.source: "image://theme/icon-s-edit" icon.source: "image://theme/icon-s-edit"
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: 120 width: 120
// Don't waste space
rightMargin: 0
// default value for the rubber // default value for the rubber
property real prevLineWidth: defaultRubberSize; property real prevLineWidth: defaultRubberSize;
@ -71,7 +71,7 @@ Page {
stepSize: 1 stepSize: 1
value: defaultStrokeSize value: defaultStrokeSize
valueText: value valueText: value
width: 240 width: parent.width - edit.width - save.width - clearBtn.width
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -85,6 +85,7 @@ Page {
} }
IconButton { IconButton {
id: save
icon.source: "image://theme/icon-m-image" icon.source: "image://theme/icon-m-image"
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -105,6 +106,7 @@ Page {
} }
IconButton { IconButton {
id: clearBtn
icon.source: "image://theme/icon-m-clear" icon.source: "image://theme/icon-m-clear"
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter

View file

@ -1,3 +1,6 @@
* Fri Jul 03 2015 Andrea Scarpino <me@andreascarpino.it> 1.2-1
- Landscape support.
* Sat Nov 29 2014 Andrea Scarpino <me@andreascarpino.it> 1.1-1 * Sat Nov 29 2014 Andrea Scarpino <me@andreascarpino.it> 1.1-1
- Implemented 'Save' function. - Implemented 'Save' function.

View file

@ -13,7 +13,7 @@ Name: harbour-papocchio
%{!?qtc_make:%define qtc_make make} %{!?qtc_make:%define qtc_make make}
%{?qtc_builddir:%define _builddir %qtc_builddir} %{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: Paint using your finger Summary: Paint using your finger
Version: 1.1 Version: 1.2
Release: 1 Release: 1
Group: Qt/Qt Group: Qt/Qt
License: GPLv3 License: GPLv3

View file

@ -1,6 +1,6 @@
Name: harbour-papocchio Name: harbour-papocchio
Summary: Paint using your finger Summary: Paint using your finger
Version: 1.1 Version: 1.2
Release: 1 Release: 1
# The contents of the Group field should be one of the groups listed here: # The contents of the Group field should be one of the groups listed here:
# http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS # http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS

View file

@ -4,7 +4,7 @@
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message> <message>
<location filename="../qml/cover/CoverPage.qml" line="26"/> <location filename="../qml/cover/CoverPage.qml" line="25"/>
<source>Draw!</source> <source>Draw!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -12,12 +12,12 @@
<context> <context>
<name>MainPage</name> <name>MainPage</name>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="97"/> <location filename="../qml/pages/MainPage.qml" line="98"/>
<source>Saving the canvas...</source> <source>Saving the canvas...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="112"/> <location filename="../qml/pages/MainPage.qml" line="114"/>
<source>Clearing the canvas...</source> <source>Clearing the canvas...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>