From c98867493ade176ee40b8c968d90c9aec6e31637 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Tue, 27 Oct 2015 17:47:55 -0400 Subject: [PATCH] refactor(segment): fixed border width with more than 3 buttons Added another toolbar with 3 segments for testing and in order to fix the width on iOS, references #356 --- ionic/components/segment/modes/ios.scss | 5 ++++- ionic/components/segment/test/basic/e2e.ts | 4 ++++ ionic/components/segment/test/basic/index.ts | 1 + ionic/components/segment/test/basic/main.html | 18 ++++++++++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ionic/components/segment/modes/ios.scss b/ionic/components/segment/modes/ios.scss index 16ee86e6f7..485b318599 100644 --- a/ionic/components/segment/modes/ios.scss +++ b/ionic/components/segment/modes/ios.scss @@ -46,11 +46,14 @@ $segment-button-ios-hover-opacity: 0.16 !default; } &:first-of-type { - border-right-width: 0px; border-radius: $button-border-radius 0px 0px $button-border-radius; margin-right: 0; } + &:not(:first-of-type) { + border-left-width: 0px; + } + &:last-of-type { border-left-width: 0px; border-radius: 0px $button-border-radius $button-border-radius 0px; diff --git a/ionic/components/segment/test/basic/e2e.ts b/ionic/components/segment/test/basic/e2e.ts index b05a27407d..c941f0bef6 100644 --- a/ionic/components/segment/test/basic/e2e.ts +++ b/ionic/components/segment/test/basic/e2e.ts @@ -10,3 +10,7 @@ it('standard should be selected', function() { it('model c should be selected', function() { element(by.css('.e2eSegmentModelC')).click(); }); + +it('top grossing should be selected', function() { + element(by.css('.e2eSegmentTopGrossing')).click(); +}); diff --git a/ionic/components/segment/test/basic/index.ts b/ionic/components/segment/test/basic/index.ts index 7d08725657..aec05fdd06 100644 --- a/ionic/components/segment/test/basic/index.ts +++ b/ionic/components/segment/test/basic/index.ts @@ -15,6 +15,7 @@ class MyApp { }); this.modelStyle = 'B'; + this.appType = 'free'; } doSubmit(event) { diff --git a/ionic/components/segment/test/basic/main.html b/ionic/components/segment/test/basic/main.html index 6fd612d02a..a796ac8263 100644 --- a/ionic/components/segment/test/basic/main.html +++ b/ionic/components/segment/test/basic/main.html @@ -44,6 +44,8 @@

+
+

Model style: NgModel

@@ -63,3 +65,19 @@

Model Style: Model {{ modelStyle }}

+ + + + + + Paid + + + Free + + + Top Grossing + + + +