Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
08917bb2
Commit
08917bb2
authored
Feb 02, 2010
by
Christiaan Janssen
Browse files
QmlDesigner.StatesEditor: TextInput area fits the whole containing box
parent
ddf6e93d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/components/stateseditor/stateslist.qml
View file @
08917bb2
...
...
@@ -197,24 +197,25 @@ Rectangle {
id
:
txt
text
:
stateName
color
:
"
#E1E1E1
"
;
MouseRegion
{
id
:
txtRegion
anchors.fill
:
parent
onClicked
:
{
if
(
root
.
currentStateIndex
!=
index
)
root
.
unFocus
();
root
.
currentStateIndex
=
index
;
}
MouseRegion
{
id
:
txtRegion
anchors.fill
:
parent
onClicked
:
{
if
(
root
.
currentStateIndex
!=
index
)
root
.
unFocus
();
root
.
currentStateIndex
=
index
;
}
onDoubleClicked
:
if
(
index
!=
0
)
{
stateNameInput
.
text
=
stateName
;
stateNameInput
.
focus
=
true
;
stateNameEditor
.
visible
=
true
;
stateNameInput
.
cursorVisible
=
true
;
}
}
onDoubleClicked
:
if
(
index
!=
0
)
{
stateNameInput
.
text
=
stateName
;
stateNameInput
.
focus
=
true
;
stateNameEditor
.
visible
=
true
;
stateNameInput
.
cursorVisible
=
true
;
}
}
Rectangle
{
id
:
stateNameEditor
visible
:
false
...
...
@@ -222,7 +223,7 @@ Rectangle {
x
:
2
y
:
2
height
:
parent
.
height
width
:
Math
.
max
(
img
.
width
,
txt
.
width
+
removeState
.
width
+
2
,
stateNameInpu
t
.
width
+
16
)
width
:
Math
.
max
(
img
.
width
,
txt
.
width
+
removeState
.
width
+
2
,
transparentTex
t
.
width
+
16
)
clip
:
true
color
:
"
white
"
...
...
@@ -239,10 +240,16 @@ Rectangle {
id
:
AbsorbAllClicks
anchors.fill
:
parent
}
Text
{
text
:
stateNameInput
.
text
visible
:
false
id
:
transparentText
}
TextInput
{
id
:
stateNameInput
x
:
10
text
:
stateName
anchors.fill
:
parent
anchors.leftMargin
:
8
onAccepted
:
{
statesEditorModel
.
renameState
(
index
,
text
);
parent
.
visible
=
false
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment