mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-09 09:31:15 +10:00
Add maximaze button (#4841)
* Add maximize button logic and update assets * Add maximize button with theming * delelte logo * Center and restyle the window control buttons * Fix window state test setup --------- Co-authored-by: aran628 <aran2014+@gmail.com> Co-authored-by: Chris Titus <contact@christitus.com>
This commit is contained in:
co-authored by
aran628
Chris Titus
parent
822003d87f
commit
13a18eeeb2
+59
-21
@@ -955,7 +955,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Navigation Buttons Panel -->
|
||||
<StackPanel Name="NavDockPanel" Orientation="Horizontal" Grid.Column="0" Margin="5,5,10,5">
|
||||
<StackPanel Name="NavDockPanel" Orientation="Horizontal" Grid.Column="0" VerticalAlignment="Center" Margin="5,5,10,5">
|
||||
<StackPanel Name="NavLogoPanel" Orientation="Horizontal" HorizontalAlignment="Left" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Margin="10,0,20,0">
|
||||
</StackPanel>
|
||||
<ToggleButton Margin="0,0,5,0" Height="{DynamicResource TabButtonHeight}" Width="{DynamicResource TabButtonWidth}"
|
||||
@@ -1037,7 +1037,7 @@
|
||||
</Button>
|
||||
|
||||
<!-- Buttons Container -->
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="5,5,5,5">
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="5,5,5,5">
|
||||
<Button Name="ThemeButton"
|
||||
Style="{StaticResource HoverButtonStyle}"
|
||||
BorderBrush="Transparent"
|
||||
@@ -1045,7 +1045,7 @@
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
FontSize="{DynamicResource SettingsIconFontSize}"
|
||||
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Margin="0,0,2,0"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
Content="N/A"
|
||||
@@ -1083,7 +1083,7 @@
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
FontSize="{DynamicResource SettingsIconFontSize}"
|
||||
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Margin="0,0,2,0"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
Content=""
|
||||
@@ -1151,7 +1151,7 @@
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
FontSize="{DynamicResource SettingsIconFontSize}"
|
||||
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Margin="0,0,2,0"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
Content=""/>
|
||||
@@ -1180,24 +1180,62 @@
|
||||
</Popup>
|
||||
|
||||
<Button
|
||||
Content="−" BorderThickness="0"
|
||||
BorderBrush="Transparent"
|
||||
Background="{DynamicResource MainBackgroundColor}"
|
||||
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
Margin="0,0,0,0"
|
||||
FontFamily="{DynamicResource FontFamily}"
|
||||
Foreground="{DynamicResource MainForegroundColor}" FontSize="{DynamicResource CloseIconFontSize}" Name="WPFMinimizeButton" />
|
||||
Content=""
|
||||
Style="{StaticResource HoverButtonStyle}"
|
||||
BorderThickness="0"
|
||||
BorderBrush="Transparent"
|
||||
Background="{DynamicResource MainBackgroundColor}"
|
||||
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Margin="0"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
FontSize="{DynamicResource CloseIconFontSize}"
|
||||
ToolTip="Minimize"
|
||||
AutomationProperties.Name="Minimize"
|
||||
Name="WPFMinimizeButton" />
|
||||
<Button
|
||||
BorderThickness="0"
|
||||
BorderBrush="Transparent"
|
||||
Background="{DynamicResource MainBackgroundColor}"
|
||||
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Margin="0,0,0,0"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
FontSize="{DynamicResource CloseIconFontSize}"
|
||||
Name="WPFMaximizeButton">
|
||||
<Button.Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource HoverButtonStyle}">
|
||||
<Setter Property="Content" Value=""/>
|
||||
<Setter Property="ToolTip" Value="Maximize"/>
|
||||
<Setter Property="AutomationProperties.Name" Value="Maximize"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding WindowState, RelativeSource={RelativeSource AncestorType={x:Type Window}}}" Value="Maximized">
|
||||
<Setter Property="Content" Value=""/>
|
||||
<Setter Property="ToolTip" Value="Restore"/>
|
||||
<Setter Property="AutomationProperties.Name" Value="Restore"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
Content="×" BorderThickness="0"
|
||||
BorderBrush="Transparent"
|
||||
Background="{DynamicResource MainBackgroundColor}"
|
||||
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
Margin="0,0,0,0"
|
||||
FontFamily="{DynamicResource FontFamily}"
|
||||
Foreground="{DynamicResource MainForegroundColor}" FontSize="{DynamicResource CloseIconFontSize}" Name="WPFCloseButton" />
|
||||
Content=""
|
||||
Style="{StaticResource HoverButtonStyle}"
|
||||
BorderThickness="0"
|
||||
BorderBrush="Transparent"
|
||||
Background="{DynamicResource MainBackgroundColor}"
|
||||
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Margin="0"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
FontSize="{DynamicResource CloseIconFontSize}"
|
||||
ToolTip="Close"
|
||||
AutomationProperties.Name="Close"
|
||||
Name="WPFCloseButton" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user