From cc1522c9c6157fda1121ee65e74ed9a243d4da64 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Tue, 17 Feb 2015 22:27:21 +0100 Subject: GTK3: disable spinner animation to avoid high cpu load --- desktop-themes/Shiny/gtk-3.0/gtk-widgets.css | 131 +++++---------------------- 1 file changed, 24 insertions(+), 107 deletions(-) (limited to 'desktop-themes/Shiny/gtk-3.0') diff --git a/desktop-themes/Shiny/gtk-3.0/gtk-widgets.css b/desktop-themes/Shiny/gtk-3.0/gtk-widgets.css index 76121227..789327f8 100644 --- a/desktop-themes/Shiny/gtk-3.0/gtk-widgets.css +++ b/desktop-themes/Shiny/gtk-3.0/gtk-widgets.css @@ -1909,119 +1909,36 @@ GtkComboBox .menuitem.separator { color: @fg_color; } -/*********** - * spinner * - ***********/ -@keyframes spinner { - 0.00% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.875)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.750)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.625)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.500)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.375)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.250)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.125)), to(transparent)); } - - 12.5% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.875)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.750)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.625)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.500)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.375)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.250)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.125)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)); } - - 25.0% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.750)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.625)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.500)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.375)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.250)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.125)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.875)), to(transparent)); } - - 37.5% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.625)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.500)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.375)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.250)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.125)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.875)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.750)), to(transparent)); } - - 50.0% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.500)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.375)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.250)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.125)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.875)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.750)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.625)), to(transparent)); } - - 62.5% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.375)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.250)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.125)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.875)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.750)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.625)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.500)), to(transparent)); } - - 75.0% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.250)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.125)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.875)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.750)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.625)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.500)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.375)), to(transparent)); } - - 87.5% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.125)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.875)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.750)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.625)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.500)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.375)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.250)), to(transparent)); } - - 100% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.875)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.750)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.625)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.500)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.375)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.250)), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.125)), to(transparent)); } +/********************* + * Spinner Animation * + *********************/ +/* This is CPU-intensive, no animation */ +/* +@keyframes spin { + to { -gtk-icon-transform: rotate(1turn); } +} +*/ + +@keyframes spin { + to { -gtk-icon-transform: rotate(0turn); } } .spinner { - background-color: transparent; - background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)), - -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)); - background-position: 14% 14%, 0% 50%, 14% 86%, 50% 100%, 86% 86%, 100% 50%, 86% 14%, 50% 0%; - background-size: 20% 20%; - background-repeat: no-repeat; -} - -.menu.spinner, -.primary-toolbar .spinner, -.primary-toolbar .spinner, -.menubar.toolbar .spinner, -.menubar.toolbar .spinner, -.header-bar .spinner, -.header-bar .spinner { - color: @selected_bg_color; + background-image: none; + background-color: blue; + opacity: 0; + -gtk-icon-source: -gtk-icontheme("process-working-symbolic"); } .spinner:active { - animation: spinner 1s infinite linear; + opacity: 1; + animation: spin 1s linear infinite; } +.spinner:active:insensitive { + opacity: 0.5; +} + +.button .spinner:active { + color: @theme_fg_color; } /************* -- cgit v1.2.1