Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
batzen committed Aug 24, 2023
2 parents 2165d04 + 575e3b0 commit 1873919
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 30 deletions.
11 changes: 4 additions & 7 deletions .build/Build.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using GlobExpressions;
using Nuke.Common;
using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
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
{
Expand Down
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Fluent.Ribbon.Showcase/TestContent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
<Fluent:BackstageTabItem Header="Recent"
Icon="{iconPacks:Material Kind=History}"
KeyTip="R">
<TabControl Style="{DynamicResource InnerBackstageTabControlStyle}"
<TabControl Style="{DynamicResource Fluent.Ribbon.Styles.InnerBackstageTabControl}"
Margin="20 5 20 5">
<Fluent:SeparatorTabItem Header="Test1" />
<TabItem Header="1" />
Expand Down
2 changes: 1 addition & 1 deletion Fluent.Ribbon/Controls/InRibbonGallery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
29 changes: 10 additions & 19 deletions Fluent.Ribbon/Controls/RibbonGroupBoxWrapPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ namespace Fluent;
/// </summary>
public class RibbonGroupBoxWrapPanel : Panel
{
private const Orientation DefaultOrientation = Orientation.Vertical;

private Orientation orientation;

/// <summary>
/// Creates a new instance.
/// </summary>
public RibbonGroupBoxWrapPanel()
{
this.orientation = DefaultOrientation;
}

/// <summary>
/// Attached <see cref="DependencyProperty"/> for <c>SharedSizeGroupName</c>.
/// </summary>
Expand Down Expand Up @@ -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));

Expand All @@ -168,17 +156,20 @@ public double ItemHeight
/// </summary>
public Orientation Orientation
{
get { return this.orientation; }
get { return (Orientation)this.GetValue(OrientationProperty); }
set { this.SetValue(OrientationProperty, value); }
}

/// <summary>
/// <see cref="PropertyMetadata.PropertyChangedCallback"/>
/// </summary>
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<RibbonGroupBox>(control)?.TryClearCacheAndResetStateAndScaleAndNotifyParentRibbonGroupsContainer();
}

private struct UvSize
Expand Down
4 changes: 2 additions & 2 deletions Fluent.Ribbon/Localization/Languages/Russian.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; } = "Настройка строки состояния";
Expand Down Expand Up @@ -38,4 +38,4 @@ public class Russian : RibbonLocalizationBase
public override string UseClassicRibbon { get; } = "_Использовать классическую ленту";
public override string UseSimplifiedRibbon { get; } = "_Использовать упрощённую ленту";
}
}
}
1 change: 1 addition & 0 deletions Fluent.Ribbon/Themes/Controls/BackstageTabControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}">
<Button.Margin>
Expand Down

0 comments on commit 1873919

Please sign in to comment.