mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-22 17:54:50 +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)
|
private void AutoHideViedoControlContainer(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (ShowVideo)
|
if (!ShowVideo)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (videoControlContainer.IsMouseOver)
|
if (videoControlContainer.IsMouseOver)
|
||||||
|
@@ -105,7 +105,7 @@ namespace QuickLook.Helpers
|
|||||||
{
|
{
|
||||||
var mmi = (MinMaxInfo) Marshal.PtrToStructure(lParam, typeof(MinMaxInfo));
|
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 currentScreen = Screen.FromHandle(hwnd);
|
||||||
var workArea = currentScreen.WorkingArea;
|
var workArea = currentScreen.WorkingArea;
|
||||||
var monitorArea = currentScreen.Bounds;
|
var monitorArea = currentScreen.Bounds;
|
||||||
|
@@ -27,16 +27,14 @@
|
|||||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</controls:MainWindowBase.Resources>
|
</controls:MainWindowBase.Resources>
|
||||||
<controls:MainWindowBase.Style>
|
<WindowChrome.WindowChrome>
|
||||||
<Style TargetType="controls:MainWindowBase">
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource WindowTextForeground}" />
|
|
||||||
<Setter Property="WindowChrome.WindowChrome">
|
|
||||||
<Setter.Value>
|
|
||||||
<WindowChrome CaptionHeight="0" CornerRadius="0" GlassFrameThickness="0,0,0,1"
|
<WindowChrome CaptionHeight="0" CornerRadius="0" GlassFrameThickness="0,0,0,1"
|
||||||
ResizeBorderThickness="{Binding ContextObject.CanResize, Converter={StaticResource BooleanToResizeBorderThicknessConverter}, ElementName=mainWindow}"
|
ResizeBorderThickness="{Binding ContextObject.CanResize, Converter={StaticResource BooleanToResizeBorderThicknessConverter}, ElementName=mainWindow}"
|
||||||
UseAeroCaptionButtons="False" />
|
UseAeroCaptionButtons="False" />
|
||||||
</Setter.Value>
|
</WindowChrome.WindowChrome>
|
||||||
</Setter>
|
<controls:MainWindowBase.Style>
|
||||||
|
<Style TargetType="controls:MainWindowBase">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource WindowTextForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</controls:MainWindowBase.Style>
|
</controls:MainWindowBase.Style>
|
||||||
<Grid x:Name="windowFrameContainer" Background="{DynamicResource MainWindowBackground}">
|
<Grid x:Name="windowFrameContainer" Background="{DynamicResource MainWindowBackground}">
|
||||||
@@ -68,6 +66,9 @@
|
|||||||
GlassVisibility="{Binding ContextObject.TitlebarBlurVisibility, ElementName=mainWindow, Converter={StaticResource BooleanToVisibilityConverter}}"
|
GlassVisibility="{Binding ContextObject.TitlebarBlurVisibility, ElementName=mainWindow, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
NoiseVisibility="{Binding ContextObject.TitlebarBlurVisibility, ElementName=mainWindow, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
NoiseVisibility="{Binding ContextObject.TitlebarBlurVisibility, ElementName=mainWindow, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
|
<DockPanel.Effect>
|
||||||
|
<DropShadowEffect ShadowDepth="0" BlurRadius="2" Opacity="0.7" Color="#B2FFFFFF" />
|
||||||
|
</DockPanel.Effect>
|
||||||
<Button DockPanel.Dock="Right" x:Name="buttonCloseWindow"
|
<Button DockPanel.Dock="Right" x:Name="buttonCloseWindow"
|
||||||
Style="{StaticResource CaptionCloseButtonStyle}" Content="" />
|
Style="{StaticResource CaptionCloseButtonStyle}" Content="" />
|
||||||
<Button DockPanel.Dock="Right" x:Name="buttonWindowStatus"
|
<Button DockPanel.Dock="Right" x:Name="buttonWindowStatus"
|
||||||
|
@@ -373,6 +373,10 @@ namespace QuickLook
|
|||||||
|
|
||||||
void AddToInlines(string str, string replaceWith)
|
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);
|
str = TranslationHelper.GetString(str);
|
||||||
var elements = str.Split(new[] {"{0}"}, StringSplitOptions.None).ToList();
|
var elements = str.Split(new[] {"{0}"}, StringSplitOptions.None).ToList();
|
||||||
while (elements.Count < 2)
|
while (elements.Count < 2)
|
||||||
|
Reference in New Issue
Block a user