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
2e1a68b1
Commit
2e1a68b1
authored
Feb 16, 2010
by
Christiaan Janssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QmlDesigner.Navigator: Long text in items' names is elided
parent
aec39f55
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
12 deletions
+3
-12
src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp
...ns/qmldesigner/components/navigator/navigatortreeview.cpp
+2
-11
src/plugins/qmldesigner/components/navigator/navigatorview.cpp
...lugins/qmldesigner/components/navigator/navigatorview.cpp
+1
-1
No files found.
src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp
View file @
2e1a68b1
...
...
@@ -160,17 +160,8 @@ void IdItemDelegate::paint(QPainter *painter,
// Check text length does not exceed available space
int
extraSpace
=
12
+
pixmap
.
width
();
QFontMetrics
metric
(
painter
->
fontMetrics
());
if
(
painter
->
fontMetrics
().
boundingRect
(
myString
).
width
()
>
option
.
rect
.
width
()
-
extraSpace
)
{
QString
origString
(
myString
);
int
cutpoint
=
origString
.
length
()
/
2
;
while
(
painter
->
fontMetrics
().
boundingRect
(
myString
).
width
()
>
option
.
rect
.
width
()
-
extraSpace
)
{
cutpoint
--
;
myString
=
origString
.
left
(
cutpoint
)
+
QLatin1String
(
"..."
)
+
origString
.
right
(
cutpoint
);
}
}
QFontMetrics
fm
(
option
.
font
);
myString
=
fm
.
elidedText
(
myString
,
Qt
::
ElideMiddle
,
option
.
rect
.
width
()
-
extraSpace
);
painter
->
drawText
(
option
.
rect
.
bottomLeft
()
+
QPoint
(
3
+
pixmap
.
width
(),
-
8
),
myString
);
...
...
src/plugins/qmldesigner/components/navigator/navigatorview.cpp
View file @
2e1a68b1
...
...
@@ -90,7 +90,7 @@ void NavigatorView::modelAttached(Model *model)
treeWidget
()
->
header
()
->
setResizeMode
(
0
,
QHeaderView
::
Stretch
);
treeWidget
()
->
header
()
->
resizeSection
(
1
,
26
);
treeWidget
()
->
setRootIsDecorated
(
false
);
treeWidget
()
->
setIndentation
(
4
0
);
treeWidget
()
->
setIndentation
(
2
0
);
#ifdef _LOCK_ITEMS_
treeWidget
()
->
header
()
->
resizeSection
(
2
,
20
);
#endif
...
...
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