From 6097966099a65ebdba49e3669ff40813b561fc68 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 21 Apr 2017 12:40:05 +0200 Subject: [PATCH] :bug: spinning sync icon fixes #23975 --- extensions/git/src/statusbar.ts | 1 + .../base/browser/ui/octiconLabel/octiconLabel.ts | 6 +++--- .../octiconLabel/octicons/octicons-animations.css | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 src/vs/base/browser/ui/octiconLabel/octicons/octicons-animations.css diff --git a/extensions/git/src/statusbar.ts b/extensions/git/src/statusbar.ts index 0b2518fac68..b12dd9664c4 100644 --- a/extensions/git/src/statusbar.ts +++ b/extensions/git/src/statusbar.ts @@ -126,6 +126,7 @@ class SyncStatusBar { } if (this.state.isSyncRunning) { + icon = '$(sync~spin)'; text = ''; command = ''; tooltip = localize('syncing changes', "Synchronizing changes..."); diff --git a/src/vs/base/browser/ui/octiconLabel/octiconLabel.ts b/src/vs/base/browser/ui/octiconLabel/octiconLabel.ts index 184a14e47b2..94196211fbb 100644 --- a/src/vs/base/browser/ui/octiconLabel/octiconLabel.ts +++ b/src/vs/base/browser/ui/octiconLabel/octiconLabel.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; - import 'vs/css!./octicons/octicons'; +import 'vs/css!./octicons/octicons-animations'; import { escape } from 'vs/base/common/strings'; export function expand(text: string): string { - return text.replace(/\$\(([^)]+)\)/g, (match, g1) => { - return ``; + return text.replace(/\$\(((.+?)(~(.*?))?)\)/g, (match, g1, name, g3, animation) => { + return ``; }); } diff --git a/src/vs/base/browser/ui/octiconLabel/octicons/octicons-animations.css b/src/vs/base/browser/ui/octiconLabel/octicons/octicons-animations.css new file mode 100644 index 00000000000..798a231b931 --- /dev/null +++ b/src/vs/base/browser/ui/octiconLabel/octicons/octicons-animations.css @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +@keyframes octicon-spin { + 100% { + transform:rotate(360deg); + } +} + +.octicon-animation-spin { + animation: octicon-spin 2s linear infinite; +} \ No newline at end of file