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
Merge requests
!2
Bug 2708
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Bug 2708
bug-2708
into
master
Overview
0
Commits
6
Pipelines
0
Changes
3
Merged
konstantin.kukharenko
requested to merge
bug-2708
into
master
5 years ago
Overview
0
Commits
6
Pipelines
0
Changes
3
Expand
👍
0
👎
0
Merge request reports
Compare
version 1
version 1
7b490c2c
5 years ago
master (base)
and
latest version
latest version
8dfd465e
6 commits,
5 years ago
version 1
7b490c2c
5 commits,
5 years ago
Show latest version
3 files
+
49
−
44
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
DapComboBox.qml
+
49
−
12
Options
@@ -3,11 +3,12 @@ import QtQuick.Controls 2.2
import
QtQuick
.
Controls
.
Styles
1.4
import
QtGraphicalEffects
1.0
///This file will be moved to libdap and removed from here.
///this comboBox used int top panel exchange and statusBar will be deleted in the future
///About property
///@hilightColor - color of the selected item
///@fontSizeComboBox - font size for the entire widget
///@normalColor - color of item
///@normalColorText and @hilightColorText - normal and selected text color
///@normalColorTopText and @hilightColorTopText - text color in the main line in normal and active state
///@fontSizeComboBox - font size for the entire widget (px).
///@widthPopupComboBoxActive and @widthPopupComboBoxNormal - width of the combo box
/// in the active state and in the normal state
///@sidePaddingActive and @sidePaddingNormal - padding width of the combo box in the active state
@@ -17,38 +18,74 @@ import QtGraphicalEffects 1.0
///@topIndentActive and @topIndentNormal
///@bottomIndentActive and @bottomIndentNormal
/// - sets the indent from the edge of the upper and lower edges of the parent in the active and normal state
///@indicatorImageNormal and @indicatorImageActive - indicator picture address for active and normal state
///@indicatorWidth and @indicatorHeight - indicator width and height
ComboBox
{
property
string
normalColorText
:
"
#070023
"
property
string
hilightColorText
:
"
#FFFFFF
"
property
string
normalColorTopText
:
normalColorText
property
string
hilightColorTopText
:
normalColorText
property
string
normalColor
:
"
#FFFFFF
"
property
string
hilightColor
:
"
#330F54
"
property
int
fontSizeComboBox
:
16
*
pt
property
int
widthPopupComboBoxActive
:
parent
.
width
property
int
widthPopupComboBoxNormal
:
parent
.
width
property
int
widthPopupComboBoxActive
:
widthPopupComboBoxNormal
property
int
sidePaddingActive
:
16
*
pt
property
int
sidePaddingNormal
:
16
*
pt
property
int
sidePaddingActive
:
sidePaddingNormal
property
int
topIndentActive
:
12
*
pt
property
int
topIndentNormal
:
12
*
pt
property
int
topIndentActive
:
topIndentNormal
property
int
bottomIndentActive
:
14
*
pt
property
int
bottomIndentNormal
:
14
*
pt
property
int
bottomIndentActive
:
bottomIndentNormal
property
string
indicatorImageNormal
:
"
qrc:/res/icons/ic_arrow_drop_down_dark_blue.png
"
property
string
indicatorImageActive
:
"
qrc:/res/icons/ic_arrow_drop_up_dark_blue.png
"
property
int
indicatorWidth
:
24
*
pt
property
int
indicatorHeight
:
indicatorWidth
id
:
customComboBox
width
:
popup
.
visible
?
widthPopupComboBoxActive
:
widthPopupComboBoxNormal
height
:
parent
.
height
delegate
:
DapComboBoxDelegate
{
delegateContentText
:
modelData
;}
delegate
:
ItemDelegate
{
width
:
parent
.
width
height
:{
if
(
index
==
currentIndex
)
return
0
else
return
42
*
pt
}
contentItem
:
Text
{
id
:
textDelegateComboBox
anchors.fill
:
parent
anchors.topMargin
:
8
*
pt
anchors.leftMargin
:
popup
.
visible
?
sidePaddingActive
:
sidePaddingNormal
verticalAlignment
:
Qt
.
AlignTop
font.family
:
fontRobotoRegular
.
name
font.pixelSize
:
fontSizeComboBox
text
:
{
if
(
index
!=
currentIndex
)
return
modelData
;}
color
:
hovered
?
hilightColorText
:
normalColorText
}
background
:
Rectangle
{
anchors.fill
:
parent
anchors.bottomMargin
:
10
*
pt
color
:
hovered
?
hilightColor
:
normalColor
}
highlighted
:
parent
.
highlightedIndex
===
index
}
indicator
:
Image
{
source
:
parent
.
popup
.
visible
?
"
qrc:/res/icons/ic_arrow_drop_up_dark_blue.png
"
:
"
qrc:/res/icons/ic_arrow_drop_down_dark_blue.png
"
width
:
24
*
pt
height
:
24
*
p
t
source
:
parent
.
popup
.
visible
?
indicatorImageActive
:
indicatorImageNormal
width
:
indicatorWidth
height
:
indicatorHeigh
t
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.right
:
parent
.
right
anchors.rightMargin
:
popup
.
visible
?
sidePaddingActive
:
sidePaddingNormal
@@ -69,7 +106,7 @@ ComboBox {
text
:
parent
.
displayText
font.family
:
fontRobotoRegular
.
name
font.pixelSize
:
fontSizeComboBox
color
:
normalColorText
color
:
popup
.
visible
?
hilightColorTopText
:
normalColorT
opT
ext
verticalAlignment
:
Text
.
AlignTop
}
Loading