Dr0ptp4kt has submitted this change and it was merged.
Change subject: Update to scroll indicator color per Vibha.
......................................................................
Update to scroll indicator color per Vibha.
T91705
Change-Id: I961faf9ddc9ca63a0b39b3166d677e36244bdb34
---
M wikipedia/View Controllers/WebView/WebViewController.m
M wikipedia/View Controllers/WebView/WebViewController_Private.h
2 files changed, 16 insertions(+), 16 deletions(-)
Approvals:
Dr0ptp4kt: Looks good to me, approved
Fjalapeno: Looks good to me, but someone else must approve
diff --git a/wikipedia/View Controllers/WebView/WebViewController.m
b/wikipedia/View Controllers/WebView/WebViewController.m
index fd02c6e..d1069e4 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -294,12 +294,10 @@
- (void)scrollIndicatorSetup {
self.scrollIndicatorView =
[[UIView alloc] init];
- self.scrollIndicatorView.opaque = YES;
- self.scrollIndicatorView.backgroundColor =
SCROLL_INDICATOR_BACKGROUND_COLOR;
+ self.scrollIndicatorView.opaque = NO;
+ self.scrollIndicatorView.backgroundColor =
[UIColor wmf_colorWithHex:kScrollIndicatorBackgroundColor
alpha:kScrollIndicatorAlpha];
self.scrollIndicatorView.translatesAutoresizingMaskIntoConstraints = NO;
- self.scrollIndicatorView.layer.cornerRadius =
SCROLL_INDICATOR_CORNER_RADIUS;
- self.scrollIndicatorView.layer.borderWidth =
SCROLL_INDICATOR_BORDER_WIDTH / [UIScreen mainScreen].scale;
- self.scrollIndicatorView.layer.borderColor =
SCROLL_INDICATOR_BORDER_COLOR.CGColor;
+ self.scrollIndicatorView.layer.cornerRadius =
kScrollIndicatorCornerRadius;
self.webView.scrollView.showsHorizontalScrollIndicator = NO;
self.webView.scrollView.showsVerticalScrollIndicator = NO;
@@ -325,7 +323,7 @@
toItem:self.webView
attribute:NSLayoutAttributeTrailing
multiplier:1.0
-
constant:-SCROLL_INDICATOR_LEFT_MARGIN]];
+
constant:-kScrollIndicatorLeftMargin]];
[self.view addConstraint:[NSLayoutConstraint
constraintWithItem:self.scrollIndicatorView
attribute:NSLayoutAttributeWidth
@@ -333,7 +331,7 @@
toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:1.0
-
constant:SCROLL_INDICATOR_WIDTH]];
+
constant:kScrollIndicatorWidth]];
[self.view addConstraint:[NSLayoutConstraint
constraintWithItem:self.scrollIndicatorView
attribute:NSLayoutAttributeBottom
@@ -350,7 +348,7 @@
toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:1.0
- constant:SCROLL_INDICATOR_HEIGHT];
+ constant:kScrollIndicatorHeight];
[self.view addConstraint:self.scrollIndicatorViewHeightConstraint];
}
@@ -382,7 +380,7 @@
//self.scrollIndicatorView.alpha = [self tocDrawerIsOpen] ? 0.0f : 1.0f;
CGFloat percent = self.webView.scrollView.contentOffset.y / f;
//NSLog(@"percent = %f", percent);
- self.scrollIndicatorViewTopConstraint.constant = percent *
(self.bottomBarView.frame.origin.y - SCROLL_INDICATOR_HEIGHT) +
kScrollIndicatorMinYMargin;
+ self.scrollIndicatorViewTopConstraint.constant = percent *
(self.bottomBarView.frame.origin.y - kScrollIndicatorHeight) +
kScrollIndicatorMinYMargin;
}
#pragma mark Sync config/ios.json if necessary
diff --git a/wikipedia/View Controllers/WebView/WebViewController_Private.h
b/wikipedia/View Controllers/WebView/WebViewController_Private.h
index acc1f17..b3f3ca9 100644
--- a/wikipedia/View Controllers/WebView/WebViewController_Private.h
+++ b/wikipedia/View Controllers/WebView/WebViewController_Private.h
@@ -66,18 +66,20 @@
#import "WMFWebViewFooterViewController.h"
#import "UIScrollView+WMFScrollsToTop.h"
+#import "UIColor+WMFHexColor.h"
//#import "UIView+Debugging.h"
#define TOC_TOGGLE_ANIMATION_DURATION @0.225f
-#define SCROLL_INDICATOR_LEFT_MARGIN 2.0
-#define SCROLL_INDICATOR_WIDTH 4.0
-#define SCROLL_INDICATOR_HEIGHT 25.0
-#define SCROLL_INDICATOR_CORNER_RADIUS 2.0f
-#define SCROLL_INDICATOR_BORDER_WIDTH 1.0f
-#define SCROLL_INDICATOR_BORDER_COLOR [UIColor lightGrayColor]
-#define SCROLL_INDICATOR_BACKGROUND_COLOR [UIColor whiteColor]
+static const CGFloat kScrollIndicatorLeftMargin = 2.0f;
+static const CGFloat kScrollIndicatorWidth = 2.5f;
+static const CGFloat kScrollIndicatorHeight = 25.0f;
+static const CGFloat kScrollIndicatorCornerRadius = 2.0f;
+static const CGFloat kScrollIndicatorBorderWidth = 1.0f;
+static const CGFloat kScrollIndicatorAlpha = 0.3f;
+static const NSInteger kScrollIndicatorBorderColor = 0x000000;
+static const NSInteger kScrollIndicatorBackgroundColor = 0x000000;
static const CGFloat kBottomScrollSpacerHeight = 2000.0f;
--
To view, visit https://gerrit.wikimedia.org/r/198196
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I961faf9ddc9ca63a0b39b3166d677e36244bdb34
Gerrit-PatchSet: 4
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd <[email protected]>
Gerrit-Reviewer: Bgerstle <[email protected]>
Gerrit-Reviewer: Dr0ptp4kt <[email protected]>
Gerrit-Reviewer: Fjalapeno <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits