Skip to content

Conversation

@onesounds
Copy link
Contributor

Features

  • When Type c:\ or d:, Display Free space size and Full Size with progresbar
  • Progressbar will be red when over 90% usage.

Test Case

  • The progress bar should be displayed as usage percent.
  • It should work properly for each drive.
  • If this command is not used, the progress bar must not be displayed.

- when Type "d:\", showing graph with free space.
- Colorized(red) when usage space 90% over
@onesounds onesounds added the kind/ui related to UI, icons, themes, etc label Sep 6, 2022
@Garulf
Copy link
Member

Garulf commented Sep 7, 2022

Possible for other plug-ins to use this design?

@onesounds
Copy link
Contributor Author

Possible for other plug-ins to use this design?

I guess so. if 'progress'(nullable int, 0-100) in result. automatically showing.

@onesounds onesounds self-assigned this Sep 7, 2022
@Garulf
Copy link
Member

Garulf commented Sep 7, 2022

Amazing!

@jjw24 jjw24 added the review in progress Indicates that a review is in progress for this PR label Sep 7, 2022
@jjw24 jjw24 added this to the 1.10.0 milestone Sep 7, 2022
@jjw24 jjw24 added the enhancement New feature or request label Sep 7, 2022
Comment on lines 14 to 25
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
double progress = (double)value;
string foreground = "#26a0da";

if (progress >= 90)
{
foreground = "#da2626";
}

return foreground;
}
Copy link
Member

Choose a reason for hiding this comment

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

@Garulf @onesounds @taooceros Do we want to enable plugins to use progress bar? If so we will need to make this bar colorization customizable by plugin, otherwise any progress above 90 will be red.

Copy link
Member

Choose a reason for hiding this comment

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

Probably best we don't hard code red here and allow the color to be adjusted in some manner.

Best case scenario it's themed and easily overridden by the plugin.

@jjw24
Copy link
Member

jjw24 commented Sep 11, 2022

@Garulf @onesounds @taooceros just changed the code a bit to allow plugins to use progress bar by providing the Result.ProgressBar value and optionally setting the color themselves. Let me know if you guys ok with the change, if all good we can merge in.

@jjw24 jjw24 enabled auto-merge September 11, 2022 22:08
@onesounds
Copy link
Contributor Author

@Garulf @onesounds @taooceros just changed the code a bit to allow plugins to use progress bar by providing the Result.ProgressBar value and optionally setting the color themselves. Let me know if you guys ok with the change, if all good we can merge in.

cool. I tested it and there's no problem. I think this structure is better. let's merge.

@Garulf
Copy link
Member

Garulf commented Sep 13, 2022

I have not tested but I have looked at the code. I see no issues

@jjw24 jjw24 merged commit c81dd32 into Flow-Launcher:dev Sep 13, 2022
@jjw24 jjw24 removed the review in progress Indicates that a review is in progress for this PR label Sep 13, 2022
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

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants