Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-qt-ui-qml
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
libdap-qt-ui-qml
Commits
69c900e0
Commit
69c900e0
authored
5 years ago
by
tatiana.novikova
Browse files
Options
Downloads
Patches
Plain Diff
[*] Update calculating and deleting the unnecessary part of text at comboBox
[-] Delete unused property
parent
acf63490
No related branches found
Branches containing commit
No related tags found
1 merge request
!14
Features 2603
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
widgets/DapComboBox.qml
+21
-2
21 additions, 2 deletions
widgets/DapComboBox.qml
widgets/DapComboBoxForm.ui.qml
+2
-10
2 additions, 10 deletions
widgets/DapComboBoxForm.ui.qml
with
23 additions
and
12 deletions
widgets/DapComboBox.qml
+
21
−
2
View file @
69c900e0
...
@@ -44,16 +44,35 @@ DapComboBoxForm
...
@@ -44,16 +44,35 @@ DapComboBoxForm
if
(
index
!=
currentIndex
)
if
(
index
!=
currentIndex
)
return
widthPopupComboBoxActive
-
2
*
sidePaddingActive
;
return
widthPopupComboBoxActive
-
2
*
sidePaddingActive
;
else
else
return
widthPopupComboBoxNormal
-
indicatorWidth
;
return
widthPopupComboBoxNormal
-
indicatorWidth
-
indicatorLeftInterval
;
}
}
}
}
FontMetrics
{
id
:
fm
font
:
dapComboBox
.
font
}
text
:
text
:
{
{
if
(
index
!=
currentIndex
)
if
(
index
!=
currentIndex
)
{
console
.
log
(
fm
.
tightBoundingRect
(
"
le
"
).
width
);
if
(
tm
.
elidedText
.
length
<
tm
.
text
.
length
)
return
tm
.
elidedText
.
substring
(
0
,
tm
.
elidedText
.
length
-
1
)
+
((
fm
.
tightBoundingRect
(
tm
.
elidedText
.
substring
(
0
,
tm
.
elidedText
.
length
-
1
)).
width
+
fm
.
tightBoundingRect
(
tm
.
text
.
charAt
(
tm
.
elidedText
.
length
-
1
)
+
'
..
'
).
width
)
<
tm
.
elideWidth
?
(
tm
.
text
.
charAt
(
tm
.
elidedText
.
length
-
1
)
+
'
..
'
)
:
'
..
'
);
return
tm
.
elidedText
.
replace
(
'
…
'
,
'
..
'
);
return
tm
.
elidedText
.
replace
(
'
…
'
,
'
..
'
);
}
else
else
{
{
mainLineText
=
tm
.
elidedText
.
replace
(
'
…
'
,
'
..
'
);
if
(
tm
.
elidedText
.
length
<
tm
.
text
.
length
)
mainLineText
=
tm
.
elidedText
.
substring
(
0
,
tm
.
elidedText
.
length
-
1
)
+
((
fm
.
tightBoundingRect
(
tm
.
elidedText
.
substring
(
0
,
tm
.
elidedText
.
length
-
1
)).
width
+
fm
.
tightBoundingRect
(
tm
.
text
.
charAt
(
tm
.
elidedText
.
length
-
1
)
+
'
..
'
).
width
)
<
tm
.
elideWidth
?
(
tm
.
text
.
charAt
(
tm
.
elidedText
.
length
-
1
)
+
'
..
'
)
:
'
..
'
);
else
mainLineText
=
tm
.
elidedText
.
replace
(
'
…
'
,
'
..
'
);
return
""
;
return
""
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
widgets/DapComboBoxForm.ui.qml
+
2
−
10
View file @
69c900e0
...
@@ -33,18 +33,8 @@ ComboBox
...
@@ -33,18 +33,8 @@ ComboBox
property
int
sidePaddingNormal
property
int
sidePaddingNormal
///@detalis sidePaddingActive Sets the indent from the edge of the right and left edges of the parent in the active state.
///@detalis sidePaddingActive Sets the indent from the edge of the right and left edges of the parent in the active state.
property
int
sidePaddingActive
property
int
sidePaddingActive
///@detalis topIndentNormal Sets the indent from the edge of the upper of the parent in the normal state.
property
int
topIndentNormal
///@detalis topIndentActive Sets the indent from the edge of the upper of the parent in the active state.
property
int
topIndentActive
///@detalis bottomIndentNormal Sets the indent from the edge of the lower of the parent in the normal state.
property
int
bottomIndentNormal
///@detalis bottomIndentActive Sets the indent from the edge of the lower of the parent in the active state.
property
int
bottomIndentActive
///@detalis paddingTopItemDelegate Indent above from item delegate.
///@detalis paddingTopItemDelegate Indent above from item delegate.
property
int
paddingTopItemDelegate
property
int
paddingTopItemDelegate
///@detalis paddingBottomItemDelegate Indent below from item delegate.
property
int
paddingBottomItemDelegate
///@detalis heightListElement List item height.
///@detalis heightListElement List item height.
property
int
heightListElement
property
int
heightListElement
///@detalis intervalListElement Spacing between items in a list.
///@detalis intervalListElement Spacing between items in a list.
...
@@ -61,6 +51,8 @@ ComboBox
...
@@ -61,6 +51,8 @@ ComboBox
property
int
indicatorWidth
property
int
indicatorWidth
///@detalis indicatorHeight Indicator height.
///@detalis indicatorHeight Indicator height.
property
int
indicatorHeight
property
int
indicatorHeight
///@detalis indicatorLeftInterval Space between indicator border and text border
property
int
indicatorLeftInterval
/// colorTopNormalDropShadow Color of the shadow effect of the combo box when minimized.
/// colorTopNormalDropShadow Color of the shadow effect of the combo box when minimized.
property
string
colorTopNormalDropShadow
property
string
colorTopNormalDropShadow
///@detalis colorDropShadow Unboxed shadow color in expanded state.
///@detalis colorDropShadow Unboxed shadow color in expanded state.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment