Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-qt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-qt
Commits
f7ad8804
Commit
f7ad8804
authored
4 years ago
by
Andreas Traczyk
Browse files
Options
Downloads
Patches
Plain Diff
accountcombobox: use smooth mouse state transitions
Change-Id: I11a89c5e58b4cfcb844ec88fe5801bc70c84c2dd
parent
191697b8
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mainview/components/AccountComboBox.qml
+67
-31
67 additions, 31 deletions
src/mainview/components/AccountComboBox.qml
with
67 additions
and
31 deletions
src/mainview/components/AccountComboBox.qml
+
67
−
31
View file @
f7ad8804
...
@@ -85,7 +85,7 @@ ComboBox {
...
@@ -85,7 +85,7 @@ ComboBox {
anchors.left
:
userImageRoot
.
right
anchors.left
:
userImageRoot
.
right
anchors.leftMargin
:
16
anchors.leftMargin
:
16
anchors.top
:
rootItemB
ackground
.
top
anchors.top
:
b
ackground
.
top
anchors.topMargin
:
16
anchors.topMargin
:
16
text
:
textMetricsUserAliasRoot
.
elidedText
text
:
textMetricsUserAliasRoot
.
elidedText
...
@@ -140,7 +140,7 @@ ComboBox {
...
@@ -140,7 +140,7 @@ ComboBox {
}
}
background
:
Rectangle
{
background
:
Rectangle
{
id
:
rootItemB
ackground
id
:
b
ackground
implicitWidth
:
root
.
width
implicitWidth
:
root
.
width
implicitHeight
:
root
.
height
implicitHeight
:
root
.
height
...
@@ -156,6 +156,37 @@ ComboBox {
...
@@ -156,6 +156,37 @@ ComboBox {
}
}
color
:
JamiTheme
.
tabbarBorderColor
color
:
JamiTheme
.
tabbarBorderColor
}
}
states
:
[
State
{
name
:
"
open
"
;
when
:
comboBoxPopup
.
opened
PropertyChanges
{
target
:
background
color
:
Qt
.
lighter
(
JamiTheme
.
hoverColor
,
1.0
)
}
},
State
{
name
:
"
hovered
"
PropertyChanges
{
target
:
background
color
:
Qt
.
lighter
(
JamiTheme
.
hoverColor
,
1.05
)
}
},
State
{
name
:
"
normal
"
PropertyChanges
{
target
:
background
color
:
JamiTheme
.
backgroundColor
}
}
]
transitions
:
[
Transition
{
to
:
"
hovered
"
;
reversible
:
true
ColorAnimation
{
duration
:
JamiTheme
.
fadeDuration
}
}
]
}
}
MouseArea
{
MouseArea
{
...
@@ -171,17 +202,23 @@ ComboBox {
...
@@ -171,17 +202,23 @@ ComboBox {
root
.
popup
.
open
()
root
.
popup
.
open
()
}
}
}
}
onEntered
:
rootItemBackground
.
color
=
Qt
.
lighter
(
JamiTheme
.
hoverColor
,
1.05
)
onEntered
:
background
.
state
=
"
hovered
"
onExited
:
rootItemBackground
.
color
=
JamiTheme
.
backgroundColor
onExited
:
{
if
(
!
comboBoxPopup
.
opened
)
background
.
state
=
"
normal
"
}
}
}
PushButton
{
Row
{
id
:
qrCodeGenerateButton
spacing
:
10
anchors.right
:
settingsButton
.
lef
t
anchors.right
:
root
.
righ
t
anchors.rightMargin
:
10
anchors.rightMargin
:
10
anchors.verticalCenter
:
root
.
verticalCenter
anchors.verticalCenter
:
root
.
verticalCenter
PushButton
{
id
:
qrCodeGenerateButton
width
:
visible
?
preferredSize
:
0
width
:
visible
?
preferredSize
:
0
height
:
visible
?
preferredSize
:
0
height
:
visible
?
preferredSize
:
0
...
@@ -199,10 +236,6 @@ ComboBox {
...
@@ -199,10 +236,6 @@ ComboBox {
PushButton
{
PushButton
{
id
:
settingsButton
id
:
settingsButton
anchors.right
:
root
.
right
anchors.rightMargin
:
10
anchors.verticalCenter
:
root
.
verticalCenter
source
:
!
mainViewWindow
.
inSettingsView
?
source
:
!
mainViewWindow
.
inSettingsView
?
"
qrc:/images/icons/round-settings-24px.svg
"
:
"
qrc:/images/icons/round-settings-24px.svg
"
:
"
qrc:/images/icons/round-close-24px.svg
"
"
qrc:/images/icons/round-close-24px.svg
"
...
@@ -213,10 +246,13 @@ ComboBox {
...
@@ -213,10 +246,13 @@ ComboBox {
onClicked
:
{
onClicked
:
{
settingBtnClicked
()
settingBtnClicked
()
rootItemBackground
.
color
=
JamiTheme
.
backgroundColor
background
.
state
=
"
normal
"
}
}
}
}
}
indicator
:
null
indicator
:
null
// Overwrite the combo box pop up to add footer (for add accounts).
// Overwrite the combo box pop up to add footer (for add accounts).
...
...
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