Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-client-macos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-client-macos
Commits
d83bb7aa
Commit
d83bb7aa
authored
4 years ago
by
Kateryna Kostiuk
Browse files
Options
Downloads
Patches
Plain Diff
UI: refactor welcome view
Change-Id: I166ea16c4110cd9fb8b7cef2624a0f0c333a0ac7
parent
8c64e9ad
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/RingWindowController.mm
+14
-18
14 additions, 18 deletions
src/RingWindowController.mm
ui/Base.lproj/RingWindow.xib
+172
-168
172 additions, 168 deletions
ui/Base.lproj/RingWindow.xib
with
186 additions
and
186 deletions
src/RingWindowController.mm
+
14
−
18
View file @
d83bb7aa
...
...
@@ -66,8 +66,6 @@ typedef NS_ENUM(NSInteger, ViewState) {
@implementation
RingWindowController
{
__unsafe_unretained
IBOutlet
NSLayoutConstraint
*
centerYQRCodeConstraint
;
__unsafe_unretained
IBOutlet
NSLayoutConstraint
*
centerYWelcomeContainerConstraint
;
IBOutlet
NSLayoutConstraint
*
ringLabelTrailingConstraint
;
__unsafe_unretained
IBOutlet
NSView
*
welcomeContainer
;
__unsafe_unretained
IBOutlet
NSView
*
callView
;
...
...
@@ -431,10 +429,7 @@ typedef NS_ENUM(NSInteger, ViewState) {
}
-
(
IBAction
)
toggleQRCode
:(
id
)
sender
{
// Toggle pressed state of QRCode button
// [sender setPressed:![sender isPressed]];
bool
show
=
qrcodeView
.
animator
.
alphaValue
==
0.0
f
?
YES
:
NO
;
[
self
showQRCode
:
show
];
[
self
showQRCode
:
qrcodeView
.
isHidden
];
}
/**
...
...
@@ -508,18 +503,21 @@ typedef NS_ENUM(NSInteger, ViewState) {
-
(
void
)
showQRCode
:(
BOOL
)
show
{
[
self
updateQRCodeBackground
];
static
const
NSInteger
offset
=
110
;
[
NSAnimationContext
beginGrouping
];
NSAnimationContext
.
currentContext
.
duration
=
0.5
;
[[
NSAnimationContext
currentContext
]
setTimingFunction
:[
CAMediaTimingFunction
functionWithName
:
kCAMediaTimingFunctionDefault
]];
qrcodeView
.
animator
.
alphaValue
=
show
?
1.0
:
0.0
;
[
centerYQRCodeConstraint
.
animator
setConstant
:
show
?
offset
:
0
];
[
centerYWelcomeContainerConstraint
.
animator
setConstant
:
show
?
-
offset
:
0
];
[
NSAnimationContext
endGrouping
];
[
qrcodeView
setHidden
:
!
show
];
qrcodeView
.
layer
.
opacity
=
0.0
;
[
NSAnimationContext
runAnimationGroup
:
^
(
NSAnimationContext
*
_Nonnull
context
)
{
context
.
duration
=
0.2
;
context
.
allowsImplicitAnimation
=
YES
;
context
.
timingFunction
=
[
CAMediaTimingFunction
functionWithName
:
kCAMediaTimingFunctionEaseOut
];
[
self
.
window
layoutIfNeeded
];
}
completionHandler
:
^
{
qrcodeView
.
layer
.
opacity
=
1.0
;
}];
}
-
(
void
)
themeChanged
:(
NSNotification
*
)
notification
{
if
(
qrcodeView
.
animator
.
alphaValue
==
1
)
{
if
(
!
qrcodeView
.
isHidden
)
{
[
self
updateQRCodeBackground
];
}
}
...
...
@@ -575,9 +573,7 @@ typedef NS_ENUM(NSInteger, ViewState) {
[
smartViewVC
clearConversationModel
];
[
self
changeViewTo
:
SHOW_WELCOME_SCREEN
];
[
self
updateRingID
];
qrcodeView
.
animator
.
alphaValue
=
0.0
;
[
centerYQRCodeConstraint
.
animator
setConstant
:
0
];
[
centerYWelcomeContainerConstraint
.
animator
setConstant
:
0
];
[
qrcodeView
setHidden
:
YES
];
QObject
::
disconnect
(
self
.
callState
);
[
self
close
];
AppDelegate
*
delegate
=
(
AppDelegate
*
)[[
NSApplication
sharedApplication
]
delegate
];
...
...
This diff is collapsed.
Click to expand it.
ui/Base.lproj/RingWindow.xib
+
172
−
168
View file @
d83bb7aa
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