From f68d81941401cef9c1a7bd1184093a18e4a024c9 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 27 May 2020 18:10:22 -0300 Subject: [PATCH 1/8] Add TextBox control resources. --- .../Accents/FluentControlResourcesDark.xaml | 25 ++++++++++++++++++- .../Accents/FluentControlResourcesLight.xaml | 25 ++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml b/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml index 70599aa51e..38e4778e24 100644 --- a/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml +++ b/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml @@ -2,6 +2,29 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=netstandard"> - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml b/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml index 70599aa51e..276828c587 100644 --- a/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml +++ b/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml @@ -2,6 +2,29 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=netstandard"> - + + + + + + + + + + + + + + + + + + + + + + + + From a596e0bfb8867c49b37e6bf3b5be3993db9f8e98 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 27 May 2020 19:40:16 -0300 Subject: [PATCH 2/8] Almost Working fluent textbox. --- samples/ControlCatalog/App.xaml | 3 +- samples/ControlCatalog/MainView.xaml.cs | 44 +++++------ samples/ControlCatalog/MainWindow.xaml | 2 +- src/Avalonia.Themes.Fluent/Accents/Base.xaml | 6 ++ .../Accents/FluentBaseDark.xaml | 32 ++++++++ src/Avalonia.Themes.Fluent/TextBox.xaml | 73 ++++++++++++++++--- 6 files changed, 124 insertions(+), 36 deletions(-) diff --git a/samples/ControlCatalog/App.xaml b/samples/ControlCatalog/App.xaml index c9441782a2..d59c15bb6a 100644 --- a/samples/ControlCatalog/App.xaml +++ b/samples/ControlCatalog/App.xaml @@ -1,7 +1,8 @@ - + + diff --git a/samples/ControlCatalog/MainView.xaml.cs b/samples/ControlCatalog/MainView.xaml.cs index 8c4818fb07..fceca426f4 100644 --- a/samples/ControlCatalog/MainView.xaml.cs +++ b/samples/ControlCatalog/MainView.xaml.cs @@ -32,30 +32,30 @@ namespace ControlCatalog } - var light = new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog")) - { - Source = new Uri("resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default") - }; - var dark = new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog")) - { - Source = new Uri("resm:Avalonia.Themes.Default.Accents.BaseDark.xaml?assembly=Avalonia.Themes.Default") - }; + //var light = new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog")) + //{ + // Source = new Uri("resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default") + //}; + //var dark = new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog")) + //{ + // Source = new Uri("resm:Avalonia.Themes.Default.Accents.BaseDark.xaml?assembly=Avalonia.Themes.Default") + //}; - var themes = this.Find("Themes"); - themes.SelectionChanged += (sender, e) => - { - switch (themes.SelectedIndex) - { - case 0: - Styles[0] = light; - break; - case 1: - Styles[0] = dark; - break; - } - }; - Styles.Add(light); + //var themes = this.Find("Themes"); + //themes.SelectionChanged += (sender, e) => + //{ + // switch (themes.SelectedIndex) + // { + // case 0: + // Styles[0] = light; + // break; + // case 1: + // Styles[0] = dark; + // break; + // } + //}; + //Styles.Add(light); var decorations = this.Find("Decorations"); decorations.SelectionChanged += (sender, e) => diff --git a/samples/ControlCatalog/MainWindow.xaml b/samples/ControlCatalog/MainWindow.xaml index a0bb956425..670e30725b 100644 --- a/samples/ControlCatalog/MainWindow.xaml +++ b/samples/ControlCatalog/MainWindow.xaml @@ -7,7 +7,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:vm="clr-namespace:ControlCatalog.ViewModels" xmlns:v="clr-namespace:ControlCatalog.Views" - x:Class="ControlCatalog.MainWindow" WindowState="{Binding WindowState, Mode=TwoWay}" Background="Transparent"> + x:Class="ControlCatalog.MainWindow" WindowState="{Binding WindowState, Mode=TwoWay}"> diff --git a/src/Avalonia.Themes.Fluent/Accents/Base.xaml b/src/Avalonia.Themes.Fluent/Accents/Base.xaml index b94c0ecf5f..6dc59bed21 100644 --- a/src/Avalonia.Themes.Fluent/Accents/Base.xaml +++ b/src/Avalonia.Themes.Fluent/Accents/Base.xaml @@ -14,5 +14,11 @@ #FF000000 Segoe UI 14 + + + True + 1 + 2 + 10,6,6,5 diff --git a/src/Avalonia.Themes.Fluent/Accents/FluentBaseDark.xaml b/src/Avalonia.Themes.Fluent/Accents/FluentBaseDark.xaml index 9623204e2c..d2a8cac601 100644 --- a/src/Avalonia.Themes.Fluent/Accents/FluentBaseDark.xaml +++ b/src/Avalonia.Themes.Fluent/Accents/FluentBaseDark.xaml @@ -70,5 +70,37 @@ #FF00459D #FF000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/TextBox.xaml b/src/Avalonia.Themes.Fluent/TextBox.xaml index 4fb3653e89..4e4cdf5231 100644 --- a/src/Avalonia.Themes.Fluent/TextBox.xaml +++ b/src/Avalonia.Themes.Fluent/TextBox.xaml @@ -1,17 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + - + From 55995c258b8cf1ff91242ba4a29cf1240e41e004 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 27 May 2020 19:48:51 -0300 Subject: [PATCH 3/8] fix fluent textbox background. --- src/Avalonia.Themes.Fluent/TextBox.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Themes.Fluent/TextBox.xaml b/src/Avalonia.Themes.Fluent/TextBox.xaml index 4e4cdf5231..fc88212fde 100644 --- a/src/Avalonia.Themes.Fluent/TextBox.xaml +++ b/src/Avalonia.Themes.Fluent/TextBox.xaml @@ -2,6 +2,7 @@ From df06ad1b11e4d72bad3d8f34b927ad209fb50540 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 27 May 2020 20:45:41 -0300 Subject: [PATCH 5/8] add missing light resources for textbox. --- .../Accents/FluentBaseLight.xaml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/Avalonia.Themes.Fluent/Accents/FluentBaseLight.xaml b/src/Avalonia.Themes.Fluent/Accents/FluentBaseLight.xaml index 2d8e457457..a77fbd80fe 100644 --- a/src/Avalonia.Themes.Fluent/Accents/FluentBaseLight.xaml +++ b/src/Avalonia.Themes.Fluent/Accents/FluentBaseLight.xaml @@ -71,5 +71,37 @@ #FFFFFFFF + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From fb0cced162fcc7a4e26971caa1df04642752afa4 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 27 May 2020 22:27:08 -0300 Subject: [PATCH 6/8] Fix Textbox layout. --- src/Avalonia.Themes.Fluent/Accents/FluentDark.xaml | 4 ++-- src/Avalonia.Themes.Fluent/Accents/FluentLight.xaml | 2 +- src/Avalonia.Themes.Fluent/TextBox.xaml | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Avalonia.Themes.Fluent/Accents/FluentDark.xaml b/src/Avalonia.Themes.Fluent/Accents/FluentDark.xaml index 80ad15ee15..5b6da70233 100644 --- a/src/Avalonia.Themes.Fluent/Accents/FluentDark.xaml +++ b/src/Avalonia.Themes.Fluent/Accents/FluentDark.xaml @@ -1,8 +1,8 @@ - + xmlns:sys="clr-namespace:System;assembly=netstandard"> + diff --git a/src/Avalonia.Themes.Fluent/Accents/FluentLight.xaml b/src/Avalonia.Themes.Fluent/Accents/FluentLight.xaml index 38601a2f2d..5825a2bf34 100644 --- a/src/Avalonia.Themes.Fluent/Accents/FluentLight.xaml +++ b/src/Avalonia.Themes.Fluent/Accents/FluentLight.xaml @@ -1,8 +1,8 @@ - + diff --git a/src/Avalonia.Themes.Fluent/TextBox.xaml b/src/Avalonia.Themes.Fluent/TextBox.xaml index 1b766376b5..e89cf2b49c 100644 --- a/src/Avalonia.Themes.Fluent/TextBox.xaml +++ b/src/Avalonia.Themes.Fluent/TextBox.xaml @@ -46,9 +46,7 @@ + Margin="{TemplateBinding BorderThickness}"> - + Date: Thu, 28 May 2020 14:38:10 -0300 Subject: [PATCH 7/8] keep control catalog on old theme for now. --- samples/ControlCatalog/App.xaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/samples/ControlCatalog/App.xaml b/samples/ControlCatalog/App.xaml index d59c15bb6a..20ca291910 100644 --- a/samples/ControlCatalog/App.xaml +++ b/samples/ControlCatalog/App.xaml @@ -2,10 +2,9 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="ControlCatalog.App"> - - - - + + +