-
-
Notifications
You must be signed in to change notification settings - Fork 455
Modern Themes #704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modern Themes #704
Changes from 7 commits
3a0594f
0c47557
b07a437
7789c1c
c6f1a00
53c04fd
f07a009
4ced995
f83212a
c227ba3
3bc3563
46917ea
3e25030
91d21a7
505b4cb
8eba28f
f1bfa5c
9d10b7f
bb7b0cd
ecb0cac
6a58576
136f227
c89d277
49f00f5
8e93969
6048de4
6211275
c32ae79
2b7855c
39b53d9
2144577
03d134d
6e047e0
e7b4dd1
df3c5bf
89f4f5d
1621f34
92f0041
c1b0929
832405a
1c96f04
ca179be
ed5bd5b
4e01019
d084793
e201df9
6c43a48
a5534ca
d1e7b4e
1948ec5
88a9767
10accd5
d902a1e
e14bb23
1b1a81d
12f95d1
25b5f30
8aaeb85
66e722b
1149ff5
c74a2db
763cab8
54145d7
5f0df98
04a10ed
4f19355
1d746c2
42dda34
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,12 @@ | ||
| using System; | ||
| using System.Windows;using System; | ||
|
||
| using System.Collections.Generic; | ||
| using System.Globalization; | ||
| using System.Linq; | ||
| using System.Text; | ||
| using System.Threading.Tasks; | ||
| using System.Windows; | ||
| using System.Windows.Data; | ||
| using System.Windows.Media; | ||
| using System.Windows.Documents; | ||
|
|
||
| namespace Flow.Launcher.Converters | ||
|
|
@@ -30,7 +31,10 @@ public object Convert(object[] value, Type targetType, object parameter, Culture | |
| var currentCharacter = text.Substring(i, 1); | ||
| if (this.ShouldHighlight(highlightData, i)) | ||
| { | ||
| textBlock.Inlines.Add(new Bold(new Run(currentCharacter))); | ||
| //textBlock.Inlines.Add(new Bold(new Run(currentCharacter))); | ||
| //textBlock.Inlines.Add(new Run(currentCharacter) { Foreground = Brushes.RoyalBlue }); | ||
|
||
| textBlock.Inlines.Add(new Run(currentCharacter) { Style = (Style)Application.Current.FindResource("HighlightStyle") }); | ||
|
|
||
| } | ||
| else | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,7 +47,11 @@ | |
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <Page Remove="Themes\League.Designer.xaml" /> | ||
| <Page Remove="Themes\League.xaml" /> | ||
onesounds marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <Page Remove="Themes\ThemeBuilder\Template.xaml" /> | ||
| <Page Remove="Themes\Win11Dark.Designer.xaml" /> | ||
| <Page Remove="Themes\Win11Dark.xaml" /> | ||
|
||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,7 @@ | |
| <Window.Resources> | ||
| <converters:QuerySuggestionBoxConverter x:Key="QuerySuggestionBoxConverter"/> | ||
| </Window.Resources> | ||
|
|
||
| <Window.InputBindings> | ||
| <KeyBinding Key="Escape" Command="{Binding EscCommand}"></KeyBinding> | ||
| <KeyBinding Key="F1" Command="{Binding StartHelpCommand}"></KeyBinding> | ||
|
|
@@ -62,13 +63,13 @@ | |
| <KeyBinding Key="D9" Modifiers="{Binding OpenResultCommandModifiers}" Command="{Binding OpenResultCommand}" CommandParameter="8"></KeyBinding> | ||
| </Window.InputBindings> | ||
| <Grid> | ||
| <Border Style="{DynamicResource WindowBorderStyle}" MouseDown="OnMouseDown" CornerRadius="5" > | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same. Probably a screenshot for this change may be better. (probably visual studio has xaml hot reload so this can be done easily).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Radius could not be changed in the theme because that code first. The setting was removed to allow the theme to be managed. Depending on the theme xaml., it will be round or square. |
||
| <Border Style="{DynamicResource WindowBorderStyle}" MouseDown="OnMouseDown"> | ||
| <StackPanel Orientation="Vertical"> | ||
| <Grid> | ||
| <TextBox x:Name="QueryTextSuggestionBox" | ||
| Style="{DynamicResource QuerySuggestionBoxStyle}" | ||
| IsEnabled="False" | ||
| Margin="18,0,56,0"> | ||
| Margin="16,0,56,0"> | ||
| <TextBox.Text> | ||
| <MultiBinding Converter="{StaticResource QuerySuggestionBoxConverter}"> | ||
| <Binding ElementName="QueryTextBox" Path="Text"/> | ||
|
|
@@ -83,24 +84,29 @@ | |
| AllowDrop="True" | ||
| Visibility="Visible" | ||
| Background="Transparent" | ||
| Margin="18,0,56,0"> | ||
| Margin="16,0,56,0"> | ||
| <TextBox.ContextMenu> | ||
| <ContextMenu> | ||
| <MenuItem Command="ApplicationCommands.Cut"/> | ||
| <MenuItem Command="ApplicationCommands.Copy"/> | ||
| <MenuItem Command="ApplicationCommands.Paste"/> | ||
| <Separator /> | ||
| <MenuItem Header="Settings" Click="OnContextMenusForSettingsClick" /> | ||
| <MenuItem Header="{DynamicResource flowlauncher_settings}" Click="OnContextMenusForSettingsClick" /> | ||
| </ContextMenu> | ||
| </TextBox.ContextMenu> | ||
| </TextBox> | ||
| <svgc:SvgControl Source="{Binding Image}" HorizontalAlignment="Right" Width="42" Height="42" | ||
| Background="Transparent"/> | ||
| <svgc:SvgControl Source="{Binding Image}" HorizontalAlignment="Right" Width="25" Height="25" Margin="0,2,18,0" Opacity="0.2" Background="Transparent" Style="{DynamicResource SearchIconStyle}"/> | ||
|
||
| </Grid> | ||
| <Line x:Name="ProgressBar" HorizontalAlignment="Right" | ||
|
|
||
|
|
||
| <Grid> | ||
| <Rectangle Width="Auto" HorizontalAlignment="Stretch" Style="{DynamicResource SeparatorStyle}" /> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the height cannot be given, a rectangle was used instead of a separator. |
||
| <Line x:Name="ProgressBar" HorizontalAlignment="Right" | ||
| Style="{DynamicResource PendingLineStyle}" Visibility="{Binding ProgressBarVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" | ||
| Y1="0" Y2="0" X2="100" Height="2" Width="752" StrokeThickness="1"> | ||
| </Line> | ||
| Y1="0" Y2="0" X2="100" Height="2" Width="Auto" StrokeThickness="1"> | ||
|
||
| </Line> | ||
| </Grid> | ||
|
|
||
| <ContentControl> | ||
| <flowlauncher:ResultListBox x:Name="ResultListBox" DataContext="{Binding Results}" PreviewMouseDown="OnPreviewMouseButtonDown" /> | ||
| </ContentControl> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,7 @@ | |
| IsSynchronizedWithCurrentItem="True" | ||
| PreviewMouseDown="ListBox_PreviewMouseDown"> | ||
| <!--IsSynchronizedWithCurrentItem: http://stackoverflow.com/a/7833798/2833083--> | ||
|
|
||
| <ListBox.ItemTemplate> | ||
| <DataTemplate> | ||
| <Button> | ||
|
|
@@ -29,41 +30,43 @@ | |
| </ControlTemplate> | ||
| </Button.Template> | ||
| <Button.Content> | ||
| <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5" | ||
| <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0" | ||
| Cursor="Hand" UseLayoutRounding="False"> | ||
| <Grid.Resources> | ||
| <converter:HighlightTextConverter x:Key="HighlightTextConverter"/> | ||
| <converter:OrdinalConverter x:Key="OrdinalConverter" /> | ||
| <converter:OpenResultHotkeyVisibilityConverter x:Key="OpenResultHotkeyVisibilityConverter" /> | ||
| </Grid.Resources> | ||
| <Grid.ColumnDefinitions> | ||
| <ColumnDefinition Width="32" /> | ||
| <ColumnDefinition /> | ||
| <ColumnDefinition Width="0" /> | ||
| <ColumnDefinition Width="54" /> | ||
| <ColumnDefinition Width="*"/> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| <ColumnDefinition Width="Auto" /> | ||
| </Grid.ColumnDefinitions> | ||
| <Image x:Name="ImageIcon" Width="32" Height="32" HorizontalAlignment="Left" | ||
| Source="{Binding Image}" Visibility="{Binding ShowIcon}" /> | ||
| <TextBlock Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" | ||
| Text="{Binding Glyph.Glyph}" FontFamily="{Binding Glyph.FontFamily}" FontSize="24" | ||
| Visibility="{Binding ShowGlyph}"/> | ||
| <Grid Margin="5 0 5 0" Grid.Column="1" HorizontalAlignment="Stretch"> | ||
| <StackPanel Visibility="{Binding ShowOpenResultHotkey}" Grid.Column="2" Margin="0 0 10 0"> | ||
| <TextBlock Margin="12 0 12 0" Style="{DynamicResource ItemHotkeyStyle}" HorizontalAlignment="Right" Opacity="0.8" VerticalAlignment="Center" Padding="0 10 0 10"> | ||
| <TextBlock.Visibility> | ||
| <Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}" Converter="{StaticResource ResourceKey=OpenResultHotkeyVisibilityConverter}" /> | ||
| </TextBlock.Visibility> | ||
| <TextBlock.Text> | ||
| <MultiBinding StringFormat="{}{0}+{1}"> | ||
| <Binding Path="OpenResultModifiers" /> | ||
| <Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}" Converter="{StaticResource ResourceKey=OrdinalConverter}" /> | ||
| </MultiBinding> | ||
| </TextBlock.Text> | ||
| </TextBlock> | ||
| </StackPanel> | ||
| <Border BorderThickness="0" BorderBrush="Transparent" Margin="14 0 0 0"> | ||
| <Image x:Name="ImageIcon" Width="32" Height="32" HorizontalAlignment="Center" Source="{Binding Image}" Visibility="{Binding ShowIcon}" Margin="0 0 0 0"/> | ||
| </Border> | ||
| <Border BorderThickness="0" BorderBrush="Transparent" Margin="14 0 0 0"> | ||
| <TextBlock Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Glyph.Glyph}" FontFamily="{Binding Glyph.FontFamily}" FontSize="24" Visibility="{Binding ShowGlyph}" Margin="12 0 0 0" /> | ||
| </Border> | ||
| <Grid Margin="6 0 6 0" Grid.Column="1" HorizontalAlignment="Stretch"> | ||
| <Grid.RowDefinitions> | ||
| <RowDefinition /> | ||
| <RowDefinition Height="Auto" x:Name="SubTitleRowDefinition" /> | ||
| </Grid.RowDefinitions> | ||
| <StackPanel Visibility="{Binding ShowOpenResultHotkey}"> | ||
| <TextBlock Margin="0 5 5 0" Style="{DynamicResource ItemSubTitleStyle}" HorizontalAlignment="Right" Opacity="0.8" > | ||
| <TextBlock.Visibility> | ||
| <Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}" Converter="{StaticResource ResourceKey=OpenResultHotkeyVisibilityConverter}" /> | ||
| </TextBlock.Visibility> | ||
| <TextBlock.Text> | ||
| <MultiBinding StringFormat="{}{0}+{1}"> | ||
| <Binding Path="OpenResultModifiers" /> | ||
| <Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}" Converter="{StaticResource ResourceKey=OrdinalConverter}" /> | ||
| </MultiBinding> | ||
| </TextBlock.Text> | ||
| </TextBlock> | ||
| </StackPanel> | ||
|
|
||
| <TextBlock Style="{DynamicResource ItemTitleStyle}" DockPanel.Dock="Left" | ||
| VerticalAlignment="Center" ToolTip="{Binding ShowTitleToolTip}" x:Name="Title" | ||
| Text="{Binding Result.Title}"> | ||
|
|
@@ -104,7 +107,7 @@ | |
| <Style TargetType="{x:Type ListBoxItem}"> | ||
| <EventSetter Event="MouseEnter" Handler="OnMouseEnter" /> | ||
| <EventSetter Event="MouseMove" Handler="OnMouseMove" /> | ||
| <Setter Property="Height" Value="50" /> | ||
| <Setter Property="Height" Value="52" /> | ||
| <Setter Property="Margin" Value="0" /> | ||
| <Setter Property="Padding" Value="0" /> | ||
| <Setter Property="BorderThickness" Value="0" /> | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you provide a screenshot for people to check the effect of this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turned into a softer shadow. I tried to give it a feeling that is commonly used in modern Windows.