From 6f3708128a28d0043056643fb2ed0ed16773dbd1 Mon Sep 17 00:00:00 2001 From: Damian Jansen Date: Tue, 17 May 2011 13:45:03 +1000 Subject: Improve textedit test app --- Qt/examples/declarative/textedit/textedit.qml | 28 +++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/Qt/examples/declarative/textedit/textedit.qml b/Qt/examples/declarative/textedit/textedit.qml index 91d1ee2..9b3e350 100644 --- a/Qt/examples/declarative/textedit/textedit.qml +++ b/Qt/examples/declarative/textedit/textedit.qml @@ -45,11 +45,11 @@ Rectangle { height: 360; width: 640; color: "gray" - Rectangle { id: textedit1box; width: 200; height: 30; color: "green" + Rectangle { id: textedit1box; width: 200; height: 30; color: "green"; border.color: textedit1.activeFocus ? "red" : "green" anchors.left: parent.left; anchors.leftMargin: 20; anchors.top: parent.top; anchors.topMargin: 10 } Rectangle { - id: textedit2box; width: 200; height: 30; color: "lightblue"; clip: true + id: textedit2box; width: 200; height: 30; color: "lightblue"; clip: true; border.color: textedit2.activeFocus ? "red" : "lightblue" anchors.left: parent.left; anchors.leftMargin: 20; anchors.top: textedit1.bottom; anchors.topMargin: 10 } TextEdit { @@ -105,7 +105,7 @@ Rectangle { ListView { id: controlsview model: controls - height: parent.height - 90; width: parent.width - 10; orientation: ListView.Horizontal + height: parent.height * .6; width: parent.width - 10; orientation: ListView.Horizontal anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom; anchors.bottomMargin: 5 } @@ -174,15 +174,19 @@ Rectangle { // Text Styling Item { id: styling - height: controlsview.height; width: 100 - Column { - id: buttonlist - ToggleButton { id: bolded; effectname: "Bold" } - ToggleButton { id: italics; effectname: "Italics" } - ToggleButton { id: strikeouton; effectname: "Strikeout" } - ToggleButton { id: underlineon; effectname: "Underline" } - ToggleButton { id: smoothon; effectname: "Smooth" } - ToggleButton { id: cursoron; effectname: "Cursor"; active: true } + height: controlsview.height; width: 200 + Row { + Column { + id: buttonlist + ToggleButton { id: bolded; effectname: "Bold" } + ToggleButton { id: italics; effectname: "Italics" } + ToggleButton { id: strikeouton; effectname: "Strikeout" } + } + Column { + ToggleButton { id: underlineon; effectname: "Underline" } + ToggleButton { id: smoothon; effectname: "Smooth" } + ToggleButton { id: cursoron; effectname: "Cursor"; active: true } + } } } -- cgit v1.2.3