atom-material / atom-material-ui

A dynamic UI theme for Atom that follows Google's Material Design Guidelines
MIT License
817 stars 203 forks source link

Allow animation of progress bar #449

Closed Datseris closed 5 years ago

Datseris commented 6 years ago

The progress bar used by Juno (maybe other packages as well?) is not animated, neither it changes colors.

Reproduction Steps:

  1. Install Juno and Julia
  2. Make Material the chosen Atom theme
  3. Run some Julia commands in Atom, through Juno

Expected behavior:

A progress bar in the bottom left of the screen should be animated while the process runs.

Observed behavior:

The progress bar does not change color or gets animated, whether progresses run or not.

How to fix:

The developer of Juno told me to simply add this:

@progress-buffer-color: fade(cyan, 20%);
@progress-background-color: fade(cyan, 20%);

progress {
  -webkit-appearance: none;

  &::-webkit-progress-bar {
    background-color: transparent;
  }

  &::-webkit-progress-value {
    background-color: @progress-background-color;
  }

  // Is buffering (when no value is set)
  &:indeterminate {
    background-image:
       linear-gradient(-45deg, transparent 33%, @progress-buffer-color 33%,
                               @progress-buffer-color 66%, transparent 66%);
    background-size: 25px 5px, 100% 100%, 100% 100%;

    // Plays animation for 1min (12runs) at normal speed,
    // then slows down frame-rate for 9mins (108runs) to limit CPU usage
    -webkit-animation: progress-buffering 5s linear 12,
                       progress-buffering 5s 60s steps(10) 108;
  }
}

@-webkit-keyframes progress-buffering {
   100% { background-position: -100px 0px; }
}

to my style-sheet. It solved the problem.

If you truly, Truly need screenshots, tell me and I will undo the fix to produce one...