From f58b2afcaaf1977f02c590a8832bb67f77ee7be3 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 18 Jul 2015 19:38:52 +0200 Subject: changed switch widget --- art/md_switch_thumb_disable.svg | 156 ++++++++++++++++++++++++++++++++++ art/md_switch_thumb_off_normal.svg | 153 ++++++++++++++++++++++++++++++++++ art/md_switch_thumb_off_pressed.svg | 159 +++++++++++++++++++++++++++++++++++ art/md_switch_thumb_on_normal.svg | 146 ++++++++++++++++++++++++++++++++ art/md_switch_thumb_on_pressed.svg | 162 ++++++++++++++++++++++++++++++++++++ art/render.rb | 7 +- 6 files changed, 782 insertions(+), 1 deletion(-) create mode 100644 art/md_switch_thumb_disable.svg create mode 100644 art/md_switch_thumb_off_normal.svg create mode 100644 art/md_switch_thumb_off_pressed.svg create mode 100644 art/md_switch_thumb_on_normal.svg create mode 100644 art/md_switch_thumb_on_pressed.svg (limited to 'art') diff --git a/art/md_switch_thumb_disable.svg b/art/md_switch_thumb_disable.svg new file mode 100644 index 00000000..efd83c2d --- /dev/null +++ b/art/md_switch_thumb_disable.svg @@ -0,0 +1,156 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/art/md_switch_thumb_off_normal.svg b/art/md_switch_thumb_off_normal.svg new file mode 100644 index 00000000..25d1761d --- /dev/null +++ b/art/md_switch_thumb_off_normal.svg @@ -0,0 +1,153 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/art/md_switch_thumb_off_pressed.svg b/art/md_switch_thumb_off_pressed.svg new file mode 100644 index 00000000..002b4781 --- /dev/null +++ b/art/md_switch_thumb_off_pressed.svg @@ -0,0 +1,159 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/art/md_switch_thumb_on_normal.svg b/art/md_switch_thumb_on_normal.svg new file mode 100644 index 00000000..5e8f90f3 --- /dev/null +++ b/art/md_switch_thumb_on_normal.svg @@ -0,0 +1,146 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/art/md_switch_thumb_on_pressed.svg b/art/md_switch_thumb_on_pressed.svg new file mode 100644 index 00000000..e0331e7b --- /dev/null +++ b/art/md_switch_thumb_on_pressed.svg @@ -0,0 +1,162 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/art/render.rb b/art/render.rb index 698abea5..312dd06b 100755 --- a/art/render.rb +++ b/art/render.rb @@ -33,7 +33,12 @@ images = { 'ic_send_picture_online.svg' => ['ic_send_picture_online', 36], 'ic_send_picture_offline.svg' => ['ic_send_picture_offline', 36], 'ic_send_picture_away.svg' => ['ic_send_picture_away', 36], - 'ic_send_picture_dnd.svg' => ['ic_send_picture_dnd', 36] + 'ic_send_picture_dnd.svg' => ['ic_send_picture_dnd', 36], + 'md_switch_thumb_disable.svg' => ['switch_thumb_disable', 48], + 'md_switch_thumb_off_normal.svg' => ['switch_thumb_off_normal', 48], + 'md_switch_thumb_off_pressed.svg' => ['switch_thumb_off_pressed', 48], + 'md_switch_thumb_on_normal.svg' => ['switch_thumb_on_normal', 48], + 'md_switch_thumb_on_pressed.svg' => ['switch_thumb_on_pressed', 48], } images.each do |source, result| resolutions.each do |name, factor| -- cgit v1.2.3 From e6cb12dfe414497b4317820497985c110cb81864 Mon Sep 17 00:00:00 2001 From: Raphael Pohl Date: Sun, 19 Jul 2015 14:26:03 +0200 Subject: changed message bubble appearance --- art/message_bubble_received.svg | 165 ++++++++++++++++++++++++++++++++++++++++ art/message_bubble_sent.svg | 165 ++++++++++++++++++++++++++++++++++++++++ art/render.rb | 128 ++++++++++++++++++++++++------- 3 files changed, 432 insertions(+), 26 deletions(-) create mode 100644 art/message_bubble_received.svg create mode 100644 art/message_bubble_sent.svg (limited to 'art') diff --git a/art/message_bubble_received.svg b/art/message_bubble_received.svg new file mode 100644 index 00000000..4f415861 --- /dev/null +++ b/art/message_bubble_received.svg @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/art/message_bubble_sent.svg b/art/message_bubble_sent.svg new file mode 100644 index 00000000..90ad5091 --- /dev/null +++ b/art/message_bubble_sent.svg @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/art/render.rb b/art/render.rb index 312dd06b..926c7544 100755 --- a/art/render.rb +++ b/art/render.rb @@ -1,11 +1,15 @@ #!/bin/env ruby -resolutions={ - 'mdpi'=> 1, + +require 'xml' + +resolutions = { + 'mdpi' => 1, 'hdpi' => 1.5, 'xhdpi' => 2, 'xxhdpi' => 3, 'xxxhdpi' => 4, } + images = { 'conversations_baloon.svg' => ['ic_launcher', 48], 'conversations_mono.svg' => ['ic_notification', 24], @@ -14,38 +18,110 @@ images = { 'ic_send_text_online.svg' => ['ic_send_text_online', 36], 'ic_send_text_away.svg' => ['ic_send_text_away', 36], 'ic_send_text_dnd.svg' => ['ic_send_text_dnd', 36], - 'ic_send_photo_online.svg' => ['ic_send_photo_online', 36], - 'ic_send_photo_offline.svg' => ['ic_send_photo_offline', 36], - 'ic_send_photo_away.svg' => ['ic_send_photo_away', 36], - 'ic_send_photo_dnd.svg' => ['ic_send_photo_dnd', 36], + 'ic_send_photo_online.svg' => ['ic_send_photo_online', 36], + 'ic_send_photo_offline.svg' => ['ic_send_photo_offline', 36], + 'ic_send_photo_away.svg' => ['ic_send_photo_away', 36], + 'ic_send_photo_dnd.svg' => ['ic_send_photo_dnd', 36], 'ic_send_location_online.svg' => ['ic_send_location_online', 36], - 'ic_send_location_offline.svg' => ['ic_send_location_offline', 36], - 'ic_send_location_away.svg' => ['ic_send_location_away', 36], - 'ic_send_location_dnd.svg' => ['ic_send_location_dnd', 36], + 'ic_send_location_offline.svg' => ['ic_send_location_offline', 36], + 'ic_send_location_away.svg' => ['ic_send_location_away', 36], + 'ic_send_location_dnd.svg' => ['ic_send_location_dnd', 36], 'ic_send_voice_online.svg' => ['ic_send_voice_online', 36], - 'ic_send_voice_offline.svg' => ['ic_send_voice_offline', 36], - 'ic_send_voice_away.svg' => ['ic_send_voice_away', 36], - 'ic_send_voice_dnd.svg' => ['ic_send_voice_dnd', 36], + 'ic_send_voice_offline.svg' => ['ic_send_voice_offline', 36], + 'ic_send_voice_away.svg' => ['ic_send_voice_away', 36], + 'ic_send_voice_dnd.svg' => ['ic_send_voice_dnd', 36], 'ic_send_cancel_online.svg' => ['ic_send_cancel_online', 36], - 'ic_send_cancel_offline.svg' => ['ic_send_cancel_offline', 36], - 'ic_send_cancel_away.svg' => ['ic_send_cancel_away', 36], - 'ic_send_cancel_dnd.svg' => ['ic_send_cancel_dnd', 36], - 'ic_send_picture_online.svg' => ['ic_send_picture_online', 36], - 'ic_send_picture_offline.svg' => ['ic_send_picture_offline', 36], - 'ic_send_picture_away.svg' => ['ic_send_picture_away', 36], - 'ic_send_picture_dnd.svg' => ['ic_send_picture_dnd', 36], + 'ic_send_cancel_offline.svg' => ['ic_send_cancel_offline', 36], + 'ic_send_cancel_away.svg' => ['ic_send_cancel_away', 36], + 'ic_send_cancel_dnd.svg' => ['ic_send_cancel_dnd', 36], + 'ic_send_picture_online.svg' => ['ic_send_picture_online', 36], + 'ic_send_picture_offline.svg' => ['ic_send_picture_offline', 36], + 'ic_send_picture_away.svg' => ['ic_send_picture_away', 36], + 'ic_send_picture_dnd.svg' => ['ic_send_picture_dnd', 36], 'md_switch_thumb_disable.svg' => ['switch_thumb_disable', 48], 'md_switch_thumb_off_normal.svg' => ['switch_thumb_off_normal', 48], 'md_switch_thumb_off_pressed.svg' => ['switch_thumb_off_pressed', 48], 'md_switch_thumb_on_normal.svg' => ['switch_thumb_on_normal', 48], 'md_switch_thumb_on_pressed.svg' => ['switch_thumb_on_pressed', 48], + 'message_bubble_received.svg' => ['message_bubble_received.9', 0], + 'message_bubble_sent.svg' => ['message_bubble_sent.9', 0], } -images.each do |source, result| - resolutions.each do |name, factor| - size = factor * result[1] - path = "../src/main/res/drawable-#{name}/#{result[0]}.png" - cmd = "inkscape -e #{path} -C -h #{size} -w #{size} #{source}" - puts cmd - system cmd + +# Executable paths for Mac OSX +# "/Applications/Inkscape.app/Contents/Resources/bin/inkscape" + +inkscape = "inkscape" +imagemagick = "convert" + +def execute_cmd(cmd) + puts cmd + system cmd +end + +images.each do |source_filename, settings| + svg_content = File.read(source_filename) + + svg = XML::Document.string(svg_content) + base_width = svg.root["width"].to_i + base_height = svg.root["height"].to_i + + guides = svg.find(".//sodipodi:guide") + + resolutions.each do |resolution, factor| + output_filename, base_size = settings + + if base_size > 0 + width = factor * base_size + height = factor * base_size + else + width = factor * base_width + height = factor * base_height + end + + path = "../src/main/res/drawable-#{resolution}/#{output_filename}.png" + execute_cmd "#{inkscape} -f #{source_filename} -z -C -w #{width} -h #{height} -e #{path}" + + top = [] + right = [] + bottom = [] + left = [] + + guides.each do |guide| + orientation = guide["orientation"] + x, y = guide["position"].split(",") + x, y = x.to_i, y.to_i + + if orientation == "1,0" and y == base_height + top.push(x * factor) + end + + if orientation == "0,1" and x == base_width + right.push((base_height - y) * factor) + end + + if orientation == "1,0" and y == 0 + bottom.push(x * factor) + end + + if orientation == "0,1" and x == 0 + left.push((base_height - y) * factor) + end + end + + next if top.length != 2 + next if right.length != 2 + next if bottom.length != 2 + next if left.length != 2 + + execute_cmd "#{imagemagick} -background none PNG32:#{path} -gravity center -extent #{width+2}x#{height+2} PNG32:#{path}" + + draw_format = "-draw \"rectangle %d,%d %d,%d\"" + top_line = draw_format % [top.min + 1, 0, top.max, 0] + right_line = draw_format % [width + 1, right.min + 1, width + 1, right.max] + bottom_line = draw_format % [bottom.min + 1, height + 1, bottom.max, height + 1] + left_line = draw_format % [0, left.min + 1, 0, left.max] + draws = "#{top_line} #{right_line} #{bottom_line} #{left_line}" + + execute_cmd "#{imagemagick} -background none PNG32:#{path} -fill black -stroke none #{draws} PNG32:#{path}" end end -- cgit v1.2.3 From 0d679a7abbaadaf8eb307b5653fbbd0fdae7538e Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 21 Jul 2015 18:29:24 +0200 Subject: decreased saturation of received message bubbles by 25 units --- art/message_bubble_received.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'art') diff --git a/art/message_bubble_received.svg b/art/message_bubble_received.svg index 4f415861..815892ed 100644 --- a/art/message_bubble_received.svg +++ b/art/message_bubble_received.svg @@ -140,7 +140,7 @@ transform="translate(0,-2)"> + style="fill:#4b9b4a;fill-opacity:1;stroke:none;fill-rule:nonzero;filter:url(#filter3811)"> Date: Wed, 29 Jul 2015 02:01:28 +0200 Subject: add new received message bubble drawable --- art/message_bubble_received_warning.svg | 165 ++++++++++++++++++++++++++++++++ art/render.rb | 1 + 2 files changed, 166 insertions(+) create mode 100644 art/message_bubble_received_warning.svg (limited to 'art') diff --git a/art/message_bubble_received_warning.svg b/art/message_bubble_received_warning.svg new file mode 100644 index 00000000..9353492b --- /dev/null +++ b/art/message_bubble_received_warning.svg @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/art/render.rb b/art/render.rb index 926c7544..dc55c327 100755 --- a/art/render.rb +++ b/art/render.rb @@ -44,6 +44,7 @@ images = { 'md_switch_thumb_on_normal.svg' => ['switch_thumb_on_normal', 48], 'md_switch_thumb_on_pressed.svg' => ['switch_thumb_on_pressed', 48], 'message_bubble_received.svg' => ['message_bubble_received.9', 0], + 'message_bubble_received_warning.svg' => ['message_bubble_received_warning.9', 0], 'message_bubble_sent.svg' => ['message_bubble_sent.9', 0], } -- cgit v1.2.3 From e8bcd39166040a0a8978ac582896ef137cd5dd5e Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 9 Aug 2015 22:50:35 +0200 Subject: OMEMO logo --- art/omemo_logo.svg | 273 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 273 insertions(+) create mode 100644 art/omemo_logo.svg (limited to 'art') diff --git a/art/omemo_logo.svg b/art/omemo_logo.svg new file mode 100644 index 00000000..ca20a5b9 --- /dev/null +++ b/art/omemo_logo.svg @@ -0,0 +1,273 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3