diff --git a/.build/Build.cs b/.build/Build.cs index 6d4b44c6..1b1844f9 100644 --- a/.build/Build.cs +++ b/.build/Build.cs @@ -1,8 +1,3 @@ -using System; -using System.IO; -using System.Linq; -using System.Text; -using System.Xml.Linq; using GlobExpressions; using Nuke.Common; using Nuke.Common.IO; @@ -10,9 +5,11 @@ using Nuke.Common.Tooling; using Nuke.Common.Tools.DotNet; using Nuke.Common.Tools.GitVersion; -using static Nuke.Common.IO.CompressionTasks; +using System; +using System.IO; +using System.Linq; +using System.Text; using static Nuke.Common.Tools.DotNet.DotNetTasks; -using static Nuke.Common.IO.FileSystemTasks; class Build : NukeBuild { diff --git a/Changelog.md b/Changelog.md index 66d197a0..b0dbaee9 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,12 @@ # Changelog for Fluent.Ribbon +## 10.0.3 + +- ### Bug fixes + + - [#1155](../../issues/1155) - Update Russian translation + - [#1161](../../issues/1161) - RibbonBackButton - Localization Mix + ## 10.0.2 - ### Bug fixes diff --git a/Fluent.Ribbon.Showcase/TestContent.xaml b/Fluent.Ribbon.Showcase/TestContent.xaml index 6d066e36..769f977d 100644 --- a/Fluent.Ribbon.Showcase/TestContent.xaml +++ b/Fluent.Ribbon.Showcase/TestContent.xaml @@ -272,7 +272,7 @@ - diff --git a/Fluent.Ribbon/Controls/InRibbonGallery.cs b/Fluent.Ribbon/Controls/InRibbonGallery.cs index dd15a25e..6fd2c2fc 100644 --- a/Fluent.Ribbon/Controls/InRibbonGallery.cs +++ b/Fluent.Ribbon/Controls/InRibbonGallery.cs @@ -50,7 +50,7 @@ public class InRibbonGallery : Selector, IScalableRibbonControl, IDropDownContro private ToggleButton? dropDownButton; // Freezed image (created during snapping) - private Image snappedImage = new(); + private readonly Image snappedImage = new(); // Is visual currently snapped private bool isSnapped; diff --git a/Fluent.Ribbon/Controls/RibbonGroupBoxWrapPanel.cs b/Fluent.Ribbon/Controls/RibbonGroupBoxWrapPanel.cs index 98759a57..096f330a 100644 --- a/Fluent.Ribbon/Controls/RibbonGroupBoxWrapPanel.cs +++ b/Fluent.Ribbon/Controls/RibbonGroupBoxWrapPanel.cs @@ -13,18 +13,6 @@ namespace Fluent; /// public class RibbonGroupBoxWrapPanel : Panel { - private const Orientation DefaultOrientation = Orientation.Vertical; - - private Orientation orientation; - - /// - /// Creates a new instance. - /// - public RibbonGroupBoxWrapPanel() - { - this.orientation = DefaultOrientation; - } - /// /// Attached for SharedSizeGroupName. /// @@ -155,7 +143,7 @@ public double ItemHeight public static readonly DependencyProperty OrientationProperty = StackPanel.OrientationProperty.AddOwner( typeof(RibbonGroupBoxWrapPanel), - new FrameworkPropertyMetadata(Orientation.Horizontal, + new FrameworkPropertyMetadata(Orientation.Vertical, FrameworkPropertyMetadataOptions.AffectsMeasure, OnOrientationChanged)); @@ -168,17 +156,20 @@ public double ItemHeight /// public Orientation Orientation { - get { return this.orientation; } + get { return (Orientation)this.GetValue(OrientationProperty); } set { this.SetValue(OrientationProperty, value); } } - /// - /// - /// private static void OnOrientationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - var p = (RibbonGroupBoxWrapPanel)d; - p.orientation = (Orientation)e.NewValue; + var control = (RibbonGroupBoxWrapPanel)d; + + if (control.IsLoaded is false) + { + return; + } + + UIHelper.GetParent(control)?.TryClearCacheAndResetStateAndScaleAndNotifyParentRibbonGroupsContainer(); } private struct UvSize diff --git a/Fluent.Ribbon/Localization/Languages/Russian.cs b/Fluent.Ribbon/Localization/Languages/Russian.cs index 8a97f900..b796f4df 100644 --- a/Fluent.Ribbon/Localization/Languages/Russian.cs +++ b/Fluent.Ribbon/Localization/Languages/Russian.cs @@ -6,7 +6,7 @@ namespace Fluent.Localization.Languages public class Russian : RibbonLocalizationBase { public override string Automatic { get; } = "Автоматически"; - public override string BackstageBackButtonUid { get; } = FallbackLocalization.BackstageBackButtonUid /* Close Backstage */; + public override string BackstageBackButtonUid { get; } = "Закрыть Backstage"; public override string BackstageButtonKeyTip { get; } = "Ф"; public override string BackstageButtonText { get; } = "Файл"; public override string CustomizeStatusBar { get; } = "Настройка строки состояния"; @@ -38,4 +38,4 @@ public class Russian : RibbonLocalizationBase public override string UseClassicRibbon { get; } = "_Использовать классическую ленту"; public override string UseSimplifiedRibbon { get; } = "_Использовать упрощённую ленту"; } -} \ No newline at end of file +} diff --git a/Fluent.Ribbon/Themes/Controls/BackstageTabControl.xaml b/Fluent.Ribbon/Themes/Controls/BackstageTabControl.xaml index 9461c743..fd84943b 100644 --- a/Fluent.Ribbon/Themes/Controls/BackstageTabControl.xaml +++ b/Fluent.Ribbon/Themes/Controls/BackstageTabControl.xaml @@ -204,6 +204,7 @@ Padding="22 7 0 7" VerticalAlignment="Top" AutomationProperties.Name="{Binding Uid, RelativeSource={RelativeSource Self}}" + AutomationProperties.AcceleratorKey="ESC" Command="{x:Static Fluent:RibbonCommands.OpenBackstage}" Visibility="{Binding Path=IsBackButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Fluent.Ribbon.Converters.BoolToVisibilityConverter}}">