Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
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
Administrator
linphone-desktop
Commits
b81239ae
Commit
b81239ae
authored
Sep 27, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(Form/ExclusiveButtons): use style file
parent
eaafc4b0
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
108 additions
and
59 deletions
+108
-59
linphone.pro
tests/linphone.pro
+1
-0
resources.qrc
tests/resources.qrc
+2
-0
ExclusiveButtons.qml
tests/ui/modules/Linphone/Form/ExclusiveButtons.qml
+31
-30
SmallButton.qml
tests/ui/modules/Linphone/Form/SmallButton.qml
+25
-22
ExclusiveButtonsStyle.qml
...ui/modules/Linphone/Styles/Form/ExclusiveButtonsStyle.qml
+17
-0
SmallButtonStyle.qml
tests/ui/modules/Linphone/Styles/Form/SmallButtonStyle.qml
+22
-0
qmldir
tests/ui/modules/Linphone/Styles/qmldir
+10
-7
No files found.
tests/linphone.pro
View file @
b81239ae
...
@@ -36,6 +36,7 @@ lupdate_only{
...
@@ -36,6 +36,7 @@ lupdate_only{
ui/modules/Linphone/Popup
/*
.qml \
ui/modules/Linphone/Popup
/*
.qml \
ui/modules/Linphone/Select
/*
.qml \
ui/modules/Linphone/Select
/*
.qml \
ui/modules/Linphone/Styles
/*
.qml \
ui/modules/Linphone/Styles
/*
.qml \
ui/modules/Linphone/Styles/Form
/*
.qml \
ui/modules/Linphone/View
/*
.qml \
ui/modules/Linphone/View
/*
.qml \
ui/views
/*
.qml \
ui/views
/*
.qml \
ui/views/MainWindow
/*
.qml \
ui/views/MainWindow
/*
.qml \
...
...
tests/resources.qrc
View file @
b81239ae
...
@@ -60,6 +60,8 @@
...
@@ -60,6 +60,8 @@
<file>
ui/modules/Linphone/Styles/CollapseStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/CollapseStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/DialogStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/DialogStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/ForceScrollBarStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/ForceScrollBarStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Form/ExclusiveButtonsStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Form/SmallButtonStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/MenuStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/MenuStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/PopupStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/PopupStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/qmldir
</file>
<file>
ui/modules/Linphone/Styles/qmldir
</file>
...
...
tests/ui/modules/Linphone/Form/ExclusiveButtons.qml
View file @
b81239ae
import
QtQuick
2.7
import
QtQuick
2.7
import
Linphone
.
Styles
1.0
// ===================================================================
// ===================================================================
Row
{
Row
{
property
int
selectedButton
:
0
property
int
_
selectedButton
:
0
property
variant
texts
property
variant
texts
signal
clicked
(
int
button
)
signal
clicked
(
int
button
)
spacing
:
8
spacing
:
ExclusiveButtonsStyle
.
buttonsSpacing
Repeater
{
Repeater
{
model
:
texts
model
:
texts
SmallButton
{
SmallButton
{
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
backgroundColor
:
selectedButton
===
index
backgroundColor
:
_
selectedButton
===
index
?
'
#8E8E8E
'
?
ExclusiveButtonsStyle
.
button
.
color
.
selected
:
(
button
.
down
:
(
down
?
'
#FE5E00
'
?
ExclusiveButtonsStyle
.
button
.
color
.
pressed
:
(
button
.
hovered
:
(
hovered
?
'
#C0C0C0
'
?
ExclusiveButtonsStyle
.
button
.
color
.
hovered
:
'
#D1D1D1
'
:
ExclusiveButtonsStyle
.
button
.
color
.
normal
)
)
)
)
id
:
button
text
:
modelData
text
:
modelData
onClicked
:
{
onClicked
:
{
if
(
selectedButton
!==
index
)
{
if
(
_
selectedButton
!==
index
)
{
selectedButton
=
index
_
selectedButton
=
index
clicked
(
index
)
clicked
(
index
)
}
}
}
}
...
...
tests/ui/modules/Linphone/Form/SmallButton.qml
View file @
b81239ae
import
QtQuick
2.7
import
QtQuick
2.7
import
QtQuick
.
Controls
2.0
import
QtQuick
.
Controls
2.0
import
Linphone
.
Styles
1.0
// ===================================================================
// ===================================================================
Button
{
Button
{
id
:
button
property
alias
backgroundColor
:
background
.
color
property
alias
backgroundColor
:
background
.
color
background
:
Rectangle
{
background
:
Rectangle
{
id
:
background
color
:
button
.
down
color
:
button
.
down
?
'
#FE5E00
'
?
SmallButtonStyle
.
background
.
color
.
pressed
:
(
button
.
hovered
:
(
button
.
hovered
?
'
#C0C0C0
'
?
SmallButtonStyle
.
background
.
color
.
hovered
:
'
#D1D1D1
'
:
SmallButtonStyle
.
background
.
color
.
normal
)
)
id
:
background
implicitHeight
:
SmallButtonStyle
.
background
.
height
implicitHeight
:
22
radius
:
SmallButtonStyle
.
background
.
radius
radius
:
10
}
}
contentItem
:
Text
{
contentItem
:
Text
{
color
:
'
#FFFFFF
'
color
:
SmallButtonStyle
.
text
.
color
font.pointSize
:
8
font.pointSize
:
SmallButtonStyle
.
text
.
fontSize
horizontalAlignment
:
Text
.
AlignHCenter
horizontalAlignment
:
Text
.
AlignHCenter
id
:
text
text
:
button
.
text
text
:
button
.
text
verticalAlignment
:
Text
.
AlignVCenter
verticalAlignment
:
Text
.
AlignVCenter
}
}
hoverEnabled
:
true
hoverEnabled
:
true
id
:
button
}
}
tests/ui/modules/Linphone/Styles/Form/ExclusiveButtonsStyle.qml
0 → 100644
View file @
b81239ae
pragma
Singleton
import
QtQuick
2.7
import
Linphone
1.0
QtObject
{
property
int
buttonsSpacing
:
8
property
QtObject
button
:
QtObject
{
property
QtObject
color
:
QtObject
{
property
string
hovered
:
'
#C0C0C0
'
property
string
normal
:
'
#D1D1D1
'
property
string
pressed
:
'
#FE5E00
'
property
string
selected
:
'
#8E8E8E
'
}
}
}
tests/ui/modules/Linphone/Styles/Form/SmallButtonStyle.qml
0 → 100644
View file @
b81239ae
pragma
Singleton
import
QtQuick
2.7
import
Linphone
1.0
QtObject
{
property
QtObject
background
:
QtObject
{
property
int
height
:
22
property
int
radius
:
10
property
QtObject
color
:
QtObject
{
property
string
hovered
:
'
#C0C0C0
'
property
string
normal
:
'
#D1D1D1
'
property
string
pressed
:
'
#FE5E00
'
}
}
property
QtObject
text
:
QtObject
{
property
int
fontSize
:
8
property
string
color
:
'
#FFFFFF
'
}
}
tests/ui/modules/Linphone/Styles/qmldir
View file @
b81239ae
...
@@ -10,3 +10,6 @@ singleton MenuStyle 1.0 MenuStyle.qml
...
@@ -10,3 +10,6 @@ singleton MenuStyle 1.0 MenuStyle.qml
singleton PopupStyle 1.0 PopupStyle.qml
singleton PopupStyle 1.0 PopupStyle.qml
singleton SearchBoxStyle 1.0 SearchBoxStyle.qml
singleton SearchBoxStyle 1.0 SearchBoxStyle.qml
singleton TimelineStyle 1.0 TimelineStyle.qml
singleton TimelineStyle 1.0 TimelineStyle.qml
singleton ExclusiveButtonsStyle 1.0 Form/ExclusiveButtonsStyle.qml
singleton SmallButtonStyle 1.0 Form/SmallButtonStyle.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