@@ -6,16 +6,20 @@ namespace CodeHub.iOS
66{
77 public class Theme : ICodeFrameworkTheme
88 {
9- public static Theme CurrentTheme { get ; private set ; }
9+ public static Theme CurrentTheme { get ; private set ; }
1010
1111 public static void Setup ( )
1212 {
1313 var theme = new Theme ( ) ;
1414 CurrentTheme = theme ;
1515 CodeFramework . iOS . Theme . CurrentTheme = theme ;
16+
17+ var defaultValues = Cirrious . CrossCore . Mvx . Resolve < CodeFramework . Core . Services . IDefaultValueService > ( ) ;
18+ Theme . CurrentTheme . FontSizeRatio = defaultValues . Get < bool > ( "large_fonts" ) ? 1.3f : 1.0f ;
19+
1620 RepositoryCellView . RoundImages = false ;
17- MonoTouch . Dialog . StyledStringElement . DefaultTitleFont = UIFont . SystemFontOfSize ( 15f ) ;
1821 MonoTouch . Dialog . NameTimeStringElement . NameColor = Theme . CurrentTheme . MainTitleColor ;
22+ MonoTouch . Dialog . Element . FontSizeRatio = Theme . CurrentTheme . FontSizeRatio ;
1923
2024 UIApplication . SharedApplication . StatusBarStyle = UIStatusBarStyle . LightContent ;
2125 UINavigationBar . Appearance . TintColor = UIColor . White ;
@@ -34,7 +38,7 @@ public static void Setup()
3438 UISegmentedControl . Appearance . TintColor = UIColor . FromRGB ( 110 , 110 , 117 ) ;
3539 UITableViewHeaderFooterView . Appearance . TintColor = UIColor . FromRGB ( 228 , 228 , 228 ) ;
3640 UILabel . AppearanceWhenContainedIn ( typeof ( UITableViewHeaderFooterView ) ) . TextColor = UIColor . FromRGB ( 136 , 136 , 136 ) ;
37- UILabel . AppearanceWhenContainedIn ( typeof ( UITableViewHeaderFooterView ) ) . Font = UIFont . SystemFontOfSize ( 13f ) ;
41+ UILabel . AppearanceWhenContainedIn ( typeof ( UITableViewHeaderFooterView ) ) . Font = UIFont . SystemFontOfSize ( 13f * Theme . CurrentTheme . FontSizeRatio ) ;
3842
3943 UIToolbar . Appearance . BarTintColor = UIColor . FromRGB ( 245 , 245 , 245 ) ;
4044
@@ -43,15 +47,15 @@ public static void Setup()
4347// CodeFramework.Elements.NewsFeedElement.LinkColor = theme.MainTitleColor;
4448// CodeFramework.Elements.NewsFeedElement.TextColor = theme.MainTextColor;
4549// CodeFramework.Elements.NewsFeedElement.NameColor = theme.MainTitleColor;
46- }
50+ }
4751
4852 public UITextAttributes SegmentedControlText
4953 {
5054 get
5155 {
5256 return new UITextAttributes
5357 {
54- Font = UIFont . SystemFontOfSize ( 14f ) ,
58+ Font = UIFont . SystemFontOfSize ( 14f * Theme . CurrentTheme . FontSizeRatio ) ,
5559 TextColor = UIColor . FromRGB ( 87 , 85 , 85 ) ,
5660 TextShadowColor = UIColor . FromRGBA ( 255 , 255 , 255 , 125 ) ,
5761 TextShadowOffset = new UIOffset ( 0 , 1 )
@@ -149,5 +153,7 @@ public UIColor ApplicationNavigationBarTint
149153 return UIColor . Black ;
150154 }
151155 }
156+
157+ public float FontSizeRatio { get ; set ; }
152158 }
153159}
0 commit comments