mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 15:23:00 +00:00 
			
		
		
		
	Clean up getLicenseStylesheet().
This commit is contained in:
		 Isira Seneviratne
					Isira Seneviratne
				
			
				
					committed by
					
						 Stypox
						Stypox
					
				
			
			
				
	
			
			
			 Stypox
						Stypox
					
				
			
						parent
						
							a9095ca2ad
						
					
				
				
					commit
					4b7de86a92
				
			| @@ -36,21 +36,17 @@ private fun getFormattedLicense(context: Context, license: License): String { | ||||
|  */ | ||||
| private fun getLicenseStylesheet(context: Context): String { | ||||
|     val isLightTheme = ThemeHelper.isLightThemeSelected(context) | ||||
|     return ( | ||||
|             "body{padding:12px 15px;margin:0;" + "background:#" + getHexRGBColor( | ||||
|                 context, | ||||
|                 if (isLightTheme) R.color.light_license_background_color | ||||
|                 else R.color.dark_license_background_color | ||||
|             ) + ";" + "color:#" + getHexRGBColor( | ||||
|                 context, | ||||
|                 if (isLightTheme) R.color.light_license_text_color | ||||
|                 else R.color.dark_license_text_color | ||||
|             ) + "}" + "a[href]{color:#" + getHexRGBColor( | ||||
|                 context, | ||||
|                 if (isLightTheme) R.color.light_youtube_primary_color | ||||
|                 else R.color.dark_youtube_primary_color | ||||
|             ) + "}" + "pre{white-space:pre-wrap}" | ||||
|     val licenseBackgroundColor = getHexRGBColor( | ||||
|         context, if (isLightTheme) R.color.light_license_background_color else R.color.dark_license_background_color | ||||
|     ) | ||||
|     val licenseTextColor = getHexRGBColor( | ||||
|         context, if (isLightTheme) R.color.light_license_text_color else R.color.dark_license_text_color | ||||
|     ) | ||||
|     val youtubePrimaryColor = getHexRGBColor( | ||||
|         context, if (isLightTheme) R.color.light_youtube_primary_color else R.color.dark_youtube_primary_color | ||||
|     ) | ||||
|     return "body{padding:12px 15px;margin:0;background:#$licenseBackgroundColor;color:#$licenseTextColor}" + | ||||
|         "a[href]{color:#$youtubePrimaryColor}pre{white-space:pre-wrap}" | ||||
| } | ||||
|  | ||||
| /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user