-
-
Notifications
You must be signed in to change notification settings - Fork 442
Move to iNKORE.UI.WPF.Modern UI Framework #3593
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
Merged
Merged
Changes from all commits
Commits
Show all changes
128 commits
Select commit
Hold shift + click to select a range
0244d86
Make converters be public
Jack251970 647a1c7
Add converters from ModernWPF
Jack251970 aefce9f
Add helper from ModernWPF
Jack251970 6ef2022
Use iNKORE.UI.WPF.Modern package
Jack251970 090a5ff
Use scrollviewerex
Jack251970 17ac4df
Remove blank lines
Jack251970 ec13be9
Merge branch 'dev' into ui_wpf_modern
Jack251970 8f4d914
Merge branch 'dev' into ui_wpf_modern
Jack251970 4e70ad6
Fix build issue
Jack251970 9fb12ea
Fix build issue
Jack251970 8b572de
Merge branch 'dev' into ui_wpf_modern
Jack251970 c04db06
Merge branch 'dev' into ui_wpf_modern
Jack251970 fdb7307
Fix build issue
Jack251970 b9737bb
Fix build issue
Jack251970 69ff18d
Merge branch 'dev' into ui_wpf_modern
Jack251970 0053ada
Merge branch 'dev' into ui_wpf_modern
Jack251970 abc1b48
Merge branch 'dev' into ui_wpf_modern
Jack251970 156bd06
Enable GPU for setting window
Jack251970 ad1d8a9
Merge branch 'dev' into ui_wpf_modern
Jack251970 935b58a
Remove unused usings
Jack251970 97917d5
Merge branch 'dev' into ui_wpf_modern
Jack251970 203c3bd
Merge branch 'dev' into ui_wpf_modern
Jack251970 7c8dcab
Improve code quality
Jack251970 36db183
Use ScrollViewerEx for smooth scroll
Jack251970 8a0139b
Unify CanContentScroll design
Jack251970 4014f87
Merge branch 'dev' into ui_wpf_modern
Jack251970 bfc1ebf
Merge branch 'dev' into ui_wpf_modern
Jack251970 d72240d
Merge branch 'dev' into ui_wpf_modern
Jack251970 da7c071
Merge branch 'dev' into ui_wpf_modern
Jack251970 dd3cae7
Merge branch 'dev' into ui_wpf_modern
Jack251970 93a46b8
Add theme dictionary keys
Jack251970 78e8f85
Improve SelectFileManagerWindow
Jack251970 e67fe57
Improve ReleaseNotesWindow
Jack251970 e940686
Use SettingsCard & SettingsExpander & HyperLinkButton & InfoBar from …
Jack251970 119ff61
Remove all unused resources
Jack251970 1b69320
Add TODOs to fix crashes & compability
Jack251970 25967c7
Improve WelcomePage3
Jack251970 82ad686
Add Content Dialog style back
Jack251970 01f3459
Remove unused controls
Jack251970 06f805e
Organize resources
Jack251970 e175db0
Use one scroll viewer
Jack251970 f031454
Merge branch 'dev' into ui_wpf_modern
Jack251970 cfd2682
Update lock file
Jack251970 0a3da3d
Fix InfoBar IsOpen issue & Improve code quality
Jack251970 d3d6819
Merge branch 'dev' into ui_wpf_modern
Jack251970 6739a5e
Add scroll property in listbox
onesounds 467e805
Added Sample Numberbox Control Template
onesounds 3042fce
Format style
Jack251970 ee88fbf
Fix NumberBox MinWidth
Jack251970 4e7feab
Override styles in UI.Modern.WPF
Jack251970 5a69a48
Remove NumberBox control template & Add ListView control template
Jack251970 b637e21
Fix list view item vertial center issue
Jack251970 ff3688b
Add auto resize for list view in web search plugin
Jack251970 62e6111
Fix list view item vertical center issue
Jack251970 e0cdf4f
Override styles in UI.Modern.WPF
Jack251970 5cb5a9a
Add code comments
Jack251970 fa68521
Revert "Add scroll property in listbox"
Jack251970 4ce4f75
Add CustomScrollViewerEx
Jack251970 b7f441e
Improve code quality
Jack251970 203d867
Fix issue
Jack251970 54fc92f
Use CustomScrollViewerEx
Jack251970 e0e5dc6
Adjust Item Margin in general page
onesounds cd47b86
- Adjust Item Margin
onesounds 5c04e26
Do not focus for context menu
Jack251970 315d762
Try fix
Jack251970 b8ae220
Improve code quality
Jack251970 4267225
Use ui:GridView
Jack251970 97fb6a4
Move all resources to Style
Jack251970 c3493da
Add scroll unit
Jack251970 c4147c0
Use ListBox to fix virtualization issue
Jack251970 194c70a
Fix text color
Jack251970 9872b08
Fix tab navigation
Jack251970 5ed53a9
Fix textblock color
Jack251970 072d55c
Improve ListBox scroll viewer
Jack251970 552ebcb
Improve code quality
Jack251970 8cf829d
Fix scroll bar padding
Jack251970 6ce0580
Remove auto hide scroll bars setting
Jack251970 aa3cfb7
Use DefaultListBoxStyle
Jack251970 9b21e7d
Improve store item focus visual style
Jack251970 867247a
Remove SwitchFocusVisualStyleKey
Jack251970 4ff8ef9
Improve code quality
Jack251970 55df108
Remove NavTabControl style
Jack251970 ee7e517
Remove NavTabItem style
Jack251970 71e0a55
Remove logo style
Jack251970 27b3b45
Use DefaultListBoxItemStyle for plugin item & plugin store item & Rem…
Jack251970 1630e10
Improve code quality
Jack251970 743b4d8
Use dynamic resource
Jack251970 5cd1e60
Use DefaultListBoxItemStyle for theme style
Jack251970 1caa691
Add & Use ThemeListStyle
Jack251970 e5ed1ed
Improve code quality
Jack251970 f9e40ce
Remove HyperLinkBtnStyle
Jack251970 e32538d
Use ui:HyperlinkButton instead of Button & Hyperlink in about page
Jack251970 1a55abe
Improve welcome page 3
Jack251970 5f01702
Improve release notes window
Jack251970 1fdb3fc
Revert "Use ui:HyperlinkButton instead of Button & Hyperlink in about…
Jack251970 c477bc5
Use AccentButton instead of Hyperlink
Jack251970 65ff188
Fix release window width issue
Jack251970 5b131e5
Remove unchanged resources
Jack251970 f9e4857
Remove unchanged resources of navigation view
Jack251970 37e407a
Fix ExpanderHeaderFocusVisual
Jack251970 9f08c4f
Fix AllEverythingSortOptions binding issue
Jack251970 979efd3
Improve WebSearch SettingsControl
Jack251970 94d7619
Merge branch 'dev' into ui_wpf_modern
Jack251970 27d0c69
Add UI.WPF.Modern badge
Jack251970 01be6a1
Merge branch 'ui_wpf_modern' of https://github.com/Flow-Launcher/Flow…
Jack251970 4869f43
Merge branch 'dev' into ui_wpf_modern
Jack251970 7613bad
Fix context menu focus visuals
Jack251970 1782542
Merge branch 'ui_wpf_modern' of https://github.com/Flow-Launcher/Flow…
Jack251970 9751ffc
Merge branch 'dev' into ui_wpf_modern
Jack251970 67be26a
Merge branch 'dev' into ui_wpf_modern
Jack251970 07bafea
Merge branch 'dev' into ui_wpf_modern
Jack251970 3099dc8
Merge branch 'dev' into ui_wpf_modern
Jack251970 66145bf
Remove unused resources
Jack251970 5dff125
Add more code comments
Jack251970 1cef358
Add future todos
Jack251970 67f7834
Format xaml files
Jack251970 b1e6cfa
Improve code quality
Jack251970 50ec9de
Improve CustomToggleButtonStyle
Jack251970 7c24d97
Improve DefaultToggleSwitch
Jack251970 eb5b20a
Fix DefaultToggleSwitch resources
Jack251970 ebf1e86
Merge branch 'dev' into ui_wpf_modern
Jack251970 4b22862
Add WPF UI Library section
Jack251970 26c2aa9
Update image tag width in README.md
Jack251970 5b755b7
Merge branch 'dev' into ui_wpf_modern
Jack251970 fabc7b2
Remove unused LocalizedDescriptionAttribute
Jack251970 dc3d2be
Log and catch more exception when changing themes
Jack251970 4e37a10
Revert selection if failed to set theme
Jack251970 97efa17
update development section of README.md
jjw24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
24 changes: 0 additions & 24 deletions
24
Flow.Launcher.Core/Resource/LocalizedDescriptionAttribute.cs
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
using System; | ||
using System.Globalization; | ||
using System.Windows; | ||
using System.Windows.Data; | ||
|
||
namespace Flow.Launcher.Converters; | ||
|
||
public class CornerRadiusFilterConverter : DependencyObject, IValueConverter | ||
{ | ||
public CornerRadiusFilterKind Filter { get; set; } | ||
|
||
public double Scale { get; set; } = 1.0; | ||
|
||
public static CornerRadius Convert(CornerRadius radius, CornerRadiusFilterKind filterKind) | ||
{ | ||
CornerRadius result = radius; | ||
|
||
switch (filterKind) | ||
{ | ||
case CornerRadiusFilterKind.Top: | ||
result.BottomLeft = 0; | ||
result.BottomRight = 0; | ||
break; | ||
case CornerRadiusFilterKind.Right: | ||
result.TopLeft = 0; | ||
result.BottomLeft = 0; | ||
break; | ||
case CornerRadiusFilterKind.Bottom: | ||
result.TopLeft = 0; | ||
result.TopRight = 0; | ||
break; | ||
case CornerRadiusFilterKind.Left: | ||
result.TopRight = 0; | ||
result.BottomRight = 0; | ||
break; | ||
} | ||
|
||
return result; | ||
} | ||
|
||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
var cornerRadius = (CornerRadius)value; | ||
|
||
var scale = Scale; | ||
if (!double.IsNaN(scale)) | ||
{ | ||
cornerRadius.TopLeft *= scale; | ||
cornerRadius.TopRight *= scale; | ||
cornerRadius.BottomRight *= scale; | ||
cornerRadius.BottomLeft *= scale; | ||
} | ||
|
||
var filterType = Filter; | ||
if (filterType == CornerRadiusFilterKind.TopLeftValue || | ||
filterType == CornerRadiusFilterKind.BottomRightValue) | ||
{ | ||
return GetDoubleValue(cornerRadius, filterType); | ||
} | ||
|
||
return Convert(cornerRadius, filterType); | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
private static double GetDoubleValue(CornerRadius radius, CornerRadiusFilterKind filterKind) | ||
{ | ||
switch (filterKind) | ||
{ | ||
case CornerRadiusFilterKind.TopLeftValue: | ||
return radius.TopLeft; | ||
case CornerRadiusFilterKind.BottomRightValue: | ||
return radius.BottomRight; | ||
} | ||
return 0; | ||
} | ||
} | ||
|
||
public enum CornerRadiusFilterKind | ||
{ | ||
None, | ||
Top, | ||
Right, | ||
Bottom, | ||
Left, | ||
TopLeftValue, | ||
BottomRightValue | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using System.Globalization; | ||
using System.Windows; | ||
using System.Windows.Data; | ||
|
||
namespace Flow.Launcher.Converters; | ||
|
||
public class PlacementRectangleConverter : IMultiValueConverter | ||
{ | ||
public Thickness Margin { get; set; } | ||
|
||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
if (values.Length == 2 && | ||
values[0] is double width && | ||
values[1] is double height) | ||
{ | ||
var margin = Margin; | ||
var topLeft = new Point(margin.Left, margin.Top); | ||
var bottomRight = new Point(width - margin.Right, height - margin.Bottom); | ||
var rect = new Rect(topLeft, bottomRight); | ||
return rect; | ||
} | ||
|
||
return Rect.Empty; | ||
} | ||
|
||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Globalization; | ||
using System.Windows; | ||
using System.Windows.Data; | ||
|
||
namespace Flow.Launcher.Converters; | ||
|
||
public class SharedSizeGroupConverter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
return (Visibility)value != Visibility.Collapsed ? (string)parameter : null; | ||
} | ||
Jack251970 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
|
||
namespace Flow.Launcher.Helper; | ||
|
||
public static class BorderHelper | ||
{ | ||
#region Child | ||
|
||
public static readonly DependencyProperty ChildProperty = | ||
DependencyProperty.RegisterAttached( | ||
"Child", | ||
typeof(UIElement), | ||
typeof(BorderHelper), | ||
new PropertyMetadata(default(UIElement), OnChildChanged)); | ||
|
||
public static UIElement GetChild(Border border) | ||
{ | ||
return (UIElement)border.GetValue(ChildProperty); | ||
} | ||
|
||
public static void SetChild(Border border, UIElement value) | ||
{ | ||
border.SetValue(ChildProperty, value); | ||
} | ||
|
||
private static void OnChildChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) | ||
{ | ||
((Border)d).Child = (UIElement)e.NewValue; | ||
} | ||
|
||
#endregion | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.