mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-13 11:09:06 +00:00
Support RTL for .txt file #1612
This commit is contained in:
@@ -25,6 +25,7 @@ using QuickLook.Plugin.TextViewer.Detectors;
|
|||||||
using QuickLook.Plugin.TextViewer.Themes;
|
using QuickLook.Plugin.TextViewer.Themes;
|
||||||
using QuickLook.Plugin.TextViewer.Themes.HighlightingDefinitions;
|
using QuickLook.Plugin.TextViewer.Themes.HighlightingDefinitions;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -205,6 +206,13 @@ public partial class TextViewerPanel : TextEditor, IDisposable
|
|||||||
: Brushes.Transparent;
|
: Brushes.Transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (extension.Equals(".txt", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
FlowDirection = CultureInfo.CurrentUICulture.TextInfo.IsRightToLeft
|
||||||
|
? System.Windows.FlowDirection.RightToLeft
|
||||||
|
: System.Windows.FlowDirection.LeftToRight;
|
||||||
|
}
|
||||||
|
|
||||||
context.IsBusy = false;
|
context.IsBusy = false;
|
||||||
}, DispatcherPriority.Render);
|
}, DispatcherPriority.Render);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user