From: Stas Vilchik Date: Mon, 31 Mar 2014 07:04:14 +0000 (+0600) Subject: SONAR-5173 New trend icons X-Git-Tag: 4.3~230 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5ebc4e434d3ba267760180f90fb8faf40d1596bf;p=sonarqube.git SONAR-5173 New trend icons --- diff --git a/sonar-server/src/main/less/icons.less b/sonar-server/src/main/less/icons.less index 9997cdf3707..c9adeddc9f3 100644 --- a/sonar-server/src/main/less/icons.less +++ b/sonar-server/src/main/less/icons.less @@ -29,6 +29,16 @@ a[class^="icon-"], a[class*=" icon-"] { } +/* + * Colors + */ + + +.icon-black { color: @baseFontColor; } +.icon-red { color: @red; } +.icon-green { color: @green; } + + /* * Severity */ @@ -142,6 +152,8 @@ a[class^="icon-"], a[class*=" icon-"] { */ [class^="icon-qualifier-"], [class*=" icon-qualifier-"] { + position: relative; + top: -1px; color: @qualifierColor; font-size: @iconFontSize; } @@ -160,6 +172,37 @@ a[class^="icon-"], a[class*=" icon-"] { .icon-qualifier-dev:before { content: "\f007"; } +/* + * Trends + */ + +[class^="icon-trend-"], [class*=" icon-trend-"] { + position: relative; + top: -1px; + font-size: @iconSmallFontSize; +} + +.icon-trend-big { + font-size: @iconFontSize; +} + +.icon-trend-0:before { + content: "\e607"; +} +.icon-trend-1:before { + content: "\e605"; +} +.icon-trend--1:before { + content: "\e601"; +} +.icon-trend-2:before { + content: "\e606"; +} +.icon-trend--2:before { + content: "\e603"; +} + + /* * Common */ diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb index b1cf0ea55eb..1a9ffe1c9ae 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb @@ -434,27 +434,24 @@ module ApplicationHelper m = @snapshot.measure(metric_or_measure) end - if options[:big] - size = '-big' - pixels = 16 - else - size = '' - pixels = 10 - end if m.nil? || m.tendency.nil? || m.tendency==0 - return options[:empty] ? image_tag("trend/0#{size}.png", :width => pixels, :height => pixels, :alt => '') : nil + return options[:empty] ? "" : nil + end + className = m.tendency.to_s + + if options[:big] + className += ' icon-trend-big' end - filename = m.tendency.to_s case m.tendency_qualitative when 0 - filename+= '-black' + className += ' icon-black' when -1 - filename+= '-red' + className += ' icon-red' when 1 - filename+= '-green' + className += ' icon-green' end - image_tag("trend/#{filename}#{size}.png", :alt => '', :width => pixels, :height => pixels) + "" end # diff --git a/sonar-server/src/main/webapp/fonts/sonar.eot b/sonar-server/src/main/webapp/fonts/sonar.eot index 2452a4ab85f..ef794fcc043 100755 Binary files a/sonar-server/src/main/webapp/fonts/sonar.eot and b/sonar-server/src/main/webapp/fonts/sonar.eot differ diff --git a/sonar-server/src/main/webapp/fonts/sonar.svg b/sonar-server/src/main/webapp/fonts/sonar.svg index 477271226a5..23e25bccbd3 100755 --- a/sonar-server/src/main/webapp/fonts/sonar.svg +++ b/sonar-server/src/main/webapp/fonts/sonar.svg @@ -8,8 +8,13 @@ + + + + + diff --git a/sonar-server/src/main/webapp/fonts/sonar.ttf b/sonar-server/src/main/webapp/fonts/sonar.ttf index 42740c6ed95..ced7e8e7174 100755 Binary files a/sonar-server/src/main/webapp/fonts/sonar.ttf and b/sonar-server/src/main/webapp/fonts/sonar.ttf differ diff --git a/sonar-server/src/main/webapp/fonts/sonar.woff b/sonar-server/src/main/webapp/fonts/sonar.woff index e272fc80c1a..c04c781fb91 100755 Binary files a/sonar-server/src/main/webapp/fonts/sonar.woff and b/sonar-server/src/main/webapp/fonts/sonar.woff differ diff --git a/sonar-server/src/main/webapp/images/trend/-1-black-big.png b/sonar-server/src/main/webapp/images/trend/-1-black-big.png old mode 100755 new mode 100644 index c2b0b594db2..7315b5cedea Binary files a/sonar-server/src/main/webapp/images/trend/-1-black-big.png and b/sonar-server/src/main/webapp/images/trend/-1-black-big.png differ diff --git a/sonar-server/src/main/webapp/images/trend/-1-black.png b/sonar-server/src/main/webapp/images/trend/-1-black.png old mode 100755 new mode 100644 index 83f12ed1593..d947fd61c84 Binary files a/sonar-server/src/main/webapp/images/trend/-1-black.png and b/sonar-server/src/main/webapp/images/trend/-1-black.png differ diff --git a/sonar-server/src/main/webapp/images/trend/-1-green-big.png b/sonar-server/src/main/webapp/images/trend/-1-green-big.png old mode 100755 new mode 100644 index 734414d5fdb..3c8528ed953 Binary files a/sonar-server/src/main/webapp/images/trend/-1-green-big.png and b/sonar-server/src/main/webapp/images/trend/-1-green-big.png differ diff --git a/sonar-server/src/main/webapp/images/trend/-1-green.png b/sonar-server/src/main/webapp/images/trend/-1-green.png old mode 100755 new mode 100644 index 2398a8fca58..b253ea8afc8 Binary files a/sonar-server/src/main/webapp/images/trend/-1-green.png and b/sonar-server/src/main/webapp/images/trend/-1-green.png differ diff --git a/sonar-server/src/main/webapp/images/trend/-1-red-big.png b/sonar-server/src/main/webapp/images/trend/-1-red-big.png old mode 100755 new mode 100644 index 24994c7cafe..f2167fe0102 Binary files a/sonar-server/src/main/webapp/images/trend/-1-red-big.png and b/sonar-server/src/main/webapp/images/trend/-1-red-big.png differ diff --git a/sonar-server/src/main/webapp/images/trend/-1-red.png b/sonar-server/src/main/webapp/images/trend/-1-red.png old mode 100755 new mode 100644 index 17a86f0806f..c0daa558304 Binary files a/sonar-server/src/main/webapp/images/trend/-1-red.png and b/sonar-server/src/main/webapp/images/trend/-1-red.png differ diff --git a/sonar-server/src/main/webapp/images/trend/-2-black-big.png b/sonar-server/src/main/webapp/images/trend/-2-black-big.png old mode 100755 new mode 100644 index 4d91b2f10bf..b52b268bd6d Binary files a/sonar-server/src/main/webapp/images/trend/-2-black-big.png and b/sonar-server/src/main/webapp/images/trend/-2-black-big.png differ diff --git a/sonar-server/src/main/webapp/images/trend/-2-black.png b/sonar-server/src/main/webapp/images/trend/-2-black.png old mode 100755 new mode 100644 index 084f3ce81bc..eec69c558e1 Binary files a/sonar-server/src/main/webapp/images/trend/-2-black.png and b/sonar-server/src/main/webapp/images/trend/-2-black.png differ diff --git a/sonar-server/src/main/webapp/images/trend/-2-green-big.png b/sonar-server/src/main/webapp/images/trend/-2-green-big.png old mode 100755 new mode 100644 index 9849178bb7f..bf19ce7950e Binary files a/sonar-server/src/main/webapp/images/trend/-2-green-big.png and b/sonar-server/src/main/webapp/images/trend/-2-green-big.png differ diff --git a/sonar-server/src/main/webapp/images/trend/-2-green.png b/sonar-server/src/main/webapp/images/trend/-2-green.png old mode 100755 new mode 100644 index 96409ac486c..4c7f5e8ff68 Binary files a/sonar-server/src/main/webapp/images/trend/-2-green.png and b/sonar-server/src/main/webapp/images/trend/-2-green.png differ diff --git a/sonar-server/src/main/webapp/images/trend/-2-red-big.png b/sonar-server/src/main/webapp/images/trend/-2-red-big.png old mode 100755 new mode 100644 index 97984ac2a54..b5cacd0dbba Binary files a/sonar-server/src/main/webapp/images/trend/-2-red-big.png and b/sonar-server/src/main/webapp/images/trend/-2-red-big.png differ diff --git a/sonar-server/src/main/webapp/images/trend/-2-red.png b/sonar-server/src/main/webapp/images/trend/-2-red.png old mode 100755 new mode 100644 index ab717884de6..662249d2794 Binary files a/sonar-server/src/main/webapp/images/trend/-2-red.png and b/sonar-server/src/main/webapp/images/trend/-2-red.png differ diff --git a/sonar-server/src/main/webapp/images/trend/0-big.png b/sonar-server/src/main/webapp/images/trend/0-big.png index 12743e982ba..4a22f5492e9 100644 Binary files a/sonar-server/src/main/webapp/images/trend/0-big.png and b/sonar-server/src/main/webapp/images/trend/0-big.png differ diff --git a/sonar-server/src/main/webapp/images/trend/0.png b/sonar-server/src/main/webapp/images/trend/0.png index 8cefe92efe7..402018c8e06 100644 Binary files a/sonar-server/src/main/webapp/images/trend/0.png and b/sonar-server/src/main/webapp/images/trend/0.png differ diff --git a/sonar-server/src/main/webapp/images/trend/1-black-big.png b/sonar-server/src/main/webapp/images/trend/1-black-big.png old mode 100755 new mode 100644 index 7adf22e30c0..d4a2c10950e Binary files a/sonar-server/src/main/webapp/images/trend/1-black-big.png and b/sonar-server/src/main/webapp/images/trend/1-black-big.png differ diff --git a/sonar-server/src/main/webapp/images/trend/1-black.png b/sonar-server/src/main/webapp/images/trend/1-black.png old mode 100755 new mode 100644 index 439315abf9a..0ef00da3d86 Binary files a/sonar-server/src/main/webapp/images/trend/1-black.png and b/sonar-server/src/main/webapp/images/trend/1-black.png differ diff --git a/sonar-server/src/main/webapp/images/trend/1-green-big.png b/sonar-server/src/main/webapp/images/trend/1-green-big.png old mode 100755 new mode 100644 index fae26a1d5ce..8f5ef879f36 Binary files a/sonar-server/src/main/webapp/images/trend/1-green-big.png and b/sonar-server/src/main/webapp/images/trend/1-green-big.png differ diff --git a/sonar-server/src/main/webapp/images/trend/1-green.png b/sonar-server/src/main/webapp/images/trend/1-green.png old mode 100755 new mode 100644 index af56e02d5f2..248bed09ef3 Binary files a/sonar-server/src/main/webapp/images/trend/1-green.png and b/sonar-server/src/main/webapp/images/trend/1-green.png differ diff --git a/sonar-server/src/main/webapp/images/trend/1-red-big.png b/sonar-server/src/main/webapp/images/trend/1-red-big.png old mode 100755 new mode 100644 index 874b1a84d1b..8a22090dbfb Binary files a/sonar-server/src/main/webapp/images/trend/1-red-big.png and b/sonar-server/src/main/webapp/images/trend/1-red-big.png differ diff --git a/sonar-server/src/main/webapp/images/trend/1-red.png b/sonar-server/src/main/webapp/images/trend/1-red.png old mode 100755 new mode 100644 index f85354264a0..7e33f58ed5f Binary files a/sonar-server/src/main/webapp/images/trend/1-red.png and b/sonar-server/src/main/webapp/images/trend/1-red.png differ diff --git a/sonar-server/src/main/webapp/images/trend/2-black-big.png b/sonar-server/src/main/webapp/images/trend/2-black-big.png old mode 100755 new mode 100644 index 1e8ad1e15d5..45b77e88456 Binary files a/sonar-server/src/main/webapp/images/trend/2-black-big.png and b/sonar-server/src/main/webapp/images/trend/2-black-big.png differ diff --git a/sonar-server/src/main/webapp/images/trend/2-black.png b/sonar-server/src/main/webapp/images/trend/2-black.png old mode 100755 new mode 100644 index 22a3a19b181..81605ed2514 Binary files a/sonar-server/src/main/webapp/images/trend/2-black.png and b/sonar-server/src/main/webapp/images/trend/2-black.png differ diff --git a/sonar-server/src/main/webapp/images/trend/2-green-big.png b/sonar-server/src/main/webapp/images/trend/2-green-big.png old mode 100755 new mode 100644 index 21e2a7958c4..37c3b68950a Binary files a/sonar-server/src/main/webapp/images/trend/2-green-big.png and b/sonar-server/src/main/webapp/images/trend/2-green-big.png differ diff --git a/sonar-server/src/main/webapp/images/trend/2-green.png b/sonar-server/src/main/webapp/images/trend/2-green.png old mode 100755 new mode 100644 index 59030cc5833..c8db4d566a7 Binary files a/sonar-server/src/main/webapp/images/trend/2-green.png and b/sonar-server/src/main/webapp/images/trend/2-green.png differ diff --git a/sonar-server/src/main/webapp/images/trend/2-red-big.png b/sonar-server/src/main/webapp/images/trend/2-red-big.png old mode 100755 new mode 100644 index 7b64f8005ab..d1682b865d3 Binary files a/sonar-server/src/main/webapp/images/trend/2-red-big.png and b/sonar-server/src/main/webapp/images/trend/2-red-big.png differ diff --git a/sonar-server/src/main/webapp/images/trend/2-red.png b/sonar-server/src/main/webapp/images/trend/2-red.png old mode 100755 new mode 100644 index 5ba6c24bd96..e580917b37b Binary files a/sonar-server/src/main/webapp/images/trend/2-red.png and b/sonar-server/src/main/webapp/images/trend/2-red.png differ