From b773575ded24633529c2ea020c83869419631078 Mon Sep 17 00:00:00 2001 From: Curtis Wensley Date: Wed, 24 May 2023 02:20:16 -0700 Subject: [PATCH] Wpf: Vertically center text in tab page headers fixes #2197 --- src/Eto.Wpf/Forms/Controls/TabPageHandler.cs | 1 + test/Eto.Test/Sections/Controls/TabControlSection.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Eto.Wpf/Forms/Controls/TabPageHandler.cs b/src/Eto.Wpf/Forms/Controls/TabPageHandler.cs index 5efcae6b49..8dd448f4ab 100644 --- a/src/Eto.Wpf/Forms/Controls/TabPageHandler.cs +++ b/src/Eto.Wpf/Forms/Controls/TabPageHandler.cs @@ -32,6 +32,7 @@ public TabPageHandler() var header = new swc.StackPanel { Orientation = swc.Orientation.Horizontal }; headerImage = new swc.Image(); headerText = new swc.TextBlock(); + headerText.VerticalAlignment = sw.VerticalAlignment.Center; header.Children.Add(headerImage); header.Children.Add(headerText); Control.Header = header; diff --git a/test/Eto.Test/Sections/Controls/TabControlSection.cs b/test/Eto.Test/Sections/Controls/TabControlSection.cs index ecc8ec74af..e3f7237f64 100644 --- a/test/Eto.Test/Sections/Controls/TabControlSection.cs +++ b/test/Eto.Test/Sections/Controls/TabControlSection.cs @@ -106,7 +106,7 @@ TabControl DefaultTabs() control.Pages.Add(new TabPage { Text = "Tab 2", - Image = TestIcons.TestIcon.WithSize(16, 16), + Image = TestIcons.TestIcon.WithSize(32, 32), Content = TabTwo() });