mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-17 13:52:40 +00:00
limit title-bar button width; minor fixes and cleanup
This commit is contained in:
@@ -130,7 +130,7 @@ namespace QuickLook.Plugin.VideoViewer
|
||||
|
||||
private void AutoHideViedoControlContainer(object sender, EventArgs e)
|
||||
{
|
||||
if (ShowVideo)
|
||||
if (!ShowVideo)
|
||||
return;
|
||||
|
||||
if (videoControlContainer.IsMouseOver)
|
||||
|
@@ -105,7 +105,7 @@ namespace QuickLook.Helpers
|
||||
{
|
||||
var mmi = (MinMaxInfo) Marshal.PtrToStructure(lParam, typeof(MinMaxInfo));
|
||||
|
||||
// Adjust the maximized size and position to fit the work area of the correct monitor
|
||||
// Adjust the maximized size and position to fit the work area of the current monitor
|
||||
var currentScreen = Screen.FromHandle(hwnd);
|
||||
var workArea = currentScreen.WorkingArea;
|
||||
var monitorArea = currentScreen.Bounds;
|
||||
|
@@ -27,16 +27,14 @@
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
</ResourceDictionary>
|
||||
</controls:MainWindowBase.Resources>
|
||||
<controls:MainWindowBase.Style>
|
||||
<Style TargetType="controls:MainWindowBase">
|
||||
<Setter Property="Foreground" Value="{DynamicResource WindowTextForeground}" />
|
||||
<Setter Property="WindowChrome.WindowChrome">
|
||||
<Setter.Value>
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="0" CornerRadius="0" GlassFrameThickness="0,0,0,1"
|
||||
ResizeBorderThickness="{Binding ContextObject.CanResize, Converter={StaticResource BooleanToResizeBorderThicknessConverter}, ElementName=mainWindow}"
|
||||
UseAeroCaptionButtons="False" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</WindowChrome.WindowChrome>
|
||||
<controls:MainWindowBase.Style>
|
||||
<Style TargetType="controls:MainWindowBase">
|
||||
<Setter Property="Foreground" Value="{DynamicResource WindowTextForeground}" />
|
||||
</Style>
|
||||
</controls:MainWindowBase.Style>
|
||||
<Grid x:Name="windowFrameContainer" Background="{DynamicResource MainWindowBackground}">
|
||||
@@ -68,6 +66,9 @@
|
||||
GlassVisibility="{Binding ContextObject.TitlebarBlurVisibility, ElementName=mainWindow, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||
NoiseVisibility="{Binding ContextObject.TitlebarBlurVisibility, ElementName=mainWindow, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||
<DockPanel>
|
||||
<DockPanel.Effect>
|
||||
<DropShadowEffect ShadowDepth="0" BlurRadius="2" Opacity="0.7" Color="#B2FFFFFF" />
|
||||
</DockPanel.Effect>
|
||||
<Button DockPanel.Dock="Right" x:Name="buttonCloseWindow"
|
||||
Style="{StaticResource CaptionCloseButtonStyle}" Content="" />
|
||||
<Button DockPanel.Dock="Right" x:Name="buttonWindowStatus"
|
||||
|
@@ -373,6 +373,10 @@ namespace QuickLook
|
||||
|
||||
void AddToInlines(string str, string replaceWith)
|
||||
{
|
||||
// limit str length
|
||||
if (replaceWith.Length > 16)
|
||||
replaceWith = replaceWith.Substring(0, 14) + "…" + replaceWith.Substring(replaceWith.Length - 2);
|
||||
|
||||
str = TranslationHelper.GetString(str);
|
||||
var elements = str.Split(new[] {"{0}"}, StringSplitOptions.None).ToList();
|
||||
while (elements.Count < 2)
|
||||
|
Reference in New Issue
Block a user