app_images.rs (7573B)
1 use eframe::icon_data::from_png_bytes; 2 use egui::{include_image, Color32, IconData, Image}; 3 4 pub fn app_icon() -> IconData { 5 from_png_bytes(include_bytes!("../../../assets/damus-app-icon.png")).expect("icon") 6 } 7 8 pub fn add_account_image() -> Image<'static> { 9 Image::new(include_image!( 10 "../../../assets/icons/add_account_icon_4x.png" 11 )) 12 } 13 14 pub fn profile_image() -> Image<'static> { 15 Image::new(include_image!("../../../assets/icons/profile.png")) 16 } 17 18 pub fn accounts_image() -> Image<'static> { 19 Image::new(include_image!("../../../assets/icons/accounts_4x.png")) 20 } 21 22 pub fn cln_image() -> Image<'static> { 23 Image::new(include_image!("../../../assets/icons/clnlogo.svg")) 24 } 25 26 pub fn add_column_dark_image() -> Image<'static> { 27 Image::new(include_image!( 28 "../../../assets/icons/add_column_dark_4x.png" 29 )) 30 } 31 32 pub fn add_column_light_image() -> Image<'static> { 33 Image::new(include_image!( 34 "../../../assets/icons/add_column_light_4x.png" 35 )) 36 } 37 38 pub fn add_relay_image() -> Image<'static> { 39 Image::new(include_image!( 40 "../../../assets/icons/add_relay_icon_4x.png" 41 )) 42 } 43 44 pub fn algo_image() -> Image<'static> { 45 Image::new(include_image!("../../../assets/icons/algo.png")) 46 } 47 48 pub fn columns_image() -> Image<'static> { 49 Image::new(include_image!("../../../assets/icons/columns_80.png")) 50 } 51 52 pub fn connected_image() -> Image<'static> { 53 Image::new(include_image!( 54 "../../../assets/icons/connected_icon_4x.png" 55 )) 56 } 57 58 pub fn connecting_image() -> Image<'static> { 59 Image::new(include_image!( 60 "../../../assets/icons/connecting_icon_4x.png" 61 )) 62 } 63 64 pub fn damus_image() -> Image<'static> { 65 Image::new(include_image!("../../../assets/damus_rounded_80.png")) 66 } 67 68 pub fn delete_dark_image() -> Image<'static> { 69 Image::new(include_image!( 70 "../../../assets/icons/column_delete_icon_4x.png" 71 )) 72 } 73 74 pub fn delete_light_image() -> Image<'static> { 75 Image::new(include_image!( 76 "../../../assets/icons/column_delete_icon_light_4x.png" 77 )) 78 } 79 80 pub fn disconnected_image() -> Image<'static> { 81 Image::new(include_image!( 82 "../../../assets/icons/disconnected_icon_4x.png" 83 )) 84 } 85 86 pub fn edit_dark_image() -> Image<'static> { 87 Image::new(include_image!( 88 "../../../assets/icons/edit_icon_4x_dark.png" 89 )) 90 } 91 92 pub fn eye_dark_image() -> Image<'static> { 93 Image::new(include_image!("../../../assets/icons/eye-dark.png")) 94 } 95 96 pub fn eye_light_image() -> Image<'static> { 97 Image::new(include_image!("../../../assets/icons/eye-light.png")) 98 } 99 100 pub fn eye_slash_dark_image() -> Image<'static> { 101 Image::new(include_image!("../../../assets/icons/eye-slash-dark.png")) 102 } 103 104 pub fn eye_slash_light_image() -> Image<'static> { 105 Image::new(include_image!("../../../assets/icons/eye-slash-light.png")) 106 } 107 108 pub fn filled_zap_image() -> Image<'static> { 109 Image::new(include_image!("../../../assets/icons/filled_zap_icon.svg")) 110 } 111 112 pub fn hashtag_image() -> Image<'static> { 113 Image::new(include_image!("../../../assets/icons/hashtag_icon_4x.png")) 114 } 115 116 pub fn help_dark_image() -> Image<'static> { 117 Image::new(include_image!( 118 "../../../assets/icons/help_icon_dark_4x.png" 119 )) 120 } 121 122 pub fn help_light_image() -> Image<'static> { 123 Image::new(include_image!( 124 "../../../assets/icons/help_icon_inverted_4x.png" 125 )) 126 } 127 128 pub fn home_light_image() -> Image<'static> { 129 home_dark_image().tint(Color32::BLACK) 130 } 131 132 pub fn home_dark_image() -> Image<'static> { 133 Image::new(include_image!("../../../assets/icons/home-toolbar.png")) 134 } 135 136 pub fn home_image() -> Image<'static> { 137 Image::new(include_image!( 138 "../../../assets/icons/home_icon_dark_4x.png" 139 )) 140 } 141 142 pub fn key_image() -> Image<'static> { 143 Image::new(include_image!("../../../assets/icons/key_4x.png")) 144 } 145 146 pub fn link_dark_image() -> Image<'static> { 147 Image::new(include_image!("../../../assets/icons/links_4x.png")) 148 } 149 150 pub fn link_light_image() -> Image<'static> { 151 link_dark_image().tint(Color32::BLACK) 152 } 153 154 pub fn new_message_image() -> Image<'static> { 155 Image::new(include_image!("../../../assets/icons/new-message.svg")) 156 } 157 158 pub fn chat_dark_image() -> Image<'static> { 159 new_message_image() 160 } 161 162 pub fn chat_light_image() -> Image<'static> { 163 new_message_image().tint(Color32::BLACK) 164 } 165 166 pub fn new_deck_image() -> Image<'static> { 167 Image::new(include_image!( 168 "../../../assets/icons/new_deck_icon_4x_dark.png" 169 )) 170 } 171 172 pub fn notifications_image(dark_mode: bool) -> Image<'static> { 173 if dark_mode { 174 crate::app_images::notifications_dark_image() 175 } else { 176 crate::app_images::notifications_light_image() 177 } 178 } 179 180 pub fn notifications_light_image() -> Image<'static> { 181 notifications_dark_image().tint(Color32::BLACK) 182 } 183 184 pub fn notifications_dark_image() -> Image<'static> { 185 Image::new(include_image!( 186 "../../../assets/icons/notifications_dark_4x.png" 187 )) 188 } 189 190 pub fn repost_dark_image() -> Image<'static> { 191 Image::new(include_image!("../../../assets/icons/repost_icon_4x.png")) 192 } 193 194 pub fn repost_light_image() -> Image<'static> { 195 Image::new(include_image!("../../../assets/icons/repost_light_4x.png")) 196 } 197 198 pub fn repost_image(dark_mode: bool) -> Image<'static> { 199 if dark_mode { 200 repost_dark_image() 201 } else { 202 repost_light_image() 203 } 204 } 205 206 pub fn reply_dark_image() -> Image<'static> { 207 Image::new(include_image!("../../../assets/icons/reply.png")) 208 } 209 210 pub fn reply_light_image() -> Image<'static> { 211 Image::new(include_image!("../../../assets/icons/reply-dark.png")) 212 } 213 214 pub fn add_column_individual_image() -> Image<'static> { 215 Image::new(include_image!("../../../assets/icons/profile_icon_4x.png")) 216 } 217 218 pub fn settings_dark_image() -> Image<'static> { 219 Image::new(include_image!("../../../assets/icons/settings_dark_4x.png")) 220 } 221 222 pub fn settings_light_image() -> Image<'static> { 223 Image::new(include_image!( 224 "../../../assets/icons/settings_light_4x.png" 225 )) 226 } 227 228 pub fn universe_image() -> Image<'static> { 229 Image::new(include_image!( 230 "../../../assets/icons/universe_icon_dark_4x.png" 231 )) 232 } 233 234 pub fn verified_image() -> Image<'static> { 235 Image::new(include_image!("../../../assets/icons/verified_4x.png")) 236 } 237 238 pub fn media_upload_dark_image() -> Image<'static> { 239 Image::new(include_image!( 240 "../../../assets/icons/media_upload_dark_4x.png" 241 )) 242 } 243 244 pub fn media_upload_light_image() -> Image<'static> { 245 media_upload_dark_image().tint(Color32::BLACK) 246 } 247 248 pub fn wallet_dark_image() -> Image<'static> { 249 Image::new(include_image!("../../../assets/icons/wallet-icon.svg")) 250 } 251 252 pub fn wallet_light_image() -> Image<'static> { 253 wallet_dark_image().tint(Color32::BLACK) 254 } 255 256 pub fn zap_dark_image() -> Image<'static> { 257 Image::new(include_image!("../../../assets/icons/zap_4x.png")) 258 } 259 260 pub fn zap_light_image() -> Image<'static> { 261 zap_dark_image().tint(Color32::BLACK) 262 } 263 264 pub fn like_image_filled() -> Image<'static> { 265 Image::new(include_image!( 266 "../../../assets/icons/like_icon_filled_4x.png" 267 )) 268 } 269 270 pub fn like_image() -> Image<'static> { 271 Image::new(include_image!("../../../assets/icons/like_icon_4x.png")) 272 } 273 274 pub fn copy_to_clipboard_image() -> Image<'static> { 275 Image::new(include_image!( 276 "../../../assets/icons/copy-to-clipboard.svg" 277 )) 278 } 279 280 pub fn copy_to_clipboard_dark_image() -> Image<'static> { 281 copy_to_clipboard_image().tint(Color32::BLACK) 282 } 283 284 pub fn sparkle_image() -> Image<'static> { 285 Image::new(include_image!("../../../assets/icons/sparkle.svg")) 286 }