[-]
[+]
|
Changed |
_service:tar_git:harbour-dwd-0.8.2.tar.bz2/qml/pages/DailyDetails.qml
^
|
@@ -160,7 +160,7 @@
anchors.fill: parent
//x: Theme.horizontalPageMargin
width: parent.width
- height: 2000
+ height: contentItem.childrenRect.heigh
id: listView
model: listModel
delegate: WeatherItem{
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dwd-0.8.2.tar.bz2/qml/pages/ManageLocations.qml
^
|
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with harbour-meteoswiss. If not, see <http://www.gnu.org/licenses/>.
+ * along with harbour-dwd. If not, see <http://www.gnu.org/licenses/>.
*
*/
@@ -40,6 +40,8 @@
Component.onCompleted: {
//fetchStoredCities();
+ positionSource.update();
+ gpsLocations();
}
function titleCase(str) {
//str.toLowerCase().replace('/\b(\w)/g');
@@ -97,7 +99,7 @@
function gpsLocations() {
debug = false;
- var uri = "https://api.brightsky.dev/sources?lat=" + lat + "&lon=" + lon + "&max_dist=30000";
+ var uri = "https://api.brightsky.dev/sources?lat=" + lat + "&lon=" + lon + "&max_dist=22000";
if (debug) console.debug(JSON.stringify(uri))
Locs.httpRequest(uri, function(doc) {
var response = JSON.parse(doc.responseText);
@@ -132,7 +134,7 @@
PositionSource {
id: positionSource
- //active: true
+ active: true
onPositionChanged: {
coord = positionSource.position.coordinate;
@@ -202,53 +204,18 @@
padding:Theme.paddingLarge
text: "Longitude: "+ coord.longitude + "\n" + "Latitude: " + coord.latitude
}
+
Item {
width: parent.width
height: Theme.paddingLarge
}
- Text {
- id: activityText;
- color: Theme.backgroundGlowColor
- font.bold: true
- padding:Theme.paddingLarge
- property bool fadeOut: false
- visible: true
- text: {
- if (fadeOut)
- return qsTr("Timeout occurred!")
- else if (positionSource.active)
- // this will, given source is marked active always be true
- // why this is different than in 3.4, I don't know
- return qsTr("Retrieving update...")
- else
- return ""
- }
-
- Timer {
- id: fadeoutTimer; repeat: false; interval: 3000; running: activityText.fadeOut
- onTriggered: { activityText.fadeOut = false; }
- }
- }
- /* Consider adding a search by Lat/Long
- SearchField {
- placeholderText: qsTr("Search")
- id: searchField
- width: parent.width
- anchors.top: header.bottom
- inputMethodHints: Qt.ImhNoPredictiveText
-
- onTextChanged: listModel.update()
- EnterKey.onClicked: {
- if (text != "") searchField.focus = false
- }
- }*/
SilicaListView {
//anchors.top: header.bottom
id:listView
leftMargin: Theme.paddingLarge
topMargin: Theme.paddingLarge
width: parent.width - 2*x
- height: contentItem.childrenRect.height - 200
+ height: contentItem.childrenRect.height - 50
//anchors.horizontalCenter: parent.horizontalCenter
model: ListModel {
id: listModel
@@ -280,16 +247,15 @@
ScrollDecorator { color: palette.primaryColor }
}
+ Item {
+ width: parent.width
+ height: Theme.paddingLarge * 2
+ }
- }
- VerticalScrollDecorator {}
- ScrollDecorator { color: palette.primaryColor }
-
- Button {
+ Button {
id: locateButton
text: "Locate & update"
- anchors.top: column.bottom
- anchors.left: column.left
+ anchors.left : column.horizontalCenter
visible: true
onClicked: {
if (positionSource.supportedPositioningMethods ===
@@ -300,7 +266,39 @@
positionSource.update();
gpsLocations();
}
+ }
+ Item {
+ width: parent.width
+ height: Theme.paddingLarge
+ }
+ Text {
+ id: activityText;
+ color: Theme.backgroundGlowColor
+ font.bold: true
+ padding:Theme.paddingLarge
+ property bool fadeOut: false
+ visible: true
+ text: {
+ if (fadeOut)
+ return qsTr("Timeout occurred!")
+ else if (positionSource.active)
+ // this will, given source is marked active always be true
+ // why this is different than in 3.4, I don't know
+ return qsTr("Retrieving update...")
+ else
+ return ""
+ }
+
+ Timer {
+ id: fadeoutTimer; repeat: false; interval: 3000; running: activityText.fadeOut
+ onTriggered: { activityText.fadeOut = false; }
+ }
+ }
}
+ VerticalScrollDecorator {}
+ ScrollDecorator { color: palette.primaryColor }
+
+
Text {id: sourceText; color: "white"; font.bold: true;
anchors.top: locateButton.bottom
anchors.left: locateButton.left
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dwd-0.8.2.tar.bz2/qml/pages/OverviewPage.qml
^
|
@@ -165,7 +165,7 @@
topMargin: 200
//x: Theme.horizontalPageMargin
width: parent.width
- height: 2000
+ height: contentItem.childrenRect.heigh
id: listView
model: ListModel {
id: listModel
|