Skip to content

Commit 862456c

Browse files
committed
looks much better
1 parent 445ceb8 commit 862456c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Vapolia.SegmentedViews/Platforms/iOS/SegmentedViewHandler.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static void MapChildren(SegmentedViewHandler handler, ISegmentedView virtualView
7272
{
7373
var segment = virtualView.Children[i];
7474
var width = widths[i];
75-
segmentControl.InsertSegment(segment.GetText(virtualView), i, true);
75+
segmentControl.InsertSegment(segment.GetText(virtualView), i, false);
7676

7777
segmentControl.SetEnabled(true, i);
7878

@@ -89,7 +89,7 @@ static void MapChildren(SegmentedViewHandler handler, ISegmentedView virtualView
8989
segmentControl.SetWidth((nfloat)width.Value, i);
9090
}
9191
}
92-
92+
9393
MapSelectedIndex(handler, virtualView);
9494
}
9595

@@ -106,7 +106,9 @@ static void MapSelectedIndex(SegmentedViewHandler handler, ISegmentedView contro
106106
static void MapItemPadding(SegmentedViewHandler handler, ISegmentedView control)
107107
{
108108
var padding = control.ItemPadding;
109-
handler.PlatformView.SetContentPositionAdjustment(new ((nfloat)padding.Left, (nfloat)padding.Top), UISegmentedControlSegment.Any, UIBarMetrics.Default);
109+
// handler.PlatformView.SetContentPositionAdjustment(new ((nfloat)padding.Left, (nfloat)padding.Top), UISegmentedControlSegment.Any, UIBarMetrics.Default);
110+
//TODO
111+
//See https://gist.github.com/nubbel/f675113429b5c7429252
110112
}
111113

112114
static void MapIsEnabled2(SegmentedViewHandler handler, ISegmentedView control)
@@ -143,7 +145,9 @@ static void MapCharacterSpacing(SegmentedViewHandler handler, ITextStyle control
143145
var kerningAdjustment = control.CharacterSpacing == 0 ? null : (float?)control.CharacterSpacing;
144146
var titleTextAttributes = new UIStringAttributes { KerningAdjustment = kerningAdjustment };
145147
handler.PlatformView.SetTitleTextAttributes(titleTextAttributes, UIControlState.Normal);
148+
titleTextAttributes = new UIStringAttributes { KerningAdjustment = kerningAdjustment };
146149
handler.PlatformView.SetTitleTextAttributes(titleTextAttributes, UIControlState.Disabled);
150+
titleTextAttributes = new UIStringAttributes { KerningAdjustment = kerningAdjustment };
147151
handler.PlatformView.SetTitleTextAttributes(titleTextAttributes, UIControlState.Selected);
148152
}
149153

0 commit comments

Comments
 (0)