Skip to content

Commit

Permalink
iOS: Added images for sliders, replaced images for play buttons.
Browse files Browse the repository at this point in the history
iOS: More theme adjustments.

Related to issue #405.
  • Loading branch information
ycastonguay committed Apr 10, 2013
1 parent 1d3de31 commit f1416a2
Show file tree
Hide file tree
Showing 30 changed files with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void RefreshAudioFile(AudioFile audioFile)
Artist = audioFile.ArtistName,
AlbumTitle = audioFile.AlbumTitle,
Title = audioFile.Title,
Artwork = new MPMediaItemArtwork(image)
Artwork = (image != null) ? new MPMediaItemArtwork(image) : null
};
}
}
Expand Down
10 changes: 6 additions & 4 deletions MPfm/MPfm.iOS/Classes/Controllers/PlayerViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ public override void ViewDidLoad()
viewPosition.BackgroundColor = GlobalTheme.BackgroundColor;
viewMain.BackgroundColor = GlobalTheme.BackgroundColor;

//sliderPosition.SetThumbImage(UIImage.FromBundle("Images/Sliders/slider_ball"), UIControlState.Normal);
//sliderPosition.SetMinTrackImage(UIImage.FromBundle("Images/Sliders/slide"), UIControlState.Normal);
sliderPosition.SetThumbImage(UIImage.FromBundle("Images/Sliders/thumb"), UIControlState.Normal);
sliderPosition.SetMinTrackImage(UIImage.FromBundle("Images/Sliders/slider2").StretchableImage(8, 0), UIControlState.Normal);
sliderPosition.SetMaxTrackImage(UIImage.FromBundle("Images/Sliders/slider").StretchableImage(8, 0), UIControlState.Normal);

// Reduce the song position slider size
sliderPosition.Transform = CGAffineTransform.MakeScale(0.7f, 0.7f);
Expand Down Expand Up @@ -149,8 +150,9 @@ public override void ViewDidLoad()

// Create MPVolumeView (only visible on physical iOS device)
_volumeView = new MPVolumeView(new RectangleF(8, UIScreen.MainScreen.Bounds.Height - 44 - 52, UIScreen.MainScreen.Bounds.Width - 16, 46));
//volumeView.SetVolumeThumbImage(UIImage.FromBundle("Images/Sliders/slider_ball"), UIControlState.Normal);
//volumeView.SetMinimumVolumeSliderImage(UIImage.FromBundle("Images/Sliders/slide"), UIControlState.Normal);
_volumeView.SetVolumeThumbImage(UIImage.FromBundle("Images/Sliders/thumbbig"), UIControlState.Normal);
_volumeView.SetMinimumVolumeSliderImage(UIImage.FromBundle("Images/Sliders/slider2").StretchableImage(8, 0), UIControlState.Normal);
_volumeView.SetMaximumVolumeSliderImage(UIImage.FromBundle("Images/Sliders/slider").StretchableImage(8, 0), UIControlState.Normal);
this.View.AddSubview(_volumeView);

// Only display wave form on iPhone 5+
Expand Down
1 change: 1 addition & 0 deletions MPfm/MPfm.iOS/Classes/Controls/MPfmTabBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public override void Draw(RectangleF rect)

var context = UIGraphics.GetCurrentContext();
CoreGraphicsHelper.FillRect(context, rect, GlobalTheme.MainDarkColor.CGColor);
CoreGraphicsHelper.FillRect(context, new RectangleF(0, 0, 320, 2), GlobalTheme.MainLightColor.CGColor);
}
}
}
3 changes: 2 additions & 1 deletion MPfm/MPfm.iOS/Classes/Delegates/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public override bool FinishedLaunching(UIApplication app, NSDictionary options)

UINavigationBar.Appearance.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
UINavigationBar.Appearance.BackgroundColor = GlobalTheme.MainColor;
UITabBar.Appearance.SelectionIndicatorImage = new UIImage();
//UITabBar.Appearance.SelectionIndicatorImage = new UIImage();

// Create window
_window = new MPfmWindow(UIScreen.MainScreen.Bounds);
Expand Down Expand Up @@ -147,6 +147,7 @@ public void AddTab(MobileNavigationTabType type, string title, UIViewController
navCtrl.TabBarItem.SetTitleTextAttributes(attr, UIControlState.Normal);
navCtrl.TabBarItem.SetTitleTextAttributes(attrSelected, UIControlState.Selected);
navCtrl.TabBarItem.Title = title;
//navCtrl.TabBarItem.SetFinishedImages(UIImage.FromBundle("Images/Tabs/tab_selected"), UIImage.FromBundle("Images/Tabs/tab"));
if(title.ToUpper() == "MORE")
navCtrl.TabBarItem.Image = UIImage.FromBundle("Images/Tabs/more");
else
Expand Down
Binary file modified MPfm/MPfm.iOS/Images/Buttons/next.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/next@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/next_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/next_on@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/pause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/pause@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/pause_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/pause_on@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/play.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/play@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/play_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/play_on@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/previous.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/previous@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/previous_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MPfm/MPfm.iOS/Images/Buttons/previous_on@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MPfm/MPfm.iOS/Images/Sliders/slider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MPfm/MPfm.iOS/Images/Sliders/slider2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MPfm/MPfm.iOS/Images/Sliders/slider2@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MPfm/MPfm.iOS/Images/Sliders/slider@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MPfm/MPfm.iOS/Images/Sliders/thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MPfm/MPfm.iOS/Images/Sliders/thumb@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MPfm/MPfm.iOS/Images/Sliders/thumbbig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MPfm/MPfm.iOS/Images/Sliders/thumbbig@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions MPfm/MPfm.iOS/MPfm.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@
<Folder Include="Images\Splash\" />
<Folder Include="Images\Buttons\" />
<Folder Include="Classes\Managers\" />
<Folder Include="Images\Sliders\" />
</ItemGroup>
<ItemGroup>
<Content Include="Images\icon57.png" />
Expand Down Expand Up @@ -287,6 +288,14 @@
<BundleResource Include="Images\Buttons\previous%402x.png" />
<BundleResource Include="Images\media.png" />
<BundleResource Include="Images\media%402x.png" />
<BundleResource Include="Images\Sliders\slider.png" />
<BundleResource Include="Images\Sliders\slider%402x.png" />
<BundleResource Include="Images\Sliders\slider2.png" />
<BundleResource Include="Images\Sliders\slider2%402x.png" />
<BundleResource Include="Images\Sliders\thumb.png" />
<BundleResource Include="Images\Sliders\thumb%402x.png" />
<BundleResource Include="Images\Sliders\thumbbig.png" />
<BundleResource Include="Images\Sliders\thumbbig%402x.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MPfm.Core\MPfm.Core.iOS.csproj">
Expand Down
2 changes: 1 addition & 1 deletion MPfm/MPfm.iOS/XIB/iPhone/PlayerViewController_iPhone.xib
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<object class="IBUISlider" id="725553553">
<reference key="NSNextResponder" ref="884086151"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{74, 2}, {172, 23}}</string>
<string key="NSFrame">{{74, 3}, {172, 23}}</string>
<reference key="NSSuperview" ref="884086151"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="374741439"/>
Expand Down

0 comments on commit f1416a2

Please sign in to comment.