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
GitLab 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) {
...
@@ -66,8 +66,6 @@ typedef NS_ENUM(NSInteger, ViewState) {
@implementation
RingWindowController
{
@implementation
RingWindowController
{
__unsafe_unretained
IBOutlet
NSLayoutConstraint
*
centerYQRCodeConstraint
;
__unsafe_unretained
IBOutlet
NSLayoutConstraint
*
centerYWelcomeContainerConstraint
;
IBOutlet
NSLayoutConstraint
*
ringLabelTrailingConstraint
;
IBOutlet
NSLayoutConstraint
*
ringLabelTrailingConstraint
;
__unsafe_unretained
IBOutlet
NSView
*
welcomeContainer
;
__unsafe_unretained
IBOutlet
NSView
*
welcomeContainer
;
__unsafe_unretained
IBOutlet
NSView
*
callView
;
__unsafe_unretained
IBOutlet
NSView
*
callView
;
...
@@ -431,10 +429,7 @@ typedef NS_ENUM(NSInteger, ViewState) {
...
@@ -431,10 +429,7 @@ typedef NS_ENUM(NSInteger, ViewState) {
}
}
-
(
IBAction
)
toggleQRCode
:(
id
)
sender
{
-
(
IBAction
)
toggleQRCode
:(
id
)
sender
{
// Toggle pressed state of QRCode button
[
self
showQRCode
:
qrcodeView
.
isHidden
];
// [sender setPressed:![sender isPressed]];
bool
show
=
qrcodeView
.
animator
.
alphaValue
==
0.0f
?
YES
:
NO
;
[
self
showQRCode
:
show
];
}
}
/**
/**
...
@@ -508,18 +503,21 @@ typedef NS_ENUM(NSInteger, ViewState) {
...
@@ -508,18 +503,21 @@ typedef NS_ENUM(NSInteger, ViewState) {
-
(
void
)
showQRCode
:(
BOOL
)
show
-
(
void
)
showQRCode
:(
BOOL
)
show
{
{
[
self
updateQRCodeBackground
];
[
self
updateQRCodeBackground
];
static
const
NSInteger
offset
=
110
;
[
qrcodeView
setHidden
:
!
show
];
[
NSAnimationContext
beginGrouping
];
qrcodeView
.
layer
.
opacity
=
0.0
;
NSAnimationContext
.
currentContext
.
duration
=
0.5
;
[[
NSAnimationContext
currentContext
]
setTimingFunction
:[
CAMediaTimingFunction
functionWithName
:
kCAMediaTimingFunctionDefault
]];
[
NSAnimationContext
runAnimationGroup
:
^
(
NSAnimationContext
*
_Nonnull
context
)
{
qrcodeView
.
animator
.
alphaValue
=
show
?
1.0
:
0.0
;
context
.
duration
=
0.2
;
[
centerYQRCodeConstraint
.
animator
setConstant
:
show
?
offset
:
0
];
context
.
allowsImplicitAnimation
=
YES
;
[
centerYWelcomeContainerConstraint
.
animator
setConstant
:
show
?
-
offset
:
0
];
context
.
timingFunction
=
[
CAMediaTimingFunction
functionWithName
:
kCAMediaTimingFunctionEaseOut
];
[
NSAnimationContext
endGrouping
];
[
self
.
window
layoutIfNeeded
];
}
completionHandler
:
^
{
qrcodeView
.
layer
.
opacity
=
1.0
;
}];
}
}
-
(
void
)
themeChanged
:(
NSNotification
*
)
notification
{
-
(
void
)
themeChanged
:(
NSNotification
*
)
notification
{
if
(
qrcodeView
.
animator
.
alphaValue
==
1
)
{
if
(
!
qrcodeView
.
isHidden
)
{
[
self
updateQRCodeBackground
];
[
self
updateQRCodeBackground
];
}
}
}
}
...
@@ -575,9 +573,7 @@ typedef NS_ENUM(NSInteger, ViewState) {
...
@@ -575,9 +573,7 @@ typedef NS_ENUM(NSInteger, ViewState) {
[
smartViewVC
clearConversationModel
];
[
smartViewVC
clearConversationModel
];
[
self
changeViewTo
:
SHOW_WELCOME_SCREEN
];
[
self
changeViewTo
:
SHOW_WELCOME_SCREEN
];
[
self
updateRingID
];
[
self
updateRingID
];
qrcodeView
.
animator
.
alphaValue
=
0.0
;
[
qrcodeView
setHidden
:
YES
];
[
centerYQRCodeConstraint
.
animator
setConstant
:
0
];
[
centerYWelcomeContainerConstraint
.
animator
setConstant
:
0
];
QObject
::
disconnect
(
self
.
callState
);
QObject
::
disconnect
(
self
.
callState
);
[
self
close
];
[
self
close
];
AppDelegate
*
delegate
=
(
AppDelegate
*
)[[
NSApplication
sharedApplication
]
delegate
];
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