Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Carola
vlc-ios
Commits
5fb9dad5
Commit
5fb9dad5
authored
Feb 01, 2018
by
Carola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VLCCloudStorageTableViewController: adopt Theme
parent
0cda6037
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
7 deletions
+23
-7
SharedSources/PresentationTheme.swift
SharedSources/PresentationTheme.swift
+1
-1
Sources/VLCCloudStorageTableViewController.m
Sources/VLCCloudStorageTableViewController.m
+22
-6
No files found.
SharedSources/PresentationTheme.swift
View file @
5fb9dad5
...
...
@@ -130,7 +130,7 @@ public let whitePalette = ColorPalette(isDark: false,
settingsBackground
:
UIColor
(
0xdcdcdc
),
settingsCellBackground
:
UIColor
(
0xf9f9f7
),
settingsSeparatorColor
:
.
lightGray
,
tabBarColor
:
UIColor
(
0x
000000
),
tabBarColor
:
UIColor
(
0x
ffffff
),
orangeUI
:
UIColor
(
0xff8800
))
public
let
darkPalette
=
ColorPalette
(
isDark
:
true
,
...
...
Sources/VLCCloudStorageTableViewController.m
View file @
5fb9dad5
...
...
@@ -15,6 +15,7 @@
#import "VLCCloudStorageTableViewController.h"
#import "VLCCloudStorageTableViewCell.h"
#import "VLCProgressView.h"
#import "VLC_iOS-Swift.h"
@interface
VLCCloudStorageTableViewController
()
{
...
...
@@ -37,7 +38,7 @@
self
.
modalPresentationStyle
=
UIModalPresentationFormSheet
;
UIBarButtonItem
*
backButton
=
[
UIBarButtonItem
themedBackButtonWithT
arget
:
self
a
ndSelector
:
@selector
(
goBack
)];
UIBarButtonItem
*
backButton
=
[
[
UIBarButtonItem
alloc
]
initWithTitle
:
NSLocalizedString
(
@"BUTTON_BACK"
,
nil
)
style
:
UIBarButtonItemStylePlain
t
arget
:
self
a
ction
:
@selector
(
goBack
)];
self
.
navigationItem
.
leftBarButtonItem
=
backButton
;
_logoutButton
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
NSLocalizedString
(
@"BUTTON_LOGOUT"
,
""
)
style
:
UIBarButtonItemStylePlain
target
:
self
action
:
@selector
(
logout
)];
...
...
@@ -46,12 +47,9 @@
[
self
.
navigationController
.
toolbar
setBackgroundImage
:[
UIImage
imageNamed
:
@"sudHeaderBg"
]
forToolbarPosition
:
UIToolbarPositionAny
barMetrics
:
UIBarMetricsDefault
];
self
.
tableView
.
separatorColor
=
[
UIColor
VLCDarkBackgroundColor
];
self
.
tableView
.
backgroundColor
=
[
UIColor
VLCDarkBackgroundColor
];
self
.
view
.
backgroundColor
=
[
UIColor
VLCDarkBackgroundColor
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
updateForTheme
)
name
:
kVLCThemeDidChangeNotification
object
:
nil
];
_refreshControl
=
[[
UIRefreshControl
alloc
]
init
];
_refreshControl
.
backgroundColor
=
[
UIColor
VLCDarkBackgroundColor
];
_refreshControl
.
tintColor
=
[
UIColor
whiteColor
];
[
_refreshControl
addTarget
:
self
action
:
@selector
(
handleRefresh
)
forControlEvents
:
UIControlEventValueChanged
];
[
self
.
tableView
addSubview
:
_refreshControl
];
...
...
@@ -62,6 +60,7 @@
_numberOfFilesBarButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:[
NSString
stringWithFormat
:
NSLocalizedString
(
@"NUM_OF_FILES"
,
nil
),
0
]
style
:
UIBarButtonItemStylePlain
target
:
nil
action
:
nil
];
[
_numberOfFilesBarButtonItem
setTitleTextAttributes
:@{
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
11
.]
}
forState
:
UIControlStateNormal
];
_numberOfFilesBarButtonItem
.
tintColor
=
PresentationTheme
.
current
.
colors
.
orangeUI
;
_activityIndicator
=
[[
UIActivityIndicatorView
alloc
]
initWithActivityIndicatorStyle
:
UIActivityIndicatorViewStyleWhiteLarge
];
_activityIndicator
.
hidesWhenStopped
=
YES
;
...
...
@@ -74,8 +73,19 @@
_progressView
=
[
VLCProgressView
new
];
_progressBarButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
_progressView
];
_progressView
.
tintColor
=
PresentationTheme
.
current
.
colors
.
orangeUI
;
[
self
_showProgressInToolbar
:
NO
];
[
self
updateForTheme
];
}
-
(
void
)
updateForTheme
{
self
.
tableView
.
separatorColor
=
PresentationTheme
.
current
.
colors
.
background
;
self
.
tableView
.
backgroundColor
=
PresentationTheme
.
current
.
colors
.
background
;
self
.
view
.
backgroundColor
=
PresentationTheme
.
current
.
colors
.
background
;
_refreshControl
.
backgroundColor
=
PresentationTheme
.
current
.
colors
.
background
;
_activityIndicator
.
activityIndicatorViewStyle
=
PresentationTheme
.
current
==
PresentationTheme
.
whiteTheme
?
UIActivityIndicatorViewStyleGray
:
UIActivityIndicatorViewStyleWhiteLarge
;
}
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
...
...
@@ -168,7 +178,13 @@
-
(
void
)
tableView
:(
UITableView
*
)
tableView
willDisplayCell
:(
UITableViewCell
*
)
cell
forRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
cell
.
backgroundColor
=
(
indexPath
.
row
%
2
==
0
)?
[
UIColor
blackColor
]:
[
UIColor
VLCDarkBackgroundColor
];
if
([
cell
isKindOfClass
:[
VLCCloudStorageTableViewCell
class
]])
{
VLCCloudStorageTableViewCell
*
cloudcell
=
(
VLCCloudStorageTableViewCell
*
)
cell
;
cloudcell
.
backgroundColor
=
(
indexPath
.
row
%
2
==
0
)?
PresentationTheme
.
current
.
colors
.
cellBackgroundB
:
PresentationTheme
.
current
.
colors
.
cellBackgroundA
;
cloudcell
.
titleLabel
.
textColor
=
PresentationTheme
.
current
.
colors
.
cellTextColor
;
cloudcell
.
folderTitleLabel
.
textColor
=
PresentationTheme
.
current
.
colors
.
cellTextColor
;
cloudcell
.
subtitleLabel
.
textColor
=
PresentationTheme
.
current
.
colors
.
cellDetailTextColor
;
}
}
-
(
void
)
goBack
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment