Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
aec39f55
Commit
aec39f55
authored
Feb 16, 2010
by
Christiaan Janssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QmlDesigner.StatesEditor: State name text is elided if too long
parent
1aa3ec58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
19 deletions
+5
-19
src/plugins/qmldesigner/components/stateseditor/stateslist.qml
...lugins/qmldesigner/components/stateseditor/stateslist.qml
+5
-19
No files found.
src/plugins/qmldesigner/components/stateseditor/stateslist.qml
View file @
aec39f55
...
...
@@ -200,8 +200,6 @@ Rectangle {
anchors.centerIn
:
parent
}
MouseRegion
{
anchors.fill
:
parent
onClicked
:
{
...
...
@@ -235,28 +233,16 @@ Rectangle {
anchors.leftMargin
:
4
height
:
txt
.
height
clip
:
false
onWidthChanged
:
txt
.
updateText
();
Text
{
Text
{
anchors.top
:
parent
.
top
anchors.topMargin
:
2
anchors.horizontalCenter
:
textLimits
.
horizontalCenter
id
:
txt
color
:
"
#E1E1E1
"
;
property
string
candidateText
:
stateName
onCandidateTextChanged
:
updateText
();
function
updateText
()
{
var
cut
=
Math
.
floor
(
candidateText
.
length
/
2
);
text
=
candidateText
;
if
(
parent
.
width
<=
0
)
return
;
while
(
width
>
parent
.
width
)
{
cut
=
cut
-
1
;
text
=
candidateText
.
substring
(
0
,
cut
)
+
"
...
"
+
candidateText
.
substring
(
candidateText
.
length
-
cut
,
candidateText
.
length
);
}
}
text
:
stateName
width
:
parent
.
width
elide
:
Qt
.
ElideMiddle
horizontalAlignment
:
Qt
.
AlignHCenter
}
MouseRegion
{
id
:
txtRegion
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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