Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a140b11
- Split Style Code to SettingWindowStyle
onesounds Apr 27, 2024
b4570e9
- Add Pages
onesounds Apr 27, 2024
6a2f23c
- Add Color Icons in Menu
onesounds Apr 27, 2024
c9fc494
- Adjust Style
onesounds Apr 28, 2024
dd87333
Merge Dev
onesounds Apr 28, 2024
1915c49
Adjust FontSize
onesounds Apr 28, 2024
dc26792
- Change the SettingBoxes to Card Control in General
onesounds Apr 28, 2024
7e4a37c
Fix General
onesounds Apr 29, 2024
a084af6
Rename navigation views in settings, change the way they're navigated to
Yusyuriv Apr 29, 2024
2285040
"General" pane in settings fully functional except for auto-updater a…
Yusyuriv Apr 29, 2024
3c54114
Fully functional General pane in the settings window
Yusyuriv Apr 29, 2024
6bbfb15
Use `Card` control in About pane of settings window, fix links in thi…
Yusyuriv Apr 29, 2024
7fa479f
SettingsPaneGeneralViewModel extends BaseModel
Yusyuriv Apr 29, 2024
ca6dee5
Remove Translator property from SettingsPaneGeneralViewModel
Yusyuriv Apr 29, 2024
21fb4c6
Restore functionality in About pane of the settings window
Yusyuriv Apr 29, 2024
1dccf34
Fix ToggleSwitch Aliginment in Hotkey/Proxy
onesounds Apr 29, 2024
ae95e07
Fix Apperance Menu Label
onesounds Apr 29, 2024
61c1410
Adjust Pane and Page Colors
onesounds Apr 29, 2024
08687d6
Implement CardGroup control
Yusyuriv Apr 30, 2024
fb6b1bb
Fix CardGroup overwriting DataContext of its children
Yusyuriv May 1, 2024
aaef48c
Replace Card.GroupPosition with CardGroup.Position attached property
Yusyuriv May 2, 2024
336e972
Fully functional Hotkey pane in the settings window
Yusyuriv May 2, 2024
90125c7
Remove debug TextBlock in SettingsPaneHotkey.xaml
Yusyuriv May 3, 2024
0cb9ec9
Adjust Align Toggle Switches in Appearance
onesounds May 3, 2024
77a0e60
Fully functional Hotkey pane in the settings window
Yusyuriv May 4, 2024
a751baa
Merge branch 'refs/heads/dev' into fork/040427SplitSettingWindow
Yusyuriv May 4, 2024
996ccf7
Add Ctrl+R static hotkey to Hotkey pane in settings
Yusyuriv May 4, 2024
3bcb5da
Implement plugin store settings pane
Yusyuriv May 15, 2024
ec6df39
Disable back button in NavigationView in settings
Yusyuriv May 15, 2024
74825fc
SettingWindow small cleanup
Yusyuriv May 15, 2024
f7b2d9d
Implement settings proxy pane
Yusyuriv May 15, 2024
5c05b69
Implement theme settings pane
Yusyuriv May 15, 2024
f55a139
Rename variables in Settings window
Yusyuriv May 15, 2024
e462457
Explicitly specify rows and columns in SettingWindow.xaml
Yusyuriv May 15, 2024
97b6e1f
Re-add opening themes folder in theme settings pane
Yusyuriv May 15, 2024
4be6188
Add CollapsedWhen and VisibleWhen markup extensions
Yusyuriv May 16, 2024
1ea00de
Add Hyperlink component
Yusyuriv May 16, 2024
1c1979e
Cleanup SettingsPaneTheme, use custom components in it
Yusyuriv May 16, 2024
5fb4ba2
Restore proxy pane font size
Yusyuriv May 16, 2024
48a0484
Cleanup SettingsPaneAbout
Yusyuriv May 16, 2024
02b3462
Cleanup SettingsPaneGeneral
Yusyuriv May 16, 2024
8ca4e3a
Cleanup SettingsPaneHotkey
Yusyuriv May 16, 2024
f6eaf5a
Cleanup SettingsPanePlugins
Yusyuriv May 16, 2024
a0f4386
Cleanup SettingsPanePluginStore and SettingsPaneProxy
Yusyuriv May 16, 2024
9142193
Re-add updating color scheme right after it changed
Yusyuriv May 16, 2024
88e7000
Cleanup CollapsedWhenExtension and its converter
Yusyuriv May 17, 2024
61d3758
Remove CollapsedWhen/VisibleWhen extension constructors with two argu…
Yusyuriv May 17, 2024
ac3c053
Remove SettingsWindowViewModel mentions from CustomShortcutSetting.xa…
Yusyuriv May 18, 2024
baeb01f
Also remove the SettingWindowViewModel constructor argument from Sett…
Yusyuriv May 18, 2024
c350c5d
The rest of the settings window cleanup
Yusyuriv May 20, 2024
2202fce
Merge dev into fork/040427SplitSettingWindow with merge conflicts res…
Yusyuriv May 22, 2024
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
1 change: 1 addition & 0 deletions Flow.Launcher/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
</ui:ThemeResources>
<ui:XamlControlsResources />
<ResourceDictionary Source="pack://application:,,,/Resources/CustomControlTemplate.xaml" />
<ResourceDictionary Source="pack://application:,,,/Resources/SettingWindowStyle.xaml" />
<ResourceDictionary Source="pack://application:,,,/Themes/Win11System.xaml" />
<ResourceDictionary Source="pack://application:,,,/Languages/en.xaml" />
</ResourceDictionary.MergedDictionaries>
Expand Down
8 changes: 2 additions & 6 deletions Flow.Launcher/CustomShortcutSetting.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ namespace Flow.Launcher
{
public partial class CustomShortcutSetting : Window
{
private SettingWindowViewModel viewModel;
public string Key { get; set; } = String.Empty;
public string Value { get; set; } = String.Empty;
private string originalKey { get; init; } = null;
Expand All @@ -17,13 +16,11 @@ public partial class CustomShortcutSetting : Window

public CustomShortcutSetting(SettingWindowViewModel vm)
{
viewModel = vm;
InitializeComponent();
}

public CustomShortcutSetting(string key, string value, SettingWindowViewModel vm)
public CustomShortcutSetting(string key, string value)
{
viewModel = vm;
Key = key;
Value = value;
originalKey = key;
Expand All @@ -46,8 +43,7 @@ private void BtnAdd_OnClick(object sender, RoutedEventArgs e)
return;
}
// Check if key is modified or adding a new one
if (((update && originalKey != Key) || !update)
&& viewModel.ShortcutExists(Key))
if ((update && originalKey != Key) || !update)
{
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("duplicateShortcut"));
return;
Expand Down
Binary file added Flow.Launcher/Images/info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Flow.Launcher/Images/keyboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Flow.Launcher/Images/plugins.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Flow.Launcher/Images/proxy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Flow.Launcher/Images/store.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Flow.Launcher/Images/theme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions Flow.Launcher/Resources/Controls/Card.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="MinHeight" Value="68" />
<Setter Property="Padding" Value="0,15,0,15" />
<Setter Property="Margin" Value="0,4,0,0" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Style.Triggers>
Expand All @@ -36,6 +37,27 @@
<Setter Property="Padding" Value="38,0,26,0" />
<Setter Property="Background" Value="Transparent" />
</DataTrigger>

<DataTrigger Binding="{Binding (local:CardGroup.Position), RelativeSource={RelativeSource AncestorType=local:Card}}" Value="First">
<Setter Property="Margin" Value="0" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
</DataTrigger>

<DataTrigger Binding="{Binding (local:CardGroup.Position), RelativeSource={RelativeSource AncestorType=local:Card}}" Value="Middle">
<Setter Property="Margin" Value="0" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0 1 0 0" />
</DataTrigger>

<DataTrigger Binding="{Binding (local:CardGroup.Position), RelativeSource={RelativeSource AncestorType=local:Card}}" Value="Last">
<Setter Property="Margin" Value="0" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0 1 0 0" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
Expand Down
1 change: 1 addition & 0 deletions Flow.Launcher/Resources/Controls/Card.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public Card()
{
InitializeComponent();
}

public string Title
{
get { return (string)GetValue(TitleProperty); }
Expand Down
32 changes: 32 additions & 0 deletions Flow.Launcher/Resources/Controls/CardGroup.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<UserControl x:Class="Flow.Launcher.Resources.Controls.CardGroup"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance cc:CardGroup}"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.Resources>
<Style TargetType="cc:Card" x:Key="FirstStyle">
<Setter Property="cc:CardGroup.Position" Value="First" />
</Style>
<Style TargetType="cc:Card" x:Key="MiddleStyle">
<Setter Property="cc:CardGroup.Position" Value="Middle" />
</Style>
<Style TargetType="cc:Card" x:Key="LastStyle">
<Setter Property="cc:CardGroup.Position" Value="Last" />
</Style>

<cc:CardGroupCardStyleSelector
x:Key="CardStyleSelector"
FirstStyle="{StaticResource FirstStyle}"
MiddleStyle="{StaticResource MiddleStyle}"
LastStyle="{StaticResource LastStyle}" />
</UserControl.Resources>
<Border Background="{DynamicResource Color00B}" BorderBrush="{DynamicResource Color03B}" BorderThickness="1"
CornerRadius="5">
<ItemsControl ItemsSource="{Binding Content, RelativeSource={RelativeSource AncestorType=cc:CardGroup}}"
ItemContainerStyleSelector="{StaticResource CardStyleSelector}" />
</Border>
</UserControl>
47 changes: 47 additions & 0 deletions Flow.Launcher/Resources/Controls/CardGroup.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
using System;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;

namespace Flow.Launcher.Resources.Controls;

public partial class CardGroup : UserControl
{
public enum CardGroupPosition
{
NotInGroup,
First,
Middle,
Last
}

public new ObservableCollection<Card> Content
{
get { return (ObservableCollection<Card>)GetValue(ContentProperty); }
set { SetValue(ContentProperty, value); }
}

public static new readonly DependencyProperty ContentProperty =
DependencyProperty.Register(nameof(Content), typeof(ObservableCollection<Card>), typeof(CardGroup));

public static readonly DependencyProperty PositionProperty = DependencyProperty.RegisterAttached(
"Position", typeof(CardGroupPosition), typeof(CardGroup),
new FrameworkPropertyMetadata(CardGroupPosition.NotInGroup, FrameworkPropertyMetadataOptions.AffectsRender)
);

public static void SetPosition(UIElement element, CardGroupPosition value)
{
element.SetValue(PositionProperty, value);
}

public static CardGroupPosition GetPosition(UIElement element)
{
return (CardGroupPosition)element.GetValue(PositionProperty);
}

public CardGroup()
{
InitializeComponent();
Content = new ObservableCollection<Card>();
}
}
21 changes: 21 additions & 0 deletions Flow.Launcher/Resources/Controls/CardGroupCardStyleSelector.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System.Windows;
using System.Windows.Controls;

namespace Flow.Launcher.Resources.Controls;

public class CardGroupCardStyleSelector : StyleSelector
{
public Style FirstStyle { get; set; }
public Style MiddleStyle { get; set; }
public Style LastStyle { get; set; }

public override Style SelectStyle(object item, DependencyObject container)
{
var itemsControl = ItemsControl.ItemsControlFromItemContainer(container);
var index = itemsControl.ItemContainerGenerator.IndexFromContainer(container);

if (index == 0) return FirstStyle;
if (index == itemsControl.Items.Count - 1) return LastStyle;
return MiddleStyle;
}
}
14 changes: 14 additions & 0 deletions Flow.Launcher/Resources/Controls/HyperLink.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<UserControl x:Class="Flow.Launcher.Resources.Controls.HyperLink"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<TextBlock>
<Hyperlink NavigateUri="{Binding Uri, RelativeSource={RelativeSource AncestorType=UserControl}}"
RequestNavigate="Hyperlink_OnRequestNavigate">
<Run Text="{Binding Text, RelativeSource={RelativeSource AncestorType=UserControl}}" />
</Hyperlink>
</TextBlock>
</UserControl>
39 changes: 39 additions & 0 deletions Flow.Launcher/Resources/Controls/HyperLink.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;

namespace Flow.Launcher.Resources.Controls;

public partial class HyperLink : UserControl
{
public static readonly DependencyProperty UriProperty = DependencyProperty.Register(
nameof(Uri), typeof(string), typeof(HyperLink), new PropertyMetadata(default(string))
);

public string Uri
{
get => (string)GetValue(UriProperty);
set => SetValue(UriProperty, value);
}

public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
nameof(Text), typeof(string), typeof(HyperLink), new PropertyMetadata(default(string))
);

public string Text
{
get => (string)GetValue(TextProperty);
set => SetValue(TextProperty, value);
}

public HyperLink()
{
InitializeComponent();
}

private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
{
App.API.OpenUrl(e.Uri);
e.Handled = true;
}
}
Loading