Skip to content

Commit

Permalink
gui: Fix Updater spinner's vertical alignment (#2195)
Browse files Browse the repository at this point in the history
The method used to vertically center the spinner displayed in the
Updater window when no download progress information is available is
a Firefox experimental feature which has no effects in Chromium, the
browser used to render Desktop's views.

Besides, this hack was only necessary because the `spin` animation was
redefined in our own CSS because, in turn, we were adding an
unnecessary top margin on the main window's status bar spinner icon.

One fix leading to the other, we now have centered spinners in both
the status bar and the updater window.
We took the opportunity to use the same size for the status bar
spinner as the other status bar icons and to align these with the file
icons displayed below in the Recent tab.
  • Loading branch information
taratatach authored Feb 11, 2022
1 parent eefe7b9 commit f3add6b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
9 changes: 4 additions & 5 deletions gui/styles/_statusbar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,22 @@
white-space: nowrap;

.status_img
flex 0 0 3em
flex 0 0 4em

img.status__icon
@extend $icon-24

display: block
margin-left: 25%
margin-left 1em
padding: 0.2em
vertical-align: middle
border-radius: 1.5em

.spin
@extend $icon-16
@extend $icon-24
@extend $spin
background-color: var(--primaryColor)
margin-left: 1em
margin-top: 1em
margin-left 1em

&.blue
.status__icon--uptodate
Expand Down
23 changes: 12 additions & 11 deletions gui/styles/_wizard.styl
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,18 @@ a.more-info
font-size: 1.1em
margin 1em 0 0 0

// TODO figure out why we need to add that for
// properly placed spinner
&[aria-busy=true] > span::after
content ''
position relative
top .4rem
left .5rem

@extend $icon-16
@extend $spin
background-color: var(--primaryContrastTextColor)
&[aria-busy=true] > span
// We want a busy spinner vertically aligned with the text, not centered
align-items unset

&::after
content ''
position relative
left .5rem

@extend $icon-16
@extend $spin
background-color: var(--primaryContrastTextColor)


.step-address .coz-form-group
Expand Down
6 changes: 0 additions & 6 deletions gui/styles/app.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
@require './node_modules/cozy-ui/stylus/settings/fontstack.styl'
@require './node_modules/cozy-ui/stylus/utilities/typography.styl'

@keyframes spin
from
transform translateY(-50%) rotate(0deg)
to
transform translateY(-50%) rotate(360deg)

@keyframes rotate
from
transform rotate(0deg)
Expand Down

0 comments on commit f3add6b

Please sign in to comment.