зеркало из https://github.com/DeGsoft/maui-linux.git
Merge branch '3.0.0'
This commit is contained in:
Коммит
074531ec4f
|
@ -169,6 +169,16 @@ namespace Xamarin.Forms.ControlGallery.iOS
|
|||
}
|
||||
};
|
||||
|
||||
if (App.IOSVersion == 11)
|
||||
{
|
||||
// 'Large' Title bar text
|
||||
UINavigationBar.Appearance.LargeTitleTextAttributes = new UIStringAttributes
|
||||
{
|
||||
ForegroundColor = UIColor.FromRGB(0xE7, 0x63, 0x3B), // e7963b dark
|
||||
Font = UIFont.FromName("GillSans-Italic", 40)
|
||||
};
|
||||
}
|
||||
|
||||
var app = new App();
|
||||
_app = app;
|
||||
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
using Xamarin.Forms.CustomAttributes;
|
||||
using Xamarin.Forms.Internals;
|
||||
|
||||
#if UITEST
|
||||
using Xamarin.UITest;
|
||||
using NUnit.Framework;
|
||||
#endif
|
||||
|
||||
namespace Xamarin.Forms.Controls.Issues
|
||||
{
|
||||
[Preserve(AllMembers = true)]
|
||||
[Issue(IssueTracker.Github, 1323, "tabbed page BarTextColor is not pervasive and can't be applied after instantiation", PlatformAffected.iOS)]
|
||||
public class Issue1323 : TestTabbedPage // or TestMasterDetailPage, etc ...
|
||||
{
|
||||
protected override void Init()
|
||||
{
|
||||
BarBackgroundColor = Color.FromHex("#61a60e");
|
||||
BarTextColor = Color.FromHex("#ffffff");
|
||||
BackgroundColor = Color.FromHex("#61a60e");
|
||||
|
||||
var page = new ContentPage { Title = "Page 1", Content = new Button { Text = "Pop", Command = new Command(async () => await Navigation.PopModalAsync()) } };
|
||||
var page2 = new ContentPage { Title = "Page 2" };
|
||||
var page3 = new ContentPage { Title = "Page 3" };
|
||||
var page4 = new ContentPage { Title = "Page 4" };
|
||||
|
||||
Children.Add(page);
|
||||
Children.Add(page2);
|
||||
Children.Add(page3);
|
||||
Children.Add(page4);
|
||||
}
|
||||
|
||||
protected override void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
BarTextColor = Color.White;
|
||||
Children.RemoveAt(1);
|
||||
Children.Insert(1, new ContentPage { Title = "Page5", Icon = "Loyalty.png" });
|
||||
|
||||
Children.RemoveAt(3);
|
||||
Children.Insert(2, new ContentPage { Title = "Page6", Icon = "Gift.png" });
|
||||
BarTextColor = Color.White;
|
||||
}
|
||||
|
||||
#if UITEST
|
||||
[Test]
|
||||
public void Issue1323Test()
|
||||
{
|
||||
RunningApp.Screenshot("All tab bar items text should be white");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -696,6 +696,7 @@
|
|||
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla40092.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue1426.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue1733.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue1323.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla22229.xaml">
|
||||
|
|
|
@ -633,7 +633,9 @@ namespace Xamarin.Forms.Platform.iOS
|
|||
|
||||
if(Forms.IsiOS11OrNewer)
|
||||
{
|
||||
NavigationBar.LargeTitleTextAttributes = NavigationBar.TitleTextAttributes;
|
||||
var globalLargeTitleAttributes = UINavigationBar.Appearance.LargeTitleTextAttributes;
|
||||
if(globalLargeTitleAttributes == null)
|
||||
NavigationBar.LargeTitleTextAttributes = NavigationBar.TitleTextAttributes;
|
||||
}
|
||||
|
||||
var statusBarColorMode = (Element as NavigationPage).OnThisPlatform().GetStatusBarTextColorMode();
|
||||
|
|
|
@ -207,6 +207,9 @@ namespace Xamarin.Forms.Platform.iOS
|
|||
controller = GetViewController(Tabbed.CurrentPage);
|
||||
if (controller != null && controller != base.SelectedViewController)
|
||||
base.SelectedViewController = controller;
|
||||
|
||||
UpdateBarBackgroundColor();
|
||||
UpdateBarTextColor();
|
||||
}
|
||||
|
||||
void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
|
|
Загрузка…
Ссылка в новой задаче