File tree Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -31,29 +31,37 @@ public void UpdateCulture(CultureInfo culture)
3131
3232 CultureInfo . DefaultThreadCurrentUICulture = culture ;
3333 CultureInfo . CurrentUICulture = culture ;
34-
34+ // TODO: Remove this after work RealTime string resources change work
35+ #if DEBUG
3536 if ( tmp != FlowDirection )
3637 InvokeCallbacks ( ) ;
38+ #endif
3739 }
3840
3941 /// <inheritdoc/>
4042 public void AddCallback ( Window target , Action callback )
4143 {
44+ // TODO: Remove this after work RealTime string resources change work
45+ #if DEBUG
4246 var weakReference = new WeakReference < object > ( target ) ;
4347 _callbacks . Add ( ( weakReference , callback ) ) ;
4448
4549 if ( ! IsExistTarget ( target ) )
4650 target . Closed += ( sender , args ) => RemoveCallback ( target ) ;
51+ #endif
4752 }
4853
4954 /// <inheritdoc/>
5055 public void AddCallback ( FrameworkElement target , Action callback )
5156 {
57+ // TODO: Remove this after work RealTime string resources change work
58+ #if DEBUG
5259 var weakReference = new WeakReference < object > ( target ) ;
5360 _callbacks . Add ( ( weakReference , callback ) ) ;
5461
5562 if ( ! IsExistTarget ( target ) )
5663 target . Unloaded += ( sender , args ) => RemoveCallback ( target ) ;
64+ #endif
5765 }
5866
5967 /// <inheritdoc/>
Original file line number Diff line number Diff line change 228228 <Grid .ColumnDefinitions>
229229 <ColumnDefinition Width =" Auto" />
230230 <ColumnDefinition Width =" *" />
231- <ColumnDefinition x : Name =" RightPaddingColumn" Width =" {x:Bind PaddingColumnWidth, Mode=OneWay} " />
231+ <ColumnDefinition x : Name =" RightPaddingColumn" Width =" 0 " />
232232 </Grid .ColumnDefinitions>
233233
234234 <!-- Height is not divisble by four in order to properly align the button -->
237237 Grid.Column=" 0"
238238 Width=" 30"
239239 Height=" 30"
240- Margin=" 0,0,6,0"
241240 Padding=" 8"
242241 HorizontalAlignment=" Left"
243242 VerticalAlignment=" Center"
Original file line number Diff line number Diff line change @@ -52,8 +52,6 @@ public bool AllowTabsDrag
5252 public Rectangle DragArea
5353 => DragAreaRectangle ;
5454
55- public GridLength PaddingColumnWidth { get ; set ; }
56-
5755 // Events
5856
5957 public static event EventHandler < TabBarItem ? > ? SelectedTabItemChanged ;
@@ -69,10 +67,12 @@ public TabBar()
6967
7068 var appWindow = MainWindow . Instance . AppWindow ;
7169
72- PaddingColumnWidth =
73- new ( RealTimeLayoutService . FlowDirection is FlowDirection . RightToLeft
70+ double rightPaddingColumnWidth =
71+ RealTimeLayoutService . FlowDirection is FlowDirection . RightToLeft
7472 ? appWindow . TitleBar . LeftInset
75- : appWindow . TitleBar . RightInset ) ;
73+ : appWindow . TitleBar . RightInset ;
74+
75+ RightPaddingColumn . Width = new ( rightPaddingColumnWidth >= 0 ? rightPaddingColumnWidth : 0 ) ;
7676
7777 AppearanceSettingsService . PropertyChanged += ( s , e ) =>
7878 {
You can’t perform that action at this time.
0 commit comments