From 0a22b340e9f529aa0077c39a056a2c84ac7b1ebb Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Mon, 7 Dec 2015 23:26:30 +0100 Subject: simplify and style log page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - less instantiated objects inside each other - add page heading - allow wrapping of text Signed-off-by: Sebastian Kügler --- qt-mobile/qml/Log.qml | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) (limited to 'qt-mobile/qml') diff --git a/qt-mobile/qml/Log.qml b/qt-mobile/qml/Log.qml index c2a00c8c3..9e29a4d00 100644 --- a/qt-mobile/qml/Log.qml +++ b/qt-mobile/qml/Log.qml @@ -20,29 +20,16 @@ MobileComponents.Page { anchors.fill: parent contentHeight: logContent.height clip: true - Item { - id: logContent - width: logFlick.width - height: childrenRect.height + MobileComponents.Units.smallSpacing * 2 - - ColumnLayout { - anchors { - left: parent.left - right: parent.right - top: parent.top - margins: MobileComponents.Units.smallSpacing - } - spacing: MobileComponents.Units.smallSpacing - - Text { - width: logWindow.width - wrapMode: Text.Wrap - text: manager.logText - } - Item { - height: MobileComponents.Units.gridUnit * 3 - width: height - } + ColumnLayout { + spacing: MobileComponents.Units.smallSpacing + MobileComponents.Heading { + text: "Application Log" + } + MobileComponents.Label { + id: logContent + width: logFlick.width + wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere + text: manager.logText } } } -- cgit v1.2.3-70-g09d2 From 5efb145cb65abfa28d9efe1553b99c1d107ddbfc Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Tue, 8 Dec 2015 00:11:32 +0100 Subject: Fix text wrapping in log viewer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apparently, the width setting got lost in the previous change. This sets the width of the log text explicitely to the grandparent's width. It fixes text clipping in the log window. Signed-off-by: Sebastian Kügler --- qt-mobile/qml/Log.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qt-mobile/qml') diff --git a/qt-mobile/qml/Log.qml b/qt-mobile/qml/Log.qml index 9e29a4d00..f49e3ba73 100644 --- a/qt-mobile/qml/Log.qml +++ b/qt-mobile/qml/Log.qml @@ -21,13 +21,15 @@ MobileComponents.Page { contentHeight: logContent.height clip: true ColumnLayout { + width: logFlick.width spacing: MobileComponents.Units.smallSpacing MobileComponents.Heading { text: "Application Log" } MobileComponents.Label { id: logContent - width: logFlick.width + Layout.preferredWidth: parent.width + Layout.maximumWidth: parent.width wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere text: manager.logText } -- cgit v1.2.3-70-g09d2