tangled
alpha
login
or
join now
jcs.org
/
endless
0
fork
atom
iOS web browser with a focus on security and privacy
0
fork
atom
overview
issues
pulls
pipelines
WVC: show dark status bar when toolbar is on the bottom
jcs.org
9 years ago
519b90ad
c0425904
+11
-4
1 changed file
expand all
collapse all
unified
split
Endless
WebViewController.m
+11
-4
Endless/WebViewController.m
···
202
202
203
203
- (UIStatusBarStyle)preferredStatusBarStyle
204
204
{
205
205
-
if (self.darkInterface)
205
205
+
if ([self darkInterface] || [self toolbarOnBottom])
206
206
return UIStatusBarStyleLightContent;
207
207
else
208
208
return UIStatusBarStyleDefault;
···
264
264
265
265
- (void)viewDidAppear:(BOOL)animated
266
266
{
267
267
+
[super viewDidAppear:animated];
268
268
+
267
269
/* we made it this far, remove lock on previous startup */
268
270
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
269
271
[userDefaults removeObjectForKey:STATE_RESTORE_TRY_KEY];
···
360
362
361
363
if (self.darkInterface) {
362
364
[[appDelegate window] setBackgroundColor:[UIColor darkGrayColor]];
363
363
-
[self setNeedsStatusBarAppearanceUpdate];
364
365
365
366
[tabScroller setBackgroundColor:[UIColor grayColor]];
366
367
[tabToolbar setBarTintColor:[UIColor grayColor]];
368
368
+
[tabToolbar setBackgroundColor:[UIColor grayColor]];
367
369
[toolbar setBackgroundColor:[UIColor darkGrayColor]];
368
370
[urlField setBackgroundColor:[UIColor grayColor]];
369
371
[tabToolbarHairline setBackgroundColor:[UIColor colorWithRed:0.1 green:0.1 blue:0.1 alpha:1.0]];
···
378
380
[tabChooser setCurrentPageIndicatorTintColor:[UIColor whiteColor]];
379
381
}
380
382
else {
381
381
-
[[appDelegate window] setBackgroundColor:[UIColor groupTableViewBackgroundColor]];
382
382
-
[self setNeedsStatusBarAppearanceUpdate];
383
383
+
if ([self toolbarOnBottom])
384
384
+
[[appDelegate window] setBackgroundColor:[UIColor blackColor]];
385
385
+
else
386
386
+
[[appDelegate window] setBackgroundColor:[UIColor groupTableViewBackgroundColor]];
383
387
384
388
[tabScroller setBackgroundColor:[UIColor groupTableViewBackgroundColor]];
385
389
[tabToolbar setBarTintColor:[UIColor groupTableViewBackgroundColor]];
390
390
+
[tabToolbar setBackgroundColor:[UIColor groupTableViewBackgroundColor]];
386
391
[toolbar setBackgroundColor:[UIColor groupTableViewBackgroundColor]];
387
392
[urlField setBackgroundColor:[UIColor whiteColor]];
388
393
[tabToolbarHairline setBackgroundColor:[UIColor colorWithRed:0.8 green:0.8 blue:0.8 alpha:1.0]];
···
397
402
[tabChooser setCurrentPageIndicatorTintColor:[UIColor grayColor]];
398
403
}
399
404
405
405
+
[self setNeedsStatusBarAppearanceUpdate];
406
406
+
400
407
/* tabScroller.frame is now our actual webview viewing area */
401
408
402
409
for (int i = 0; i < webViewTabs.count; i++) {