mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add Checkboxes and Adjust layout
This commit is contained in:
parent
792b383505
commit
768c44567a
4 changed files with 55 additions and 33 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 16
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 16.0.29806.167
|
VisualStudioVersion = 17.3.32901.215
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Test", "Flow.Launcher.Test\Flow.Launcher.Test.csproj", "{FF742965-9A80-41A5-B042-D6C7D3A21708}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Test", "Flow.Launcher.Test\Flow.Launcher.Test.csproj", "{FF742965-9A80-41A5-B042-D6C7D3A21708}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
|
@ -80,7 +80,6 @@ Global
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
{FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x64.Build.0 = Debug|Any CPU
|
{FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x86.ActiveCfg = Debug|Any CPU
|
{FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,5 @@
|
||||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory">Data Directory Path</system:String>
|
<system:String x:Key="flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory">Data Directory Path</system:String>
|
||||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_addBrowserBookmark">Add</system:String>
|
<system:String x:Key="flowlauncher_plugin_browserbookmark_addBrowserBookmark">Add</system:String>
|
||||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_removeBrowserBookmark">Delete</system:String>
|
<system:String x:Key="flowlauncher_plugin_browserbookmark_removeBrowserBookmark">Delete</system:String>
|
||||||
|
<system:String x:Key="flowlauncher_plugin_browserbookmark_others">Others</system:String>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|
@ -8,40 +8,51 @@
|
||||||
d:DesignWidth="500"
|
d:DesignWidth="500"
|
||||||
DataContext="{Binding RelativeSource={RelativeSource Self}}"
|
DataContext="{Binding RelativeSource={RelativeSource Self}}"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Grid Margin="10">
|
<Grid Margin="60,0,10,0">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="auto" />
|
<RowDefinition Height="auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Margin="0,0,0,0" Orientation="Vertical">
|
<StackPanel Margin="0,10,0,10" Orientation="Vertical">
|
||||||
<TextBlock Margin="10" Text="{DynamicResource flowlauncher_plugin_browserbookmark_loadBrowserFrom}" />
|
<StackPanel Orientation="Horizontal">
|
||||||
<ListView
|
<TextBlock Margin="10" Text="{DynamicResource flowlauncher_plugin_browserbookmark_loadBrowserFrom}" />
|
||||||
Name="CustomBrowsers"
|
<CheckBox Margin="0,0,15,0" Content="Chrome" />
|
||||||
Height="auto"
|
<CheckBox Margin="0,0,15,0" Content="Edge" />
|
||||||
Margin="10"
|
<CheckBox Margin="0,0,15,0" Content="Firefox" />
|
||||||
BorderBrush="DarkGray"
|
|
||||||
BorderThickness="1"
|
|
||||||
ItemsSource="{Binding Settings.CustomChromiumBrowsers}"
|
|
||||||
MouseDoubleClick="MouseDoubleClickOnSelectedCustomBrowser"
|
|
||||||
SelectedItem="{Binding SelectedCustomBrowser}"
|
|
||||||
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
|
|
||||||
<ListView.View>
|
|
||||||
<GridView>
|
|
||||||
<GridViewColumn DisplayMemberBinding="{Binding Name, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserName}" />
|
|
||||||
<GridViewColumn DisplayMemberBinding="{Binding DataDirectoryPath, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory}" />
|
|
||||||
</GridView>
|
|
||||||
</ListView.View>
|
|
||||||
</ListView>
|
|
||||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
|
||||||
<Button
|
<Button
|
||||||
MinWidth="120"
|
Margin="0,0,15,0"
|
||||||
|
Click="Others_Click"
|
||||||
|
Content="{DynamicResource flowlauncher_plugin_browserbookmark_others}" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Name="CustomBrowsersList" Visibility="Collapsed">
|
||||||
|
<ListView
|
||||||
|
Name="CustomBrowsers"
|
||||||
|
Height="auto"
|
||||||
Margin="10"
|
Margin="10"
|
||||||
Click="NewCustomBrowser"
|
BorderBrush="DarkGray"
|
||||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_addBrowserBookmark}" />
|
BorderThickness="1"
|
||||||
<Button
|
ItemsSource="{Binding Settings.CustomChromiumBrowsers}"
|
||||||
MinWidth="120"
|
MouseDoubleClick="MouseDoubleClickOnSelectedCustomBrowser"
|
||||||
Margin="10"
|
SelectedItem="{Binding SelectedCustomBrowser}"
|
||||||
Click="DeleteCustomBrowser"
|
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
|
||||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_removeBrowserBookmark}" />
|
<ListView.View>
|
||||||
|
<GridView>
|
||||||
|
<GridViewColumn DisplayMemberBinding="{Binding Name, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserName}" />
|
||||||
|
<GridViewColumn DisplayMemberBinding="{Binding DataDirectoryPath, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory}" />
|
||||||
|
</GridView>
|
||||||
|
</ListView.View>
|
||||||
|
</ListView>
|
||||||
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
|
<Button
|
||||||
|
MinWidth="130"
|
||||||
|
Margin="10"
|
||||||
|
Click="NewCustomBrowser"
|
||||||
|
Content="{DynamicResource flowlauncher_plugin_browserbookmark_addBrowserBookmark}" />
|
||||||
|
<Button
|
||||||
|
MinWidth="120"
|
||||||
|
Margin="10"
|
||||||
|
Click="DeleteCustomBrowser"
|
||||||
|
Content="{DynamicResource flowlauncher_plugin_browserbookmark_removeBrowserBookmark}" />
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using Flow.Launcher.Plugin.BrowserBookmark.Models;
|
using Flow.Launcher.Plugin.BrowserBookmark.Models;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace Flow.Launcher.Plugin.BrowserBookmark.Views
|
namespace Flow.Launcher.Plugin.BrowserBookmark.Views
|
||||||
{
|
{
|
||||||
|
|
@ -59,5 +60,15 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Views
|
||||||
var window = new CustomBrowserSettingWindow(SelectedCustomBrowser);
|
var window = new CustomBrowserSettingWindow(SelectedCustomBrowser);
|
||||||
window.ShowDialog();
|
window.ShowDialog();
|
||||||
}
|
}
|
||||||
|
private void Others_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (CustomBrowsersList.Visibility == Visibility.Collapsed)
|
||||||
|
{
|
||||||
|
CustomBrowsersList.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CustomBrowsersList.Visibility = Visibility.Collapsed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue