Skip to content

Commit

Permalink
[Console] Manually specify button color for monochrome theme
Browse files Browse the repository at this point in the history
  • Loading branch information
wstyres committed Mar 13, 2020
1 parent 3f32cae commit 1f298b3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Zebra/Console/ZBConsoleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#import <ZBLog.h>
#import <ZBSettings.h>
#import <UIColor+GlobalColors.h>
#import <ZBThemeManager.h>

#include <sysexits.h>

Expand Down Expand Up @@ -149,7 +150,18 @@ - (void)setupView {
[self updateProgressText:nil];
[self setProgressViewHidden:YES];
[[self progressView] setProgressTintColor:[UIColor accentColor]];
[[self completeButton] setBackgroundColor:[UIColor accentColor]];

ZBAccentColor color = [ZBSettings accentColor];
ZBInterfaceStyle style = [ZBSettings interfaceStyle];
if (color == ZBAccentColorMonochrome) {
//Flip the colors for readability
[[self completeButton] setBackgroundColor:[UIColor whiteColor]];
[[self completeButton] setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
}
else {
[[self completeButton] setBackgroundColor:[ZBThemeManager getAccentColor:color forInterfaceStyle:style]];
}

[self setProgressTextHidden:YES];
[self updateCancelOrCloseButton];

Expand Down

0 comments on commit 1f298b3

Please sign in to comment.