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
This commit is contained in:
Brandy Carney
2015-10-27 17:47:55 -04:00
parent 1fcd2e3db1
commit c98867493a
4 changed files with 27 additions and 1 deletions

View File

@ -46,11 +46,14 @@ $segment-button-ios-hover-opacity: 0.16 !default;
} }
&:first-of-type { &:first-of-type {
border-right-width: 0px;
border-radius: $button-border-radius 0px 0px $button-border-radius; border-radius: $button-border-radius 0px 0px $button-border-radius;
margin-right: 0; margin-right: 0;
} }
&:not(:first-of-type) {
border-left-width: 0px;
}
&:last-of-type { &:last-of-type {
border-left-width: 0px; border-left-width: 0px;
border-radius: 0px $button-border-radius $button-border-radius 0px; border-radius: 0px $button-border-radius $button-border-radius 0px;

View File

@ -10,3 +10,7 @@ it('standard should be selected', function() {
it('model c should be selected', function() { it('model c should be selected', function() {
element(by.css('.e2eSegmentModelC')).click(); element(by.css('.e2eSegmentModelC')).click();
}); });
it('top grossing should be selected', function() {
element(by.css('.e2eSegmentTopGrossing')).click();
});

View File

@ -15,6 +15,7 @@ class MyApp {
}); });
this.modelStyle = 'B'; this.modelStyle = 'B';
this.appType = 'free';
} }
doSubmit(event) { doSubmit(event) {

View File

@ -44,6 +44,8 @@
</span> </span>
</p> </p>
<hr>
<h4>Model style: NgModel</h4> <h4>Model style: NgModel</h4>
<ion-segment [(ng-model)]="modelStyle" dark> <ion-segment [(ng-model)]="modelStyle" dark>
@ -63,3 +65,19 @@
<p>Model Style: <b>Model {{ modelStyle }}</b></p> <p>Model Style: <b>Model {{ modelStyle }}</b></p>
</ion-content> </ion-content>
<ion-toolbar position="bottom">
<ion-title>
<ion-segment [(ng-model)]="appType" primary>
<ion-segment-button value="paid">
Paid
</ion-segment-button>
<ion-segment-button value="free">
Free
</ion-segment-button>
<ion-segment-button value="top" class="e2eSegmentTopGrossing">
Top Grossing
</ion-segment-button>
</ion-segment>
</ion-title>
</ion-toolbar>