-
Notifications
You must be signed in to change notification settings - Fork 117
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
Add new apply style feature #284
base: dev
Are you sure you want to change the base?
Changes from all commits
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ public static class EnvironmentKeys | |
|
||
public static class Fonts | ||
{ | ||
//public const string Font = "Font"; | ||
public const string Font = "Font"; | ||
public const string Size = "Font.Size"; | ||
public const string Weight = "Font.Weight"; | ||
public const string Family = "Font.Family"; | ||
|
@@ -60,6 +60,11 @@ public static class View | |
public const string Opacity = nameof(Microsoft.Maui.IView.Opacity); | ||
} | ||
|
||
public static class Button | ||
{ | ||
public const string Padding = "Padding"; | ||
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. Why is this being added to Button? The Padding stuff already exists on layout, and should work for any view. 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. That is MAUI button Padding property, I think it should be different from the padding of layout? |
||
} | ||
|
||
public static class Shape | ||
{ | ||
public const string LineWidth = "Shape.LineWidth"; | ||
|
@@ -101,14 +106,13 @@ public static class Navigation | |
} | ||
public static class Slider | ||
{ | ||
public const string TrackColor = "SliderTrackColor"; | ||
public const string ProgressColor = "SliderProgressColor"; | ||
public const string ThumbColor = "SliderThumbColor"; | ||
public const string TrackColor = "MinimumTrackColor"; | ||
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. Why are the values changing? 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. Cause the MAUI API changed, you know the Comet.SourceGenerator project, the Slider class output file is this.
|
||
public const string ProgressColor = "MaximumTrackColor"; | ||
public const string ThumbColor = "ThumbColor"; | ||
} | ||
public static class ProgressBar | ||
{ | ||
public const string TrackColor = "ProgressBarTrackColor"; | ||
public const string ProgressColor = "ProgressBarProgressColor"; | ||
public const string ProgressColor = "ProgressColor"; | ||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
using System; | ||
namespace Comet | ||
{ | ||
//TODO need to implement | ||
public enum ControlState | ||
{ | ||
Default, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,7 +86,6 @@ public MaterialStyle(ColorPalette colorPalette) | |
ProgressBar = new ProgressBarStyle | ||
{ | ||
ProgressColor = colorPalette.P500, | ||
TrackColor = colorPalette.P100, | ||
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. Why is this being deleted? 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. MAUI API changed, there's no TrackColor property in Progress class |
||
}; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ namespace Comet.Styles | |
{ | ||
public class ProgressBarStyle : ViewStyle | ||
{ | ||
public StyleAwareValue<ControlState, Color> TrackColor { get; set; } | ||
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. Why is this being deleted? 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. MAUI API changed, there's no TrackColor property in Progress class |
||
public StyleAwareValue<ControlState, Color> ProgressColor { get; set; } | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,7 +175,6 @@ protected virtual void ApplySliderStyle(ContextualObject view) | |
|
||
protected virtual void ApplyProgresBarStyle(ContextualObject view) | ||
{ | ||
SetEnvironment(view, "", EnvironmentKeys.ProgressBar.TrackColor, ProgressBar?.TrackColor); | ||
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. Why is this being deleted? 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 with above |
||
SetEnvironment(view, "", EnvironmentKeys.ProgressBar.ProgressColor, ProgressBar?.ProgressColor); | ||
ApplyViewStyles(view, ProgressBar, typeof(ProgressBar)); | ||
|
||
|
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.
In the future lets try and avoid white noise changes.
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 will be better to have some tools to format code in current code base.