@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * |
| 91 | 91 | * @param $app app name |
| 92 | 92 | * @param $image image file name |
| 93 | - * @return StreamResponse|DataResponse |
|
| 93 | + * @return DataDisplayResponse |
|
| 94 | 94 | */ |
| 95 | 95 | public function getThemedIcon($app, $image) { |
| 96 | 96 | $image = $this->getAppImage($app, $image); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | * @NoCSRFRequired |
| 108 | 108 | * |
| 109 | 109 | * @param $app app name |
| 110 | - * @return StreamResponse|DataResponse |
|
| 110 | + * @return DataDisplayResponse |
|
| 111 | 111 | */ |
| 112 | 112 | public function getFavicon($app) { |
| 113 | 113 | // TODO: we need caching here |
@@ -226,6 +226,11 @@ discard block |
||
| 226 | 226 | } |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | + /** |
|
| 230 | + * @param string $svg |
|
| 231 | + * |
|
| 232 | + * @return string |
|
| 233 | + */ |
|
| 229 | 234 | private function svgInvert($svg) { |
| 230 | 235 | $svg = preg_replace('/#(f{3,6})/i', '#REPLACECOLOR', $svg); |
| 231 | 236 | $svg = preg_replace('/#(0{3,6})/i', '#ffffff', $svg); |
@@ -233,6 +238,12 @@ discard block |
||
| 233 | 238 | return $svg; |
| 234 | 239 | } |
| 235 | 240 | |
| 241 | + /** |
|
| 242 | + * @param string $svg |
|
| 243 | + * @param string $color |
|
| 244 | + * |
|
| 245 | + * @return string |
|
| 246 | + */ |
|
| 236 | 247 | private function colorizeSvg($svg, $color) { |
| 237 | 248 | $svg = preg_replace('/#0082c9/i', $color, $svg); |
| 238 | 249 | return $svg; |
@@ -34,7 +34,6 @@ |
||
| 34 | 34 | use OCP\IL10N; |
| 35 | 35 | use OCP\IRequest; |
| 36 | 36 | use OCA\Theming\Util; |
| 37 | -use OCP\IURLGenerator; |
|
| 38 | 37 | use Imagick; |
| 39 | 38 | use ImagickPixel; |
| 40 | 39 | |