Skip to content

Commit c313a14

Browse files
committed
style: reworking windowbar apparance
1 parent 360ba74 commit c313a14

File tree

3 files changed

+3
-85
lines changed

3 files changed

+3
-85
lines changed

Config.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
// https://developer.apple.com/documentation/xcode/adding-a-build-configuration-file-to-your-project
1010

1111
VERSION = 0.9.0
12-
BUILD_NUMBER = 20260224.146.US.seanistethered
12+
BUILD_NUMBER = 20260224.158.US.seanistethered

Nyxian/LindChain/Multitask/WindowServer/Session/LDEWindowSessionApplication.m

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ - (BOOL)openWindow
9191
/* registering to window */
9292
[self.windowScene _registerSettingsDiffActionArray:@[self] forKey:self.process.sceneID];
9393

94-
/* fixing keyboard issues */
95-
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
96-
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
97-
9894
/* initilize lock */
9995
lock = OS_UNFAIR_LOCK_INIT;
10096

@@ -105,9 +101,6 @@ - (BOOL)closeWindow
105101
{
106102
[super closeWindow];
107103

108-
/* fixing keyboard issues */
109-
[[NSNotificationCenter defaultCenter] removeObserver:self];
110-
111104
/* invalidate presenter */
112105
[_presenter invalidate];
113106

@@ -307,70 +300,6 @@ - (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection
307300
os_unfair_lock_unlock(&lock);
308301
}
309302

310-
- (void)keyboardWillShow:(NSNotification *)notification
311-
{
312-
os_unfair_lock_lock(&lock);
313-
314-
NSDictionary *info = notification.userInfo;
315-
CGRect keyboardFrame = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
316-
317-
CGFloat bottomInset = keyboardFrame.size.height;
318-
319-
if(![self.process.processHandle isValid] || self.process.isSuspended)
320-
{
321-
os_unfair_lock_unlock(&lock);
322-
return;
323-
}
324-
325-
[self.presenter.scene updateSettingsWithBlock:^(UIMutableApplicationSceneSettings *settings) {
326-
UIEdgeInsets currentInsets = settings.safeAreaInsetsPortrait;
327-
currentInsets.bottom = bottomInset;
328-
329-
330-
settings.safeAreaInsetsPortrait = currentInsets;
331-
settings.safeAreaInsetsLandscapeLeft = currentInsets;
332-
settings.safeAreaInsetsLandscapeRight = currentInsets;
333-
settings.safeAreaInsetsPortraitUpsideDown = currentInsets;
334-
}];
335-
336-
isKeyboardShown = true;
337-
338-
os_unfair_lock_unlock(&lock);
339-
}
340-
341-
- (void)keyboardWillHide:(NSNotification *)notification
342-
{
343-
os_unfair_lock_lock(&lock);
344-
345-
if(![self.process.processHandle isValid] || self.process.isSuspended)
346-
{
347-
os_unfair_lock_unlock(&lock);
348-
return;
349-
}
350-
351-
[self.presenter.scene updateSettingsWithBlock:^(UIMutableApplicationSceneSettings *settings) {
352-
UIEdgeInsets currentInsets = settings.safeAreaInsetsPortrait;
353-
354-
if(self.isFullscreen)
355-
{
356-
currentInsets.bottom = LDEWindowServer.shared.safeAreaInsets.bottom;
357-
}
358-
else
359-
{
360-
currentInsets.bottom = 0;
361-
}
362-
363-
settings.safeAreaInsetsPortrait = currentInsets;
364-
settings.safeAreaInsetsLandscapeLeft = currentInsets;
365-
settings.safeAreaInsetsLandscapeRight = currentInsets;
366-
settings.safeAreaInsetsPortraitUpsideDown = currentInsets;
367-
}];
368-
369-
isKeyboardShown = false;
370-
371-
os_unfair_lock_unlock(&lock);
372-
}
373-
374303
- (NSString*)windowName
375304
{
376305
return self.process.displayName;

Nyxian/LindChain/Multitask/WindowServer/Window/LDEWindow.m

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ - (void)viewDidAppear:(BOOL)animated
169169
- (void)unfocusWindow
170170
{
171171
if (_focusView != nil) return;
172+
self.session.isFocused = NO;
172173

173174
[self.windowBar changeFocus:false];
174175

@@ -191,12 +192,6 @@ - (void)unfocusWindow
191192
[UIView animateWithDuration:0.11 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
192193
self->_focusView.alpha = 0.12;
193194
self->_focusView.transform = CGAffineTransformIdentity;
194-
195-
// Smooth background color transition
196-
[UIView transitionWithView:self->_navigationBar duration:0.11 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{
197-
self->_windowBar.backgroundColor = UIColor.grayColor;
198-
} completion:nil];
199-
200195
} completion:nil];
201196
});
202197
}
@@ -205,6 +200,7 @@ - (void)focusWindow
205200
{
206201
dispatch_async(dispatch_get_main_queue(), ^{
207202
if (!self.focusView) return;
203+
self.session.isFocused = YES;
208204

209205
[self.windowBar changeFocus:true];
210206

@@ -213,11 +209,6 @@ - (void)focusWindow
213209
[UIView animateWithDuration:0.11 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{
214210
self->_focusView.alpha = 0.0;
215211
self->_focusView.transform = CGAffineTransformMakeScale(1.02, 1.02);
216-
217-
[UIView transitionWithView:self->_navigationBar duration:0.11 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{
218-
self->_windowBar.backgroundColor = UIColor.quaternarySystemFillColor;
219-
} completion:nil];
220-
221212
} completion:^(BOOL finished) {
222213
[self->_focusView removeFromSuperview];
223214
self->_focusView = nil;
@@ -619,8 +610,6 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
619610
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection
620611
{
621612
[super traitCollectionDidChange:previousTraitCollection];
622-
623-
// Fixes that the color doesnt change when the user changes to dark/light mode
624613
self.contentStack.layer.borderColor = UIColor.systemGray3Color.CGColor;
625614
}
626615

0 commit comments

Comments
 (0)