Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
275a416
Move custom title bar UI from PluginSettingsWindow to new CustomWindo…
DavidGBrett May 31, 2026
59ceab6
Move title bar logic from PluginSettingsWindow to CustomWindowTitleBar
DavidGBrett May 31, 2026
d23be52
Make click events handleable in CustomWindowTitleBar
DavidGBrett May 31, 2026
019d694
Make changes to LastNonMinimizedWindowState public and listenable in …
DavidGBrett May 31, 2026
82f8355
Make SettingWindow use CustomWindowTitleBar instead of duplicating it…
DavidGBrett May 31, 2026
540a523
Removed visibility dependency properties from CustomWindowTitleBar
DavidGBrett May 31, 2026
4053a4e
Allow hiding of buttons in CustomWindowTitleBar
DavidGBrett May 31, 2026
8bdf0d7
Make title of CustomWindowTitleBar settable while leaving window titl…
DavidGBrett Jun 1, 2026
89f3693
Allow hiding of the title text in CustomWindowTitleBar
DavidGBrett Jun 1, 2026
bba16a6
Allow hiding of the icon in CustomWindowTitleBar
DavidGBrett Jun 1, 2026
3075ad4
Make SelectBrowserWindow use CustomWindowTitleBar instead of duplicat…
DavidGBrett May 31, 2026
724acd1
Make SelectFileManagerWindow use CustomWindowTitleBar instead of dupl…
DavidGBrett May 31, 2026
72c3265
Make ReleaseNotesWindow use CustomWindowTitleBar instead of duplicati…
DavidGBrett May 31, 2026
89803fa
Make WelcomeWindow use CustomWindowTitleBar instead of duplicating it…
DavidGBrett May 31, 2026
1219141
Simplify layout in ReleaseNotesWindow
DavidGBrett Jun 1, 2026
2567aac
Make ReportWindow use CustomWindowTitleBar instead of duplicating its…
DavidGBrett Jun 1, 2026
e7a22c1
Make MessageBoxEx use CustomWindowTitleBar instead of duplicating its…
DavidGBrett Jun 1, 2026
5a85353
Use collapse instead of hidden when hiding buttons in CustomWindowTit…
DavidGBrett Jun 1, 2026
5477c4f
Make ProgressBoxEx use CustomWindowTitleBar instead of duplicating it…
DavidGBrett Jun 1, 2026
aab925f
Convert IconSource on CustomWindowTitleBar to an ImageSource and use …
DavidGBrett Jun 1, 2026
ed98842
Remove unnecessary specification of titlebar IconSource from report w…
DavidGBrett Jun 2, 2026
9836429
Make PluginUpdateWindow use CustomWindowTitleBar instead of duplicati…
DavidGBrett Jun 1, 2026
c51601c
Make CustomShortcutSetting use CustomWindowTitleBar instead of duplic…
DavidGBrett Jun 1, 2026
700b153
Make CustomQueryHotkeySetting use CustomWindowTitleBar instead of dup…
DavidGBrett Jun 1, 2026
5b1746d
Make ActionKeywords use CustomWindowTitleBar instead of duplicating i…
DavidGBrett Jun 1, 2026
dac13c2
Add comments & docstrings to CustomWindowTitleBar
DavidGBrett Jun 2, 2026
7aa6250
Make MinimizeButton in CustomWindowTitleBar use StaticResource for it…
DavidGBrett Jun 2, 2026
908fcac
Extract repeated path styling in CustomWindowTitleBar to new TitleBar…
DavidGBrett Jun 2, 2026
c890fc2
Add automation names to the buttons in CustomWindowTitleBar for acces…
DavidGBrett Jun 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 10 additions & 22 deletions Flow.Launcher/ActionKeywords.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
x:Class="Flow.Launcher.ActionKeywords"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Flow.Launcher.Resources.Controls"
Title="{DynamicResource actionKeywordsTitle}"
Width="450"
Background="{DynamicResource PopuBGColor}"
Expand Down Expand Up @@ -29,29 +30,16 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>

<Button
<controls:CustomWindowTitleBar
Grid.Row="0"
Grid.Column="1"
HorizontalAlignment="Right"
Click="BtnCancel_OnClick"
Style="{StaticResource TitleBarCloseButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18,11 27,20 M 18,20 27,11"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
Grid.Column="0"
Grid.ColumnSpan="2"
ShowIcon="False"
ShowTitle="False"
ShowMinimizeButton="False"
ShowMaximizeRestoreButton="False"
ShowCloseButton="True"
CloseButtonClick="BtnCancel_OnClick" />

<TextBlock
Grid.Row="1"
Expand Down
1 change: 1 addition & 0 deletions Flow.Launcher/ActionKeywords.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ private void ActionKeyword_OnLoaded(object sender, RoutedEventArgs e)

private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
{
e.Handled = true;
Close();
}

Expand Down
37 changes: 8 additions & 29 deletions Flow.Launcher/CustomQueryHotkeySetting.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
x:Class="Flow.Launcher.CustomQueryHotkeySetting"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
Title="{DynamicResource customeQueryHotkeyTitle}"
Expand Down Expand Up @@ -29,35 +30,13 @@
<RowDefinition Height="80" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button
Grid.Column="1"
Click="BtnCancel_OnClick"
Style="{StaticResource TitleBarCloseButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18,11 27,20 M 18,20 27,11"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
</Grid>
</StackPanel>
<controls:CustomWindowTitleBar
ShowIcon="False"
ShowTitle="False"
ShowMinimizeButton="False"
ShowMaximizeRestoreButton="False"
ShowCloseButton="True"
CloseButtonClick="BtnCancel_OnClick" />
<StackPanel Margin="26 0 26 0">
<TextBlock
Margin="0 0 0 12"
Expand Down
1 change: 1 addition & 0 deletions Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public CustomQueryHotkeySetting(CustomPluginHotkey hotkey)

private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
{
e.Handled = true;
DialogResult = false;
Close();
}
Expand Down
39 changes: 10 additions & 29 deletions Flow.Launcher/CustomShortcutSetting.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
x:Class="Flow.Launcher.CustomShortcutSetting"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
Title="{DynamicResource customeQueryShortcutTitle}"
Width="530"
Expand All @@ -27,35 +28,15 @@
<RowDefinition Height="80" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button
Grid.Column="1"
Click="BtnCancel_OnClick"
Style="{StaticResource TitleBarCloseButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18,11 27,20 M 18,20 27,11"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
</Grid>
</StackPanel>

<controls:CustomWindowTitleBar
ShowIcon="False"
ShowTitle="False"
ShowMinimizeButton="False"
ShowMaximizeRestoreButton="False"
ShowCloseButton="True"
CloseButtonClick="BtnCancel_OnClick" />

<StackPanel Margin="26 0 26 0">
<StackPanel Grid.Row="0" Margin="0 0 0 12">
<TextBlock
Expand Down
1 change: 1 addition & 0 deletions Flow.Launcher/CustomShortcutSetting.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public CustomShortcutSetting(string key, string value, SettingsPaneHotkeyViewMod

private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
{
e.Handled = true;
DialogResult = false;
Close();
}
Expand Down
42 changes: 11 additions & 31 deletions Flow.Launcher/MessageBoxEx.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
x:Class="Flow.Launcher.MessageBoxEx"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down Expand Up @@ -30,37 +31,16 @@
<RowDefinition />
<RowDefinition MinHeight="68" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button
Grid.Column="1"
Click="Button_Cancel"
Style="{StaticResource TitleBarCloseButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18,11 27,20 M 18,20 27,11"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
</Grid>
</StackPanel>
</StackPanel>

<controls:CustomWindowTitleBar
Grid.Row="0"
ShowIcon="False"
ShowTitle="False"
ShowMinimizeButton="False"
ShowMaximizeRestoreButton="False"
ShowCloseButton="True"
CloseButtonClick="Button_Cancel" />

<Grid Grid.Row="1" Margin="30 0 30 24">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand Down
2 changes: 2 additions & 0 deletions Flow.Launcher/MessageBoxEx.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ private void Button_Click(object sender, RoutedEventArgs e)

private void Button_Cancel(object sender, RoutedEventArgs e)
{
e.Handled = true;

if (_button == MessageBoxButton.YesNo)
// Follow System.Windows.MessageBox behavior
return;
Expand Down
122 changes: 3 additions & 119 deletions Flow.Launcher/PluginSettingsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
x:Class="Flow.Launcher.PluginSettingsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
Width="800"
Height="Auto"
MinWidth="600"
MinHeight="300"
Loaded="OnLoaded"
ResizeMode="CanResize"
SnapsToDevicePixels="True"
StateChanged="Window_StateChanged"
Activated="Window_Activated"
UseLayoutRounding="True"
WindowStartupLocation="CenterScreen">
<WindowChrome.WindowChrome>
Expand Down Expand Up @@ -50,131 +48,17 @@

<Border Style="{StaticResource WindowMainPanelStyle}">
<Grid Background="{DynamicResource Color01B}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="32" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>

<Image
<controls:CustomWindowTitleBar
Grid.Row="0"
Grid.Column="0"
Width="16"
Height="16"
Margin="10 4 4 4"
RenderOptions.BitmapScalingMode="HighQuality"
Source="/Images/app.png" />
<TextBlock
Grid.Row="0"
Grid.Column="1"
Margin="4 0 0 0"
VerticalAlignment="Center"
FontSize="12"
Foreground="{DynamicResource Color05B}"
Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=Title}" />

<Button
Grid.Row="0"
Grid.Column="2"
Click="OnMinimizeButtonClick"
RenderOptions.EdgeMode="Aliased"
Style="{DynamicResource TitleBarButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18,15 H 28"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
<Button
Name="MaximizeButton"
Grid.Row="0"
Grid.Column="3"
Click="OnMaximizeRestoreButtonClick"
Style="{StaticResource TitleBarButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18.5,10.5 H 27.5 V 19.5 H 18.5 Z"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
<Button
Name="RestoreButton"
Grid.Row="0"
Grid.Column="3"
Click="OnMaximizeRestoreButtonClick"
Style="{StaticResource TitleBarButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18.5,12.5 H 25.5 V 19.5 H 18.5 Z M 20.5,12.5 V 10.5 H 27.5 V 17.5 H 25.5"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
<Button
Grid.Row="0"
Grid.Column="4"
Click="OnCloseButtonClick"
Style="{StaticResource TitleBarCloseButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18,11 27,20 M 18,20 27,11"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
IconSource="/Images/app.png" />
Comment thread
coderabbitai[bot] marked this conversation as resolved.

<ScrollViewer
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="5"
FontSize="14"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto">
Expand Down
Loading
Loading