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
Compare revisions
257d070fbe0228bd5c6c6be433c48160eaaefb28 to 20fcdb3cd8cbe10c4598de72b4f647f3bbad2f4a
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
cellframe/libdap-qt-ui-qml
Select target project
No results found
20fcdb3cd8cbe10c4598de72b4f647f3bbad2f4a
Select Git revision
Swap
Target
cellframe/libdap-qt-ui-qml
Select target project
cellframe/libdap-qt-ui-qml
1 result
257d070fbe0228bd5c6c6be433c48160eaaefb28
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
bug-2708
· f2c88775
Konstantin
authored
5 years ago
f2c88775
bug-2708
· 20fcdb3c
Konstantin
authored
5 years ago
20fcdb3c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
DapComboBox.qml
+96
-0
96 additions, 0 deletions
DapComboBox.qml
DapComboBoxDelegate.qml
+31
-0
31 additions, 0 deletions
DapComboBoxDelegate.qml
libdap-qt-ui-qml.pri
+5
-0
5 additions, 0 deletions
libdap-qt-ui-qml.pri
libdap-qt-ui-qml.qrc
+6
-0
6 additions, 0 deletions
libdap-qt-ui-qml.qrc
with
138 additions
and
0 deletions
DapComboBox.qml
0 → 100644
View file @
20fcdb3c
import
QtQuick
2.0
import
QtQuick
.
Controls
2.5
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
///widthPopupComboBoxActive and widthPopupComboBoxNormal - width of the combo box
/// in the active state and in the normal state
///spacingEdgeActive and spacingEdgeNormal - padding width of the combo box in the active state
/// and in the normal state
ComboBox
{
property
string
normalColorText
:
"
#070023
"
property
string
hilightColorText
:
"
#FFFFFF
"
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
spacingEdgeActive
:
16
*
pt
property
int
spacingEdgeNormal
:
16
*
pt
id
:
customComboBox
width
:
popup
.
visible
?
widthPopupComboBoxActive
:
widthPopupComboBoxNormal
height
:
parent
.
height
delegate
:
DapComboBoxDelegate
{
delegateContentText
:
modelData
;}
indicator
:
Image
{
source
:
parent
.
popup
.
visible
?
"
qrc:/Resources/Icons/ic_arrow_drop_up_dark_blue.png
"
:
"
qrc:/Resources/Icons/ic_arrow_drop_down_dark_blue.png
"
width
:
24
*
pt
height
:
24
*
pt
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.right
:
parent
.
right
anchors.rightMargin
:
popup
.
visible
?
spacingEdgeActive
:
spacingEdgeNormal
}
background
:
Rectangle
{
anchors.fill
:
parent
color
:
parent
.
popup
.
visible
?
normalColor
:
"
transparent
"
radius
:
2
*
pt
height
:
parent
.
height
}
contentItem
:
Text
{
anchors.fill
:
parent
anchors.leftMargin
:
popup
.
visible
?
spacingEdgeActive
:
spacingEdgeNormal
anchors.topMargin
:
12
*
pt
text
:
parent
.
displayText
font.family
:
fontRobotoRegular
.
name
font.pixelSize
:
fontSizeComboBox
color
:
normalColorText
verticalAlignment
:
Text
.
AlignTop
}
popup
:
Popup
{
y
:
parent
.
height
-
1
width
:
parent
.
width
+
1
padding
:
1
contentItem
:
ListView
{
clip
:
true
implicitHeight
:
contentHeight
model
:
customComboBox
.
popup
.
visible
?
customComboBox
.
delegateModel
:
null
ScrollIndicator.vertical
:
ScrollIndicator
{
}
}
background
:
Rectangle
{
width
:
customComboBox
.
background
.
width
Rectangle
{
id
:
contentCorner
anchors.fill
:
parent
}
DropShadow
{
anchors.fill
:
parent
source
:
contentCorner
verticalOffset
:
9
*
pt
samples
:
13
*
pt
color
:
"
#40000000
"
}
}
}
DropShadow
{
anchors.fill
:
parent
source
:
background
verticalOffset
:
9
*
pt
samples
:
13
*
pt
color
:
"
#40000000
"
}
}
This diff is collapsed.
Click to expand it.
DapComboBoxDelegate.qml
0 → 100644
View file @
20fcdb3c
import
QtQuick
2.0
import
QtQuick
.
Controls
2.5
ItemDelegate
{
property
string
delegateContentText
:
""
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
?
spacingEdgeActive
:
spacingEdgeNormal
verticalAlignment
:
Qt
.
AlignTop
font.family
:
fontRobotoRegular
.
name
font.pixelSize
:
fontSizeComboBox
text
:
{
if
(
index
!=
currentIndex
)
return
delegateContentText
;}
color
:
hovered
?
hilightColorText
:
normalColorText
}
background
:
Rectangle
{
anchors.fill
:
parent
anchors.bottomMargin
:
10
*
pt
color
:
hovered
?
hilightColor
:
normalColor
}
highlighted
:
parent
.
highlightedIndex
===
index
}
This diff is collapsed.
Click to expand it.
libdap-qt-ui-qml.pri
View file @
20fcdb3c
...
...
@@ -6,5 +6,10 @@ win32{
QMAKE_CXXFLAGS += -mno-ms-bitfields
}
DISTFILES +=
RESOURCES += \
$$PWD/libdap-qt-ui-qml.qrc
This diff is collapsed.
Click to expand it.
libdap-qt-ui-qml.qrc
0 → 100644
View file @
20fcdb3c
<RCC>
<qresource prefix="/">
<file>DapComboBox.qml</file>
<file>DapComboBoxDelegate.qml</file>
</qresource>
</RCC>
This diff is collapsed.
Click to expand it.