Skip to content

Commit 1873919

Browse files
committed
Merge branch 'develop'
2 parents 2165d04 + 575e3b0 commit 1873919

File tree

7 files changed

+26
-30
lines changed

7 files changed

+26
-30
lines changed

.build/Build.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
using System;
2-
using System.IO;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Xml.Linq;
61
using GlobExpressions;
72
using Nuke.Common;
83
using Nuke.Common.IO;
94
using Nuke.Common.ProjectModel;
105
using Nuke.Common.Tooling;
116
using Nuke.Common.Tools.DotNet;
127
using Nuke.Common.Tools.GitVersion;
13-
using static Nuke.Common.IO.CompressionTasks;
8+
using System;
9+
using System.IO;
10+
using System.Linq;
11+
using System.Text;
1412
using static Nuke.Common.Tools.DotNet.DotNetTasks;
15-
using static Nuke.Common.IO.FileSystemTasks;
1613

1714
class Build : NukeBuild
1815
{

Changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog for Fluent.Ribbon
22

3+
## 10.0.3
4+
5+
- ### Bug fixes
6+
7+
- [#1155](../../issues/1155) - Update Russian translation
8+
- [#1161](../../issues/1161) - RibbonBackButton - Localization Mix
9+
310
## 10.0.2
411

512
- ### Bug fixes

Fluent.Ribbon.Showcase/TestContent.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
<Fluent:BackstageTabItem Header="Recent"
273273
Icon="{iconPacks:Material Kind=History}"
274274
KeyTip="R">
275-
<TabControl Style="{DynamicResource InnerBackstageTabControlStyle}"
275+
<TabControl Style="{DynamicResource Fluent.Ribbon.Styles.InnerBackstageTabControl}"
276276
Margin="20 5 20 5">
277277
<Fluent:SeparatorTabItem Header="Test1" />
278278
<TabItem Header="1" />

Fluent.Ribbon/Controls/InRibbonGallery.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class InRibbonGallery : Selector, IScalableRibbonControl, IDropDownContro
5050
private ToggleButton? dropDownButton;
5151

5252
// Freezed image (created during snapping)
53-
private Image snappedImage = new();
53+
private readonly Image snappedImage = new();
5454

5555
// Is visual currently snapped
5656
private bool isSnapped;

Fluent.Ribbon/Controls/RibbonGroupBoxWrapPanel.cs

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,6 @@ namespace Fluent;
1313
/// </summary>
1414
public class RibbonGroupBoxWrapPanel : Panel
1515
{
16-
private const Orientation DefaultOrientation = Orientation.Vertical;
17-
18-
private Orientation orientation;
19-
20-
/// <summary>
21-
/// Creates a new instance.
22-
/// </summary>
23-
public RibbonGroupBoxWrapPanel()
24-
{
25-
this.orientation = DefaultOrientation;
26-
}
27-
2816
/// <summary>
2917
/// Attached <see cref="DependencyProperty"/> for <c>SharedSizeGroupName</c>.
3018
/// </summary>
@@ -155,7 +143,7 @@ public double ItemHeight
155143
public static readonly DependencyProperty OrientationProperty =
156144
StackPanel.OrientationProperty.AddOwner(
157145
typeof(RibbonGroupBoxWrapPanel),
158-
new FrameworkPropertyMetadata(Orientation.Horizontal,
146+
new FrameworkPropertyMetadata(Orientation.Vertical,
159147
FrameworkPropertyMetadataOptions.AffectsMeasure,
160148
OnOrientationChanged));
161149

@@ -168,17 +156,20 @@ public double ItemHeight
168156
/// </summary>
169157
public Orientation Orientation
170158
{
171-
get { return this.orientation; }
159+
get { return (Orientation)this.GetValue(OrientationProperty); }
172160
set { this.SetValue(OrientationProperty, value); }
173161
}
174162

175-
/// <summary>
176-
/// <see cref="PropertyMetadata.PropertyChangedCallback"/>
177-
/// </summary>
178163
private static void OnOrientationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
179164
{
180-
var p = (RibbonGroupBoxWrapPanel)d;
181-
p.orientation = (Orientation)e.NewValue;
165+
var control = (RibbonGroupBoxWrapPanel)d;
166+
167+
if (control.IsLoaded is false)
168+
{
169+
return;
170+
}
171+
172+
UIHelper.GetParent<RibbonGroupBox>(control)?.TryClearCacheAndResetStateAndScaleAndNotifyParentRibbonGroupsContainer();
182173
}
183174

184175
private struct UvSize

Fluent.Ribbon/Localization/Languages/Russian.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Fluent.Localization.Languages
66
public class Russian : RibbonLocalizationBase
77
{
88
public override string Automatic { get; } = "Автоматически";
9-
public override string BackstageBackButtonUid { get; } = FallbackLocalization.BackstageBackButtonUid /* Close Backstage */;
9+
public override string BackstageBackButtonUid { get; } = "Закрыть Backstage";
1010
public override string BackstageButtonKeyTip { get; } = "Ф";
1111
public override string BackstageButtonText { get; } = "Файл";
1212
public override string CustomizeStatusBar { get; } = "Настройка строки состояния";
@@ -38,4 +38,4 @@ public class Russian : RibbonLocalizationBase
3838
public override string UseClassicRibbon { get; } = "_Использовать классическую ленту";
3939
public override string UseSimplifiedRibbon { get; } = "_Использовать упрощённую ленту";
4040
}
41-
}
41+
}

Fluent.Ribbon/Themes/Controls/BackstageTabControl.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@
204204
Padding="22 7 0 7"
205205
VerticalAlignment="Top"
206206
AutomationProperties.Name="{Binding Uid, RelativeSource={RelativeSource Self}}"
207+
AutomationProperties.AcceleratorKey="ESC"
207208
Command="{x:Static Fluent:RibbonCommands.OpenBackstage}"
208209
Visibility="{Binding Path=IsBackButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Fluent.Ribbon.Converters.BoolToVisibilityConverter}}">
209210
<Button.Margin>

0 commit comments

Comments
 (0)