-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Style by Theme #403
Conversation
…ervice instead of Style
…configuration files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some comments. I will play with your code to eventually approve it before considering these comments. Please wait for syncing with me before modifying this PR
@@ -197,33 +194,37 @@ - (void)viewDidLoad | |||
|
|||
- (void)userInterfaceThemeDidChange | |||
{ | |||
[self updateWithStyle:self.currentStyle]; | |||
[self updateTheme]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you think possible to restore here the Element-iOS code for this method userInterfaceThemeDidChange
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I compared both implementations of this class SegmentedViewController
I think we should try to restore the Element-iOS implementation of this class, and test whether we really need customization. We may talk in direct together about this plan
@@ -75,37 +69,35 @@ - (void)viewWillAppear:(BOOL)animated | |||
|
|||
- (void)userInterfaceThemeDidChange | |||
{ | |||
[self updateWithStyle:self.currentStyle]; | |||
[self updateTheme]; | |||
} | |||
|
|||
- (void)applyVariant2Style |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method applyVariant2Style
should be removes, don't you think so?
@interface WebViewViewController () <Stylable> | ||
|
||
@property (nonatomic, strong) id<Style> currentStyle; | ||
@interface WebViewViewController () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have the same remarks as I had on the SegmentedViewController
class
self.leftButton.backgroundColor = theme.headerBackgroundColor | ||
self.leftButton.setTitleColor(theme.headerTextPrimaryColor, for: .normal) | ||
self.rightButton.backgroundColor = theme.headerBackgroundColor | ||
self.rightButton.setTitleColor(theme.headerTextPrimaryColor, for: .normal) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan to use headerBackgroundColor
and headerTextPrimaryColor
here, I don't want to blocck this PR on this point, but we have to create an issue to introduce correct keys in the theme for this kind of button.
This work (adding new theme keys) should be planned with Element-ios team to improve Element-ios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#395