Skip to content

Conversation

onesounds
Copy link
Contributor

@onesounds onesounds commented Sep 27, 2021

  • Add Highlight Styling
  • Add modern themes and adjust classic themes
  • Changing Result item and hotkey layout
  • Change Context Menu label "Settings" to language string
  • Use right/left arrow keys to navigate to context menu and back
  • Add option to turn Glyph icons on query results on/off
  • Fixed custom font setting not available when shadow effects enabled

Also closes #661

@taooceros
Copy link
Member

Wow, that's a huge change😲
Will take a look on it tonight.

Copy link
Member

@taooceros taooceros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tried the new change yet, but just leave some code review (will do it later).

By the way, would you check some format change in the pull request?

effectSetter.Property = Border.EffectProperty;
effectSetter.Value = new DropShadowEffect
{
Opacity = 0.9,
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
It turned into a softer shadow. I tried to give it a feeling that is commonly used in modern Windows.

@@ -1,11 +1,12 @@
using System;
using System.Windows;using System;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new line here

Comment on lines 34 to 35
//textBlock.Inlines.Add(new Bold(new Run(currentCharacter)));
//textBlock.Inlines.Add(new Run(currentCharacter) { Foreground = Brushes.RoyalBlue });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove these lines

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Comment on lines 50 to 54
<Page Remove="Themes\League.Designer.xaml" />
<Page Remove="Themes\League.xaml" />
<Page Remove="Themes\ThemeBuilder\Template.xaml" />
<Page Remove="Themes\Win11Dark.Designer.xaml" />
<Page Remove="Themes\Win11Dark.xaml" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it be considered as page? Why previous theme don't need to be remove here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know there was something like this. I'm going to erase it.

<KeyBinding Key="D9" Modifiers="{Binding OpenResultCommandModifiers}" Command="{Binding OpenResultCommand}" CommandParameter="8"></KeyBinding>
</Window.InputBindings>
<Grid>
<Border Style="{DynamicResource WindowBorderStyle}" MouseDown="OnMouseDown" CornerRadius="5" >
Copy link
Member

Choose a reason for hiding this comment

The 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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

</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}"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same screenshot

Copy link
Contributor Author

@onesounds onesounds Sep 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
It may not be seen well in some Themes, but it has been the same before. In the future, I will try to make it visible according to the theme.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably make this editable and edit it in theme file instead of the MainWindow.xaml


public Visibility ShowOpenResultHotkey =>
Settings.ShowOpenResultHotkey ? Visibility.Visible : Visibility.Hidden;
Settings.ShowOpenResultHotkey ? Visibility.Visible : Visibility.Collapsed;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the different between these two?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I increased the area of the hot key.
  2. I tested the 'Do not display hotkey' option, but the hotkey area is reserved. ('Hidden' Property makes it like this.) In this case, the title area does not fit the width of the window. (it make a gap on the right side.)
  3. the code make responsive width the title area and remove gap.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Collapsed: Do not display the element, and do not reserve space for it in layout.
Hidden: Do not display the element, but reserve space for the element in layout.

@onesounds
Copy link
Contributor Author

I haven't tried the new change yet, but just leave some code review (will do it later).

By the way, would you check some format change in the pull request?
Sorry, I don't know what you mean, What should I change?

@taooceros
Copy link
Member

I haven't tried the new change yet, but just leave some code review (will do it later).
By the way, would you check some format change in the pull request?
Sorry, I don't know what you mean, What should I change?

No not a big deal. Just remove some empty line will be fine. I will take a look on the effect tonight 😃

@jjw24
Copy link
Member

jjw24 commented Sep 27, 2021

@onesounds this look is really good, very nice! thank you.

@taooceros @onesounds would it be possible to make this change backwards compatible with the current themes?

Also there is a request to make the magnifying glass swappable with another image via the xaml file, if not hard let's add to this change?

- change the code for compatible classic themes (You can use it without modifying the classic theme.)
- add default window radius(5) for classic themes
- add default hotkey color
- but still default
- New themes are used in a way that redefines the base code by changing and including it.
- The basic height and each item spacing had to be changed. This part should also be changed to a theme.
…so I choosed and applied right color for classic themes.- Rollback Classic Skins

- change the code for compatible classic themes (You can use it without modifying the classic theme.)
- add default window radius(5) for classic themes
- add default hotkey color
- but still default hotkey color not same subtitle color in classic themes, (because base xaml can't read theme xaml) so I choosed right color for classic themes and applied it. I think it's not bad.
- New themes are used in a way that redefines the base code by changing and including it.
- The basic height and each item spacing had to be changed. This part should also be changed to a theme.
…margin, size, color, option, etc).

- If you want to erase it, adjust the opacity.
- Geometry type data (svg to xaml) was inserted into base.xaml.
- If there is no data, use the one in the base.
- The top margin of the list box was adjusted under the theme.n to changable b
switch (Visbility)
{
case Visibility.Collapsed when Results.Count > 0:
Margin = new Thickness { Top = 8 };
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part gives the margin of the list list and query box. In the absence of a seperator (classic themes), vertical centering seems to be out of place, so it was removed. It can be added as the Margin of the theme's basis separator attribute, and in recent themes, it is displayed with the separator.

<Setter Property="Background" Value="Transparent" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
<Geometry x:Key="SearchIconImg">F1 M12000,12000z M0,0z M10354,10962C10326,10951 10279,10927 10249,10907 10216,10886 9476,10153 8370,9046 7366,8042 6541,7220 6536,7220 6532,7220 6498,7242 6461,7268 6213,7447 5883,7619 5592,7721 5194,7860 4802,7919 4360,7906 3612,7886 2953,7647 2340,7174 2131,7013 1832,6699 1664,6465 1394,6088 1188,5618 1097,5170 1044,4909 1030,4764 1030,4470 1030,4130 1056,3914 1135,3609 1263,3110 1511,2633 1850,2235 1936,2134 2162,1911 2260,1829 2781,1395 3422,1120 4090,1045 4271,1025 4667,1025 4848,1045 5505,1120 6100,1368 6630,1789 6774,1903 7081,2215 7186,2355 7362,2588 7467,2759 7579,2990 7802,3455 7911,3937 7911,4460 7911,4854 7861,5165 7737,5542 7684,5702 7675,5724 7602,5885 7517,6071 7390,6292 7270,6460 7242,6499 7220,6533 7220,6538 7220,6542 8046,7371 9055,8380 10441,9766 10898,10229 10924,10274 10945,10308 10966,10364 10976,10408 10990,10472 10991,10493 10980,10554 10952,10717 10840,10865 10690,10937 10621,10971 10607,10974 10510,10977 10425,10980 10395,10977 10354,10962z M4685,7050C5214,7001 5694,6809 6100,6484 6209,6396 6396,6209 6484,6100 7151,5267 7246,4110 6721,3190 6369,2571 5798,2137 5100,1956 4706,1855 4222,1855 3830,1957 3448,2056 3140,2210 2838,2453 2337,2855 2010,3427 1908,4080 1877,4274 1877,4656 1908,4850 1948,5105 2028,5370 2133,5590 2459,6272 3077,6782 3810,6973 3967,7014 4085,7034 4290,7053 4371,7061 4583,7059 4685,7050z</Geometry>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the data that changed svg to xaml. If there is no such part, use the base.xaml.

<Setter Property="Foreground" Value="#000000" />
</Style>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this theme(non edited), it works but have design problem. (inputbox full height)



<Grid>
<Rectangle Width="Auto" HorizontalAlignment="Stretch" Style="{DynamicResource SeparatorStyle}" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

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">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested it, but progressbar will come out nicely as it is placed on the separator. you guys talking about using spinner, I think this is better.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to get the progress bar shown but either dont have too many files or the progress bar is not showing up, could both of you test when you get a chance please @taooceros

<ColumnDefinition />
<ColumnDefinition Width="0" />
<ColumnDefinition Width="54" />
<ColumnDefinition Width="*"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
I changed list item layout. It looks good and solves the problem that the Title area invades the hot key area.

@onesounds
Copy link
Contributor Author

onesounds commented Sep 28, 2021

@onesounds this look is really good, very nice! thank you.

@taooceros @onesounds would it be possible to make this change backwards compatible with the current themes?

Also there is a request to make the magnifying glass swappable with another image via the xaml file, if not hard let's add to this change?

  • now non edited classic theme works. I need a test.
  • SVG was converted into xaml and inserted into the theme. It can be changing and styling. and it is inserted into base.xaml too. it works as a default.

@jjw24
Copy link
Member

jjw24 commented Sep 28, 2021

@onesounds just took it for a spin, love it. I see you added a couple more themes, looking good. Where you been all this time lol

@onesounds
Copy link
Contributor Author

onesounds commented Sep 28, 2021

this is my first pull request. I'm not a programmer. I installed a visual studio 4 days ago to fix this design. When I went to the discord to make some design suggestion, @taooceros suggest me to make a pull request so I tried. (I always wondered why the open source software was so ugly, now that I look at it, I think it's just that there's no designer.) I'm happy you like it. anyway I have more Idea for design, I'll open discussion soon.

Comment on lines 100 to 101
SubTitle = LnkResolvedPath ?? FullPath,
//SubTitle = LnkResolvedPath ?? FullPath,
SubTitle = "",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am reverting this, we can do the subtitle changes in a seperate pr.

Copy link
Member

@jjw24 jjw24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taooceros @onesounds we need implement support for users who dont have the glyph icons installed on their system. I will revert the glyph addition in this pr and we can add it in when implemented.

image

@taooceros
Copy link
Member

The glyph font is already added to resources, so just change the path will make it usable for everyone.

@jjw24
Copy link
Member

jjw24 commented Oct 6, 2021

i tried it (with absolute path) but didnt work, do i just point it directly at the file?

@taooceros
Copy link
Member

i tried it (with absolute path) but didnt work, do i just point it directly at the file?

We can I guess. Though I think if added to resources we can access that with relative path to the resources.

@jjw24
Copy link
Member

jjw24 commented Oct 7, 2021

@onesounds @taooceros I added the Glyph icons back and fixed the path, just needed to also add # to the Glyph string in the results.

I also added option to switch Glyph icons on/off for results.

image

@taooceros did you want to take another look or happy for me to merge this in?

jjw24
jjw24 previously approved these changes Oct 7, 2021
private void InitProgressbarAnimation()
{
var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 100,
var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 150,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally Progress bar fixed. I think it's my last push in this branch. I'll do something other branch.

The fixed Width size was the problem. I mistook activewidth for window size.
So I changed let Progressbar bring the width of parent grid.

Adjust
To prevent the progress bar from appearing suddenly, I changed the start and end position to more than window size. In this case, it goes out of the screen, so clip bound was applied to parent grid. (Clip bound sadly only works in like this case. If this worked for selected item, I wouldn't have to suffer.)

@taooceros
Copy link
Member

@taooceros did you want to take another look or happy for me to merge this in?

I will be busy for two days because of the exams. So I can take a look on the pull request at friday or weekend, or if you think it ok, just merge it🧐.

This was referenced Oct 7, 2021
@taooceros
Copy link
Member

I am free now. Anything left?

@jjw24
Copy link
Member

jjw24 commented Oct 8, 2021

I am free now. Anything left?

Yeah I'm very happy with this change, maybe have a quick look if I missed anything and take it for a spin to ensure nothing has regressed.

@taooceros
Copy link
Member

I am free now. Anything left?

Yeah I'm very happy with this change, maybe have a quick look if I missed anything and take it for a spin to ensure nothing has regressed.

Sure, I will finish that by tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request kind/ui related to UI, icons, themes, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How do I hide the magnifier icon in the main window?

3 participants