Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qtquickcontrols-nemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
qtquickcontrols-nemo
Commits
959652f8
Commit
959652f8
authored
Jan 06, 2018
by
Chupligin Sergey
Committed by
Sergey Chupligin
Apr 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Dialogs] Add simple dialog
parent
b2cd03d8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
0 deletions
+93
-0
controls.pro
src/controls/controls.pro
+1
-0
Dialog.qml
src/controls/qml/dialogs/Dialog.qml
+91
-0
qmldir
src/controls/qml/dialogs/qmldir
+1
-0
No files found.
src/controls/controls.pro
View file @
959652f8
...
...
@@ -15,6 +15,7 @@ QML_FILES += \
qml
/
Checkbox
.
qml
\
qml
/
ButtonRow
.
qml
\
qml
/
QueryDialog
.
qml
\
qml
/
Dialog
.
qml
\
qml
/
Header
.
qml
\
qml
/
HeaderToolsLayout
.
qml
\
qml
/
Slider
.
qml
\
...
...
src/controls/qml/dialogs/Dialog.qml
0 → 100644
View file @
959652f8
import
QtQuick
2.6
import
QtQuick
.
Controls
.
Nemo
1.0
Item
{
id
:
shell
anchors.fill
:
parent
signal
accepted
()
property
alias
acceptText
:
accept
.
text
property
alias
headingText
:
heading
.
text
property
alias
subLabelText
:
subLabel
.
text
property
real
bgOpacity
:
1
;
property
string
icon
:
""
property
bool
inline
:
true
function
open
(){
shell
.
visible
=
true
}
function
close
(){
shell
.
visible
=
false
}
visible
:
false
Rectangle
{
id
:
shadow
width
:
parent
.
width
height
:
inline
?
(
parent
.
height
-
accept
.
height
)
/
3
:
parent
.
height
-
accept
.
height
opacity
:
shell
.
bgOpacity
color
:
Theme
.
backgroundColor
anchors.bottom
:
accept
.
top
}
Image
{
id
:
icon
source
:
shell
.
icon
width
:
Theme
.
itemHeightMedium
height
:
width
anchors
{
top
:
shell
.
top
topMargin
:
Theme
.
itemSpacingHuge
horizontalCenter
:
shell
.
horizontalCenter
}
visible
:
shell
.
icon
!=
""
&&
!
inline
fillMode
:
Image
.
PreserveAspectCrop
}
Label
{
id
:
heading
width
:
parent
.
width
*
0.95
anchors
{
centerIn
:
inline
?
shadow
:
parent
}
horizontalAlignment
:
Text
.
AlignHCenter
font.weight
:
Theme
.
fontWeightLarge
font.pixelSize
:
inline
?
Theme
.
fontSizeTiny
:
Theme
.
fontSizeSmall
wrapMode
:
Text
.
Wrap
}
Label
{
id
:
subLabel
width
:
parent
.
width
*
0.95
wrapMode
:
Text
.
Wrap
font.weight
:
Theme
.
fontWeightMedium
font.pixelSize
:
inline
?
Theme
.
fontSizeTiny
:
Theme
.
fontSizeSmall
horizontalAlignment
:
Text
.
AlignHCenter
anchors
{
top
:
heading
.
bottom
topMargin
:
inline
?
Theme
.
itemSpacingSmall
:
Theme
.
itemSpacingLarge
horizontalCenter
:
shell
.
horizontalCenter
}
}
Button
{
id
:
accept
width
:
parent
.
width
height
:
Theme
.
itemHeightLarge
primary
:
true
anchors
{
left
:
parent
.
left
bottom
:
parent
.
bottom
}
onClicked
:
{
shell
.
accepted
()
close
();
}
}
}
src/controls/qml/dialogs/qmldir
View file @
959652f8
QueryDialog 1.0 QueryDialog.qml
Dialog 1.0 Dialog.qml
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