From dba037466ee8316f101841736c20136be79379b7 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Thu, 9 Apr 2026 20:35:52 -0500 Subject: [PATCH] refactor(icons): migrate to self-hosted VectorDrawable XMLs via MeshtasticIcons (#5030) --- app/build.gradle.kts | 1 - .../kotlin/org/meshtastic/app/map/MapView.kt | 75 +++-- .../app/map/component/DownloadButton.kt | 6 +- .../app/map/component/EditWaypointDialog.kt | 13 +- .../meshtastic/app/map/component/MapButton.kt | 6 +- .../kotlin/org/meshtastic/app/map/MapView.kt | 55 +-- .../app/map/component/CustomMapLayersSheet.kt | 18 +- .../CustomTileProviderManagerSheet.kt | 10 +- .../app/map/component/EditWaypointDialog.kt | 10 +- .../app/map/component/MapControlsOverlay.kt | 33 +- .../app/map/component/MapFilterDropdown.kt | 20 +- .../app/map/component/MapTypeDropdown.kt | 13 +- .../main/kotlin/KmpFeatureConventionPlugin.kt | 3 +- core/barcode/build.gradle.kts | 1 - .../core/barcode/BarcodeScannerProvider.kt | 6 +- .../composeResources/drawable/ic_abc.xml | 9 + .../drawable/ic_account_circle.xml | 9 + .../composeResources/drawable/ic_add.xml | 9 + .../composeResources/drawable/ic_add_link.xml | 9 + .../drawable/ic_add_reaction.xml | 9 + .../drawable/ic_admin_panel_settings.xml | 9 + .../composeResources/drawable/ic_air.xml | 9 + .../drawable/ic_alt_route.xml | 10 + .../composeResources/drawable/ic_android.xml | 9 + .../drawable/ic_app_settings_alt.xml | 9 + .../drawable/ic_arrow_back.xml | 10 + .../drawable/ic_arrow_circle_up.xml | 9 + .../drawable/ic_arrow_downward.xml | 9 + .../drawable/ic_bar_chart.xml | 9 + .../drawable/ic_battery_horiz_000.xml | 9 + .../drawable/ic_battery_question_mark.xml | 10 + .../composeResources/drawable/ic_bedtime.xml | 9 + .../drawable/ic_bluetooth.xml | 9 + .../drawable/ic_bluetooth_connected.xml | 9 + .../drawable/ic_bluetooth_searching.xml | 9 + .../composeResources/drawable/ic_blur_on.xml | 9 + .../composeResources/drawable/ic_bolt.xml | 9 + .../drawable/ic_bug_report.xml | 9 + .../composeResources/drawable/ic_cached.xml | 9 + .../drawable/ic_calendar_month.xml | 9 + .../drawable/ic_cell_tower.xml | 9 + .../drawable/ic_charging_station.xml | 9 + .../drawable/ic_chat_bubble_outline.xml | 9 + .../composeResources/drawable/ic_check.xml | 9 + .../drawable/ic_check_circle.xml | 9 + .../drawable/ic_check_circle_outline.xml | 9 + .../drawable/ic_chevron_right.xml | 10 + .../drawable/ic_cleaning_services.xml | 9 + .../composeResources/drawable/ic_clear.xml | 9 + .../composeResources/drawable/ic_close.xml | 9 + .../composeResources/drawable/ic_cloud.xml | 9 + .../drawable/ic_cloud_done.xml | 9 + .../drawable/ic_cloud_download.xml | 9 + .../drawable/ic_cloud_sync.xml | 9 + .../drawable/ic_cloud_upload.xml | 9 + .../composeResources/drawable/ic_compress.xml | 9 + .../drawable/ic_content_copy.xml | 10 + .../drawable/ic_cruelty_free.xml | 9 + .../drawable/ic_dangerous.xml | 9 + .../drawable/ic_data_array.xml | 9 + .../drawable/ic_data_usage.xml | 9 + .../composeResources/drawable/ic_delete.xml | 9 + .../drawable/ic_delete_outline.xml | 9 + .../drawable/ic_display_settings.xml | 9 + .../drawable/ic_do_disturb_on.xml | 9 + .../composeResources/drawable/ic_done.xml | 9 + .../composeResources/drawable/ic_download.xml | 9 + .../drawable/ic_drag_handle.xml | 9 + .../composeResources/drawable/ic_edit.xml | 9 + .../drawable/ic_electric_bolt.xml | 9 + .../drawable/ic_elevation.xml | 9 + .../composeResources/drawable/ic_error.xml | 9 + .../drawable/ic_error_outline.xml | 9 + .../drawable/ic_expand_less.xml | 9 + .../drawable/ic_expand_more.xml | 9 + .../composeResources/drawable/ic_explore.xml | 9 + .../drawable/ic_fast_forward.xml | 9 + .../drawable/ic_file_download.xml | 9 + .../drawable/ic_filter_alt.xml | 9 + .../drawable/ic_filter_alt_off.xml | 9 + .../drawable/ic_filter_list.xml | 9 + .../drawable/ic_filter_list_off.xml | 9 + .../drawable/ic_fingerprint.xml | 9 + .../composeResources/drawable/ic_folder.xml | 9 + .../drawable/ic_folder_open.xml | 9 + .../drawable/ic_fork_left.xml | 9 + .../drawable/ic_format_paint.xml | 9 + .../drawable/ic_format_quote.xml | 9 + .../composeResources/drawable/ic_forum.xml | 9 + .../composeResources/drawable/ic_forward.xml | 10 + .../drawable/ic_gps_fixed.xml | 9 + .../composeResources/drawable/ic_gps_off.xml | 9 + .../drawable/ic_graphic_eq.xml | 9 + .../composeResources/drawable/ic_grass.xml | 9 + .../composeResources/drawable/ic_group.xml | 9 + .../composeResources/drawable/ic_groups.xml | 9 + .../composeResources/drawable/ic_height.xml | 9 + .../composeResources/drawable/ic_history.xml | 9 + .../composeResources/drawable/ic_home.xml | 9 + .../drawable/ic_how_to_reg.xml | 9 + .../composeResources/drawable/ic_hub.xml | 9 + .../composeResources/drawable/ic_icecream.xml | 9 + .../composeResources/drawable/ic_info.xml | 9 + .../composeResources/drawable/ic_key_off.xml | 9 + .../drawable/ic_keyboard_arrow_down.xml | 9 + .../drawable/ic_keyboard_arrow_right.xml | 10 + .../drawable/ic_keyboard_arrow_up.xml | 9 + .../composeResources/drawable/ic_lan.xml | 9 + .../composeResources/drawable/ic_language.xml | 9 + .../composeResources/drawable/ic_layers.xml | 9 + .../composeResources/drawable/ic_lens.xml | 9 + .../drawable/ic_light_mode.xml | 9 + .../drawable/ic_line_axis.xml | 9 + .../composeResources/drawable/ic_link.xml | 9 + .../composeResources/drawable/ic_link_off.xml | 9 + .../composeResources/drawable/ic_list.xml | 10 + .../drawable/ic_location_disabled.xml | 9 + .../composeResources/drawable/ic_lock.xml | 9 + .../drawable/ic_lock_open.xml | 9 + .../composeResources/drawable/ic_map.xml | 9 + .../drawable/ic_mark_chat_read.xml | 9 + .../composeResources/drawable/ic_memory.xml | 9 + .../composeResources/drawable/ic_message.xml | 10 + .../drawable/ic_military_tech.xml | 9 + .../drawable/ic_more_vert.xml | 9 + .../drawable/ic_my_location.xml | 9 + .../drawable/ic_navigation.xml | 9 + .../composeResources/drawable/ic_near_me.xml | 9 + .../composeResources/drawable/ic_nfc.xml | 9 + .../composeResources/drawable/ic_no_cell.xml | 9 + .../drawable/ic_no_device.xml | 9 + .../composeResources/drawable/ic_nodes.xml | 9 + .../composeResources/drawable/ic_notes.xml | 10 + .../drawable/ic_notifications.xml | 9 + .../composeResources/drawable/ic_numbers.xml | 9 + .../drawable/ic_offline_share.xml | 10 + .../composeResources/drawable/ic_output.xml | 9 + .../composeResources/drawable/ic_people.xml | 9 + .../drawable/ic_perm_scan_wifi.xml | 9 + .../composeResources/drawable/ic_person.xml | 9 + .../drawable/ic_person_add.xml | 9 + .../drawable/ic_person_off.xml | 9 + .../drawable/ic_person_search.xml | 9 + .../drawable/ic_phone_android.xml | 9 + .../composeResources/drawable/ic_pin_drop.xml | 9 + .../composeResources/drawable/ic_place.xml | 9 + .../drawable/ic_play_arrow.xml | 9 + .../composeResources/drawable/ic_podcasts.xml | 9 + .../composeResources/drawable/ic_power.xml | 9 + .../drawable/ic_power_settings_new.xml | 9 + .../composeResources/drawable/ic_qr_code.xml | 9 + .../drawable/ic_qr_code_2.xml | 9 + .../drawable/ic_qr_code_scanner.xml | 9 + .../drawable/ic_radio_button_unchecked.xml | 9 + .../composeResources/drawable/ic_refresh.xml | 9 + .../composeResources/drawable/ic_reply.xml | 10 + .../drawable/ic_restart_alt.xml | 9 + .../composeResources/drawable/ic_restore.xml | 10 + .../composeResources/drawable/ic_route.xml | 9 + .../composeResources/drawable/ic_router.xml | 9 + .../drawable/ic_satellite_alt.xml | 9 + .../composeResources/drawable/ic_save.xml | 9 + .../composeResources/drawable/ic_scale.xml | 9 + .../composeResources/drawable/ic_schedule.xml | 9 + .../composeResources/drawable/ic_search.xml | 9 + .../composeResources/drawable/ic_security.xml | 9 + .../drawable/ic_select_all.xml | 9 + .../composeResources/drawable/ic_send.xml | 10 + .../composeResources/drawable/ic_sensors.xml | 9 + .../composeResources/drawable/ic_settings.xml | 9 + .../drawable/ic_settings_ethernet.xml | 9 + .../drawable/ic_settings_input_antenna.xml | 9 + .../drawable/ic_settings_remote.xml | 9 + .../composeResources/drawable/ic_share.xml | 9 + .../drawable/ic_signal_cellular_0_bar.xml | 9 + .../drawable/ic_signal_cellular_1_bar.xml | 9 + .../drawable/ic_signal_cellular_2_bar.xml | 9 + .../drawable/ic_signal_cellular_3_bar.xml | 9 + .../drawable/ic_signal_cellular_4_bar.xml | 9 + .../drawable/ic_signal_cellular_alt.xml | 9 + .../drawable/ic_signal_cellular_alt_1_bar.xml | 9 + .../drawable/ic_signal_cellular_alt_2_bar.xml | 9 + .../drawable/ic_signal_cellular_off.xml | 9 + .../drawable/ic_social_distance.xml | 9 + .../drawable/ic_soil_moisture.xml | 27 +- .../drawable/ic_soil_temperature.xml | 27 +- .../composeResources/drawable/ic_sort.xml | 10 + .../drawable/ic_speaker_notes.xml | 10 + .../drawable/ic_speaker_notes_off.xml | 9 + .../drawable/ic_speaker_phone.xml | 9 + .../composeResources/drawable/ic_speed.xml | 9 + .../drawable/ic_ssid_chart.xml | 9 + .../drawable/ic_stacked_line_chart.xml | 9 + .../composeResources/drawable/ic_star.xml | 9 + .../drawable/ic_star_border.xml | 9 + .../composeResources/drawable/ic_storage.xml | 9 + .../drawable/ic_system_update.xml | 9 + .../composeResources/drawable/ic_terminal.xml | 9 + .../drawable/ic_thermostat.xml | 10 + .../composeResources/drawable/ic_thumb_up.xml | 9 + .../drawable/ic_trip_origin.xml | 9 + .../composeResources/drawable/ic_tsunami.xml | 9 + .../composeResources/drawable/ic_tune.xml | 9 + .../composeResources/drawable/ic_upload.xml | 9 + .../composeResources/drawable/ic_usb.xml | 9 + .../composeResources/drawable/ic_usb_off.xml | 9 + .../composeResources/drawable/ic_verified.xml | 9 + .../drawable/ic_visibility.xml | 9 + .../drawable/ic_visibility_off.xml | 9 + .../drawable/ic_volume_mute.xml | 10 + .../drawable/ic_volume_off.xml | 10 + .../drawable/ic_volume_up.xml | 10 + .../composeResources/drawable/ic_warning.xml | 9 + .../drawable/ic_water_drop.xml | 9 + .../drawable/ic_waving_hand.xml | 9 + .../composeResources/drawable/ic_wifi.xml | 9 + .../drawable/ic_wifi_channel.xml | 9 + .../composeResources/drawable/ic_work.xml | 9 + core/ui/build.gradle.kts | 1 - .../core/ui/component/ConnectionsNavIcon.kt | 21 +- .../core/ui/component/CopyIconButton.kt | 6 +- .../core/ui/component/EditBase64Preference.kt | 10 +- .../core/ui/component/EditListPreference.kt | 6 +- .../ui/component/EditPasswordPreference.kt | 7 +- .../core/ui/component/EditTextPreference.kt | 6 +- .../meshtastic/core/ui/component/HopsInfo.kt | 4 +- .../meshtastic/core/ui/component/ImportFab.kt | 13 +- .../meshtastic/core/ui/component/ListItem.kt | 16 +- .../core/ui/component/LoraSignalIndicator.kt | 30 +- .../core/ui/component/MainAppBar.kt | 6 +- .../core/ui/component/MaterialBatteryInfo.kt | 5 +- .../component/MaterialBluetoothSignalInfo.kt | 9 +- .../meshtastic/core/ui/component/MenuFAB.kt | 8 +- .../ui/component/MeshtasticNavigationSuite.kt | 3 +- .../core/ui/component/NodeKeyStatusIcon.kt | 27 +- .../meshtastic/core/ui/component/QrDialog.kt | 9 +- .../core/ui/component/SecurityIcon.kt | 47 +-- .../core/ui/component/SignalInfo.kt | 3 +- .../core/ui/component/TelemetryInfo.kt | 14 +- .../core/ui/component/TransportIcon.kt | 4 +- .../core/ui/emoji/EmojiPickerDialog.kt | 10 +- .../org/meshtastic/core/ui/icon/Actions.kt | 148 +++++--- .../org/meshtastic/core/ui/icon/Battery.kt | 169 +--------- .../org/meshtastic/core/ui/icon/Counter.kt | 38 +-- .../org/meshtastic/core/ui/icon/Device.kt | 197 +++-------- .../org/meshtastic/core/ui/icon/Elevation.kt | 83 +---- .../org/meshtastic/core/ui/icon/Hardware.kt | 48 ++- .../kotlin/org/meshtastic/core/ui/icon/Map.kt | 139 +++----- .../org/meshtastic/core/ui/icon/Messages.kt | 115 ++----- .../org/meshtastic/core/ui/icon/Navigation.kt | 47 +++ .../org/meshtastic/core/ui/icon/NoDevice.kt | 148 +------- .../org/meshtastic/core/ui/icon/Nodes.kt | 158 +-------- .../org/meshtastic/core/ui/icon/Person.kt | 39 ++- .../org/meshtastic/core/ui/icon/Security.kt | 35 +- .../org/meshtastic/core/ui/icon/Settings.kt | 189 +++-------- .../org/meshtastic/core/ui/icon/Signal.kt | 272 +++------------ .../org/meshtastic/core/ui/icon/Status.kt | 173 ++++++---- .../org/meshtastic/core/ui/icon/Telemetry.kt | 99 ++++-- .../ui/navigation/TopLevelDestinationExt.kt | 28 +- .../meshtastic/core/ui/util/AlertPreviews.kt | 6 +- desktop/build.gradle.kts | 1 - .../connections/ui/ConnectionsScreen.kt | 5 +- .../ui/components/ConnectionsSegmentedBar.kt | 20 +- .../ui/components/DeviceListItem.kt | 26 +- .../ui/components/NetworkDevices.kt | 12 +- .../connections/ui/components/UsbDevices.kt | 6 +- .../feature/firmware/FirmwareUpdateScreen.kt | 5 +- .../feature/intro/BluetoothScreen.kt | 14 +- .../feature/intro/LocationScreen.kt | 18 +- .../feature/intro/NotificationsScreen.kt | 18 +- .../meshtastic/feature/intro/WelcomeScreen.kt | 18 +- .../meshtastic/feature/messaging/Message.kt | 9 +- .../meshtastic/feature/messaging/QuickChat.kt | 22 +- .../messaging/component/MessageActions.kt | 44 ++- .../component/MessageActionsBottomSheet.kt | 26 +- .../messaging/component/MessageItem.kt | 9 +- .../component/MessageScreenComponents.kt | 67 ++-- .../messaging/component/MessageStatusIcon.kt | 20 +- .../feature/messaging/component/Reaction.kt | 9 +- .../messaging/ui/contact/ContactItem.kt | 6 +- .../feature/messaging/ui/contact/Contacts.kt | 8 +- .../feature/messaging/ui/sharing/Share.kt | 9 +- feature/node/component/DeviceActions.kt | 34 +- .../node/component/AdministrationSection.kt | 24 +- .../feature/node/component/ChannelInfo.kt | 6 +- .../node/component/CompassBottomSheet.kt | 14 +- .../feature/node/component/DeviceActions.kt | 34 +- .../node/component/DeviceDetailsSection.kt | 10 +- .../feature/node/component/DistanceInfo.kt | 6 +- .../node/component/EnvironmentMetrics.kt | 318 +++++++++--------- .../component/FirmwareReleaseSheetContent.kt | 13 +- .../feature/node/component/HopsInfo.kt | 6 +- .../node/component/LinkedCoordinatesItem.kt | 10 +- .../feature/node/component/NodeContextMenu.kt | 23 +- .../node/component/NodeDetailsSection.kt | 26 +- .../node/component/NodeFilterTextField.kt | 14 +- .../feature/node/component/NodeItem.kt | 8 +- .../feature/node/component/NodeStatusIcons.kt | 16 +- .../feature/node/component/NotesSection.kt | 9 +- .../feature/node/component/PositionSection.kt | 19 +- .../feature/node/component/PowerMetrics.kt | 110 +++--- .../node/component/SatelliteCountInfo.kt | 6 +- .../component/TelemetricActionsSection.kt | 25 +- .../feature/node/component/TelemetryInfo.kt | 40 +-- .../feature/node/metrics/BaseMetricChart.kt | 16 +- .../feature/node/metrics/CommonCharts.kt | 6 +- .../feature/node/metrics/PaxMetrics.kt | 4 +- .../meshtastic/feature/node/model/LogsType.kt | 46 ++- .../node/navigation/NodesNavigation.kt | 43 ++- .../feature/settings/SettingsScreen.kt | 6 +- .../settings/component/AppInfoSection.kt | 26 +- .../settings/component/AppearanceSection.kt | 14 +- .../settings/component/PersistenceSection.kt | 8 +- .../settings/component/PrivacySection.kt | 10 +- ...xternalNotificationConfigScreen.android.kt | 10 +- .../component/SecurityConfigScreen.android.kt | 6 +- .../feature/settings/AdministrationScreen.kt | 3 +- .../settings/DeviceConfigurationScreen.kt | 3 +- .../settings/ModuleConfigurationScreen.kt | 3 +- .../settings/component/HomoglyphSetting.kt | 6 +- .../settings/component/NotificationSection.kt | 14 +- .../feature/settings/debugging/Debug.kt | 29 +- .../settings/debugging/DebugFilters.kt | 40 +-- .../feature/settings/debugging/DebugSearch.kt | 18 +- .../settings/filter/FilterSettingsScreen.kt | 10 +- .../settings/navigation/ConfigRoute.kt | 55 +-- .../settings/navigation/ModuleRoute.kt | 64 ++-- .../feature/settings/radio/RadioConfig.kt | 71 ++-- .../radio/channel/ChannelConfigScreen.kt | 6 +- .../settings/radio/channel/ChannelScreen.kt | 10 +- .../radio/channel/component/ChannelCard.kt | 13 +- .../radio/channel/component/ChannelLegend.kt | 25 +- .../radio/component/DeviceConfigScreen.kt | 9 +- .../component/PacketResponseStateDialog.kt | 10 +- .../radio/component/SecurityConfigScreen.kt | 6 +- .../component/ShutdownConfirmationDialog.kt | 9 +- .../component/StatusMessageConfigItemList.kt | 6 +- .../radio/component/TAKConfigItemList.kt | 6 +- .../settings/radio/component/WarningDialog.kt | 10 +- .../feature/settings/DesktopSettingsScreen.kt | 26 +- .../wifiprovision/ui/ProvisionStatusCard.kt | 10 +- .../wifiprovision/ui/WifiProvisionScreen.kt | 29 +- gradle/libs.versions.toml | 4 +- .../android/meshserviceexample/MainScreen.kt | 9 +- 344 files changed, 3760 insertions(+), 2631 deletions(-) create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_abc.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_account_circle.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_add.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_add_link.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_add_reaction.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_admin_panel_settings.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_air.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_alt_route.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_android.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_app_settings_alt.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_arrow_back.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_arrow_circle_up.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_arrow_downward.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_bar_chart.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_battery_horiz_000.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_battery_question_mark.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_bedtime.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_bluetooth.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_bluetooth_connected.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_bluetooth_searching.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_blur_on.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_bolt.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_bug_report.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_cached.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_calendar_month.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_cell_tower.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_charging_station.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_chat_bubble_outline.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_check.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_check_circle.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_check_circle_outline.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_chevron_right.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_cleaning_services.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_clear.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_close.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_cloud.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_cloud_done.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_cloud_download.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_cloud_sync.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_cloud_upload.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_compress.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_content_copy.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_cruelty_free.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_dangerous.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_data_array.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_data_usage.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_delete.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_delete_outline.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_display_settings.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_do_disturb_on.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_done.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_download.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_drag_handle.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_edit.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_electric_bolt.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_elevation.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_error.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_error_outline.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_expand_less.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_expand_more.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_explore.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_fast_forward.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_file_download.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_filter_alt.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_filter_alt_off.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_filter_list.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_filter_list_off.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_fingerprint.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_folder.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_folder_open.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_fork_left.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_format_paint.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_format_quote.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_forum.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_forward.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_gps_fixed.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_gps_off.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_graphic_eq.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_grass.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_group.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_groups.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_height.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_history.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_home.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_how_to_reg.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_hub.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_icecream.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_info.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_key_off.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_keyboard_arrow_down.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_keyboard_arrow_right.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_keyboard_arrow_up.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_lan.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_language.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_layers.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_lens.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_light_mode.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_line_axis.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_link.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_link_off.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_list.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_location_disabled.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_lock.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_lock_open.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_map.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_mark_chat_read.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_memory.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_message.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_military_tech.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_more_vert.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_my_location.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_navigation.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_near_me.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_nfc.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_no_cell.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_no_device.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_nodes.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_notes.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_notifications.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_numbers.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_offline_share.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_output.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_people.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_perm_scan_wifi.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_person.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_person_add.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_person_off.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_person_search.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_phone_android.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_pin_drop.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_place.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_play_arrow.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_podcasts.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_power.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_power_settings_new.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_qr_code.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_qr_code_2.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_qr_code_scanner.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_radio_button_unchecked.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_refresh.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_reply.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_restart_alt.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_restore.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_route.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_router.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_satellite_alt.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_save.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_scale.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_schedule.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_search.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_security.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_select_all.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_send.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_sensors.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_settings.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_settings_ethernet.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_settings_input_antenna.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_settings_remote.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_share.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_0_bar.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_1_bar.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_2_bar.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_3_bar.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_4_bar.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_alt.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_alt_1_bar.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_alt_2_bar.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_off.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_social_distance.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_sort.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_speaker_notes.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_speaker_notes_off.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_speaker_phone.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_speed.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_ssid_chart.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_stacked_line_chart.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_star.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_star_border.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_storage.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_system_update.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_terminal.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_thermostat.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_thumb_up.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_trip_origin.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_tsunami.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_tune.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_upload.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_usb.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_usb_off.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_verified.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_visibility.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_visibility_off.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_volume_mute.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_volume_off.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_volume_up.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_warning.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_water_drop.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_waving_hand.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_wifi.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_wifi_channel.xml create mode 100644 core/resources/src/commonMain/composeResources/drawable/ic_work.xml create mode 100644 core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Navigation.kt diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 913b6ae1d..e3278923c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -244,7 +244,6 @@ dependencies { implementation(libs.jetbrains.compose.material3.adaptive.navigation) implementation(libs.material) implementation(libs.androidx.compose.material3) - implementation(libs.androidx.compose.material.iconsExtended) implementation(libs.androidx.compose.ui.tooling.preview) implementation(libs.androidx.compose.ui.text) implementation(libs.androidx.glance.appwidget) diff --git a/app/src/fdroid/kotlin/org/meshtastic/app/map/MapView.kt b/app/src/fdroid/kotlin/org/meshtastic/app/map/MapView.kt index a6c575af7..5a59b5341 100644 --- a/app/src/fdroid/kotlin/org/meshtastic/app/map/MapView.kt +++ b/app/src/fdroid/kotlin/org/meshtastic/app/map/MapView.kt @@ -32,15 +32,6 @@ import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.foundation.layout.wrapContentWidth import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.outlined.Layers -import androidx.compose.material.icons.outlined.MyLocation -import androidx.compose.material.icons.outlined.Tune -import androidx.compose.material.icons.rounded.Check -import androidx.compose.material.icons.rounded.Lens -import androidx.compose.material.icons.rounded.LocationDisabled -import androidx.compose.material.icons.rounded.PinDrop -import androidx.compose.material.icons.rounded.Star import androidx.compose.material3.AlertDialogDefaults import androidx.compose.material3.BasicAlertDialog import androidx.compose.material3.Checkbox @@ -131,6 +122,15 @@ import org.meshtastic.core.resources.waypoint_delete import org.meshtastic.core.resources.you import org.meshtastic.core.ui.component.BasicListItem import org.meshtastic.core.ui.component.ListItem +import org.meshtastic.core.ui.icon.Check +import org.meshtastic.core.ui.icon.Favorite +import org.meshtastic.core.ui.icon.Layers +import org.meshtastic.core.ui.icon.Lens +import org.meshtastic.core.ui.icon.LocationDisabled +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.MyLocation +import org.meshtastic.core.ui.icon.PinDrop +import org.meshtastic.core.ui.icon.Tune import org.meshtastic.core.ui.theme.TracerouteColors import org.meshtastic.core.ui.util.formatAgo import org.meshtastic.core.ui.util.showToast @@ -693,9 +693,10 @@ fun MapView( if (nodeTracks == null || focusedNodeNum == null) return emptyList() to emptyList() val lastHeardTrackFilter = mapFilterState.lastHeardTrackFilter - val timeFilteredPositions = nodeTracks.filter { - lastHeardTrackFilter == LastHeardFilter.Any || it.time > nowSeconds - lastHeardTrackFilter.seconds - } + val timeFilteredPositions = + nodeTracks.filter { + lastHeardTrackFilter == LastHeardFilter.Any || it.time > nowSeconds - lastHeardTrackFilter.seconds + } val sortedPositions = timeFilteredPositions.sortedBy { it.time } val focusedNode = nodes.find { it.num == focusedNodeNum } ?: return emptyList() to emptyList() @@ -718,17 +719,18 @@ fun MapView( } } - val trackMarkers = sortedPositions.mapIndexedNotNull { index, position -> - if (index == sortedPositions.lastIndex) return@mapIndexedNotNull null + val trackMarkers = + sortedPositions.mapIndexedNotNull { index, position -> + if (index == sortedPositions.lastIndex) return@mapIndexedNotNull null - Marker(this).apply { - this.position = GeoPoint((position.latitude_i ?: 0) * 1e-7, (position.longitude_i ?: 0) * 1e-7) - icon = AppCompatResources.getDrawable(context, R.drawable.ic_map_location_dot) - setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_CENTER) - title = getString(Res.string.position) - snippet = formatAgo(position.time) + Marker(this).apply { + this.position = GeoPoint((position.latitude_i ?: 0) * 1e-7, (position.longitude_i ?: 0) * 1e-7) + icon = AppCompatResources.getDrawable(context, R.drawable.ic_map_location_dot) + setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_CENTER) + title = getString(Res.string.position) + snippet = formatAgo(position.time) + } } - } return trackMarkers to trackPolylines } @@ -781,13 +783,13 @@ fun MapView( ) { MapButton( onClick = { showMapStyleDialog = true }, - icon = Icons.Outlined.Layers, + icon = MeshtasticIcons.Layers, contentDescription = Res.string.map_style_selection, ) Box(modifier = Modifier) { MapButton( onClick = { mapFilterExpanded = true }, - icon = Icons.Outlined.Tune, + icon = MeshtasticIcons.Tune, contentDescription = stringResource(Res.string.map_filter), ) DropdownMenu( @@ -802,7 +804,7 @@ fun MapView( verticalAlignment = Alignment.CenterVertically, ) { Icon( - imageVector = Icons.Rounded.Star, + imageVector = MeshtasticIcons.Favorite, contentDescription = null, modifier = Modifier.padding(end = 8.dp), tint = MaterialTheme.colorScheme.onSurface, @@ -827,7 +829,7 @@ fun MapView( verticalAlignment = Alignment.CenterVertically, ) { Icon( - imageVector = Icons.Rounded.PinDrop, + imageVector = MeshtasticIcons.PinDrop, contentDescription = null, modifier = Modifier.padding(end = 8.dp), tint = MaterialTheme.colorScheme.onSurface, @@ -852,7 +854,7 @@ fun MapView( verticalAlignment = Alignment.CenterVertically, ) { Icon( - imageVector = Icons.Rounded.Lens, + imageVector = MeshtasticIcons.Lens, contentDescription = null, modifier = Modifier.padding(end = 8.dp), tint = MaterialTheme.colorScheme.onSurface, @@ -876,9 +878,9 @@ fun MapView( MapButton( icon = if (myLocationOverlay == null) { - Icons.Outlined.MyLocation + MeshtasticIcons.MyLocation } else { - Icons.Rounded.LocationDisabled + MeshtasticIcons.LocationDisabled }, contentDescription = stringResource(Res.string.toggle_my_position), ) { @@ -976,7 +978,7 @@ private fun MapStyleDialog(selectedMapStyle: Int, onDismiss: () -> Unit, onSelec CustomTileSource.mTileSources.values.forEachIndexed { index, style -> ListItem( text = style, - trailingIcon = if (index == selected.value) Icons.Rounded.Check else null, + trailingIcon = if (index == selected.value) MeshtasticIcons.Check else null, onClick = { selected.value = index onSelectMapStyle(index) @@ -1158,15 +1160,16 @@ private fun offsetPolyline( val headingPoints = headingReferencePoints.takeIf { it.size >= 2 } ?: points if (points.size < 2 || headingPoints.size < 2 || offsetMeters == 0.0) return points - val headings = headingPoints.mapIndexed { index, _ -> - when (index) { - 0 -> bearingRad(headingPoints[0], headingPoints[1]) - headingPoints.lastIndex -> - bearingRad(headingPoints[headingPoints.lastIndex - 1], headingPoints[headingPoints.lastIndex]) + val headings = + headingPoints.mapIndexed { index, _ -> + when (index) { + 0 -> bearingRad(headingPoints[0], headingPoints[1]) + headingPoints.lastIndex -> + bearingRad(headingPoints[headingPoints.lastIndex - 1], headingPoints[headingPoints.lastIndex]) - else -> bearingRad(headingPoints[index - 1], headingPoints[index + 1]) + else -> bearingRad(headingPoints[index - 1], headingPoints[index + 1]) + } } - } return points.mapIndexed { index, point -> val heading = headings[index.coerceIn(0, headings.lastIndex)] diff --git a/app/src/fdroid/kotlin/org/meshtastic/app/map/component/DownloadButton.kt b/app/src/fdroid/kotlin/org/meshtastic/app/map/component/DownloadButton.kt index 7b12f70b9..7568d695a 100644 --- a/app/src/fdroid/kotlin/org/meshtastic/app/map/component/DownloadButton.kt +++ b/app/src/fdroid/kotlin/org/meshtastic/app/map/component/DownloadButton.kt @@ -21,8 +21,6 @@ import androidx.compose.animation.core.FastOutSlowInEasing import androidx.compose.animation.core.tween import androidx.compose.animation.slideInHorizontally import androidx.compose.animation.slideOutHorizontally -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Download import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -32,6 +30,8 @@ import androidx.compose.ui.draw.scale import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.map_download_region +import org.meshtastic.core.ui.icon.Download +import org.meshtastic.core.ui.icon.MeshtasticIcons @Composable fun DownloadButton(enabled: Boolean, onClick: () -> Unit) { @@ -50,7 +50,7 @@ fun DownloadButton(enabled: Boolean, onClick: () -> Unit) { ) { FloatingActionButton(onClick = onClick, contentColor = MaterialTheme.colorScheme.primary) { Icon( - imageVector = Icons.Rounded.Download, + imageVector = MeshtasticIcons.Download, contentDescription = stringResource(Res.string.map_download_region), modifier = Modifier.scale(1.25f), ) diff --git a/app/src/fdroid/kotlin/org/meshtastic/app/map/component/EditWaypointDialog.kt b/app/src/fdroid/kotlin/org/meshtastic/app/map/component/EditWaypointDialog.kt index fbdf28e40..c41798bf0 100644 --- a/app/src/fdroid/kotlin/org/meshtastic/app/map/component/EditWaypointDialog.kt +++ b/app/src/fdroid/kotlin/org/meshtastic/app/map/component/EditWaypointDialog.kt @@ -34,9 +34,6 @@ import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.CalendarMonth -import androidx.compose.material.icons.rounded.Lock import androidx.compose.material3.AlertDialog import androidx.compose.material3.Button import androidx.compose.material3.IconButton @@ -81,6 +78,9 @@ import org.meshtastic.core.resources.waypoint_edit import org.meshtastic.core.resources.waypoint_new import org.meshtastic.core.ui.component.EditTextPreference import org.meshtastic.core.ui.emoji.EmojiPickerDialog +import org.meshtastic.core.ui.icon.CalendarMonth +import org.meshtastic.core.ui.icon.Lock +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.theme.AppTheme import org.meshtastic.proto.Waypoint import kotlin.time.Duration.Companion.hours @@ -198,7 +198,10 @@ fun EditWaypointDialog( modifier = Modifier.fillMaxWidth().size(48.dp), verticalAlignment = Alignment.CenterVertically, ) { - Image(imageVector = Icons.Rounded.Lock, contentDescription = stringResource(Res.string.locked)) + Image( + imageVector = MeshtasticIcons.Lock, + contentDescription = stringResource(Res.string.locked), + ) Text(stringResource(Res.string.locked)) Switch( modifier = Modifier.fillMaxWidth().wrapContentWidth(Alignment.End), @@ -255,7 +258,7 @@ fun EditWaypointDialog( verticalAlignment = Alignment.CenterVertically, ) { Image( - imageVector = Icons.Rounded.CalendarMonth, + imageVector = MeshtasticIcons.CalendarMonth, contentDescription = stringResource(Res.string.expires), ) Text(stringResource(Res.string.expires)) diff --git a/app/src/fdroid/kotlin/org/meshtastic/app/map/component/MapButton.kt b/app/src/fdroid/kotlin/org/meshtastic/app/map/component/MapButton.kt index 5bffb830d..22eac8c02 100644 --- a/app/src/fdroid/kotlin/org/meshtastic/app/map/component/MapButton.kt +++ b/app/src/fdroid/kotlin/org/meshtastic/app/map/component/MapButton.kt @@ -17,8 +17,6 @@ package org.meshtastic.app.map.component import androidx.compose.foundation.layout.size -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.outlined.Layers import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon import androidx.compose.runtime.Composable @@ -30,6 +28,8 @@ import org.jetbrains.compose.resources.StringResource import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.map_style_selection +import org.meshtastic.core.ui.icon.Layers +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.theme.AppTheme @Composable @@ -57,5 +57,5 @@ fun MapButton(icon: ImageVector, contentDescription: String?, modifier: Modifier @PreviewLightDark @Composable private fun MapButtonPreview() { - AppTheme { MapButton(icon = Icons.Outlined.Layers, contentDescription = Res.string.map_style_selection) } + AppTheme { MapButton(icon = MeshtasticIcons.Layers, contentDescription = Res.string.map_style_selection) } } diff --git a/app/src/google/kotlin/org/meshtastic/app/map/MapView.kt b/app/src/google/kotlin/org/meshtastic/app/map/MapView.kt index ec87c68f8..6330248aa 100644 --- a/app/src/google/kotlin/org/meshtastic/app/map/MapView.kt +++ b/app/src/google/kotlin/org/meshtastic/app/map/MapView.kt @@ -36,7 +36,6 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width -import androidx.compose.material.icons.rounded.TripOrigin import androidx.compose.material3.Card import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon @@ -120,6 +119,8 @@ import org.meshtastic.core.resources.speed import org.meshtastic.core.resources.timestamp import org.meshtastic.core.resources.track_point import org.meshtastic.core.ui.component.NodeChip +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.TripOrigin import org.meshtastic.core.ui.theme.TracerouteColors import org.meshtastic.core.ui.util.formatAgo import org.meshtastic.core.ui.util.formatPositionTime @@ -302,16 +303,17 @@ fun MapView( } val myNodeNum = mapViewModel.myNodeNum - val nodeClusterItems = displayNodes.map { node -> - val latLng = LatLng((node.position.latitude_i ?: 0) * DEG_D, (node.position.longitude_i ?: 0) * DEG_D) - NodeClusterItem( - node = node, - nodePosition = latLng, - nodeTitle = "${node.user.short_name} ${formatAgo(node.position.time)}", - nodeSnippet = "${node.user.long_name}", - myNodeNum = myNodeNum, - ) - } + val nodeClusterItems = + displayNodes.map { node -> + val latLng = LatLng((node.position.latitude_i ?: 0) * DEG_D, (node.position.longitude_i ?: 0) * DEG_D) + NodeClusterItem( + node = node, + nodePosition = latLng, + nodeTitle = "${node.user.short_name} ${formatAgo(node.position.time)}", + nodeSnippet = "${node.user.long_name}", + myNodeNum = myNodeNum, + ) + } val isConnected by mapViewModel.isConnected.collectAsStateWithLifecycle() val theme by mapViewModel.theme.collectAsStateWithLifecycle() val dark = @@ -491,9 +493,11 @@ fun MapView( if (nodeTracks != null && focusedNodeNum != null) { val lastHeardTrackFilter = mapFilterState.lastHeardTrackFilter - val timeFilteredPositions = nodeTracks.filter { - lastHeardTrackFilter == LastHeardFilter.Any || it.time > nowSeconds - lastHeardTrackFilter.seconds - } + val timeFilteredPositions = + nodeTracks.filter { + lastHeardTrackFilter == LastHeardFilter.Any || + it.time > nowSeconds - lastHeardTrackFilter.seconds + } val sortedPositions = timeFilteredPositions.sortedBy { it.time } allNodes .find { it.num == focusedNodeNum } @@ -525,7 +529,7 @@ fun MapView( }, ) { Icon( - imageVector = androidx.compose.material.icons.Icons.Rounded.TripOrigin, + imageVector = MeshtasticIcons.TripOrigin, contentDescription = stringResource(Res.string.track_point), tint = color, ) @@ -893,18 +897,19 @@ private fun offsetPolyline( val headingPoints = headingReferencePoints.takeIf { it.size >= 2 } ?: points if (points.size < 2 || headingPoints.size < 2 || offsetMeters == 0.0) return points - val headings = headingPoints.mapIndexed { index, _ -> - when (index) { - 0 -> SphericalUtil.computeHeading(headingPoints[0], headingPoints[1]) - headingPoints.lastIndex -> - SphericalUtil.computeHeading( - headingPoints[headingPoints.lastIndex - 1], - headingPoints[headingPoints.lastIndex], - ) + val headings = + headingPoints.mapIndexed { index, _ -> + when (index) { + 0 -> SphericalUtil.computeHeading(headingPoints[0], headingPoints[1]) + headingPoints.lastIndex -> + SphericalUtil.computeHeading( + headingPoints[headingPoints.lastIndex - 1], + headingPoints[headingPoints.lastIndex], + ) - else -> SphericalUtil.computeHeading(headingPoints[index - 1], headingPoints[index + 1]) + else -> SphericalUtil.computeHeading(headingPoints[index - 1], headingPoints[index + 1]) + } } - } return points.mapIndexed { index, point -> val heading = headings[index.coerceIn(0, headings.lastIndex)] diff --git a/app/src/google/kotlin/org/meshtastic/app/map/component/CustomMapLayersSheet.kt b/app/src/google/kotlin/org/meshtastic/app/map/component/CustomMapLayersSheet.kt index 85369120c..fb5f682ed 100644 --- a/app/src/google/kotlin/org/meshtastic/app/map/component/CustomMapLayersSheet.kt +++ b/app/src/google/kotlin/org/meshtastic/app/map/component/CustomMapLayersSheet.kt @@ -25,11 +25,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Delete -import androidx.compose.material.icons.filled.Refresh -import androidx.compose.material.icons.filled.Visibility -import androidx.compose.material.icons.filled.VisibilityOff import androidx.compose.material3.Button import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.ExperimentalMaterial3Api @@ -66,6 +61,11 @@ import org.meshtastic.core.resources.save import org.meshtastic.core.resources.show_layer import org.meshtastic.core.resources.url import org.meshtastic.core.ui.component.MeshtasticDialog +import org.meshtastic.core.ui.icon.Delete +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Refresh +import org.meshtastic.core.ui.icon.Visibility +import org.meshtastic.core.ui.icon.VisibilityOff @Suppress("LongMethod") @Composable @@ -119,7 +119,7 @@ fun CustomMapLayersSheet( } else { IconButton(onClick = { onRefreshLayer(layer.id) }) { Icon( - imageVector = Icons.Filled.Refresh, + imageVector = MeshtasticIcons.Refresh, contentDescription = stringResource(Res.string.refresh), ) } @@ -129,9 +129,9 @@ fun CustomMapLayersSheet( Icon( imageVector = if (layer.isVisible) { - Icons.Filled.Visibility + MeshtasticIcons.Visibility } else { - Icons.Filled.VisibilityOff + MeshtasticIcons.VisibilityOff }, contentDescription = stringResource( @@ -145,7 +145,7 @@ fun CustomMapLayersSheet( } IconButton(onClick = { onRemoveLayer(layer.id) }) { Icon( - imageVector = Icons.Filled.Delete, + imageVector = MeshtasticIcons.Delete, contentDescription = stringResource(Res.string.remove_layer), ) } diff --git a/app/src/google/kotlin/org/meshtastic/app/map/component/CustomTileProviderManagerSheet.kt b/app/src/google/kotlin/org/meshtastic/app/map/component/CustomTileProviderManagerSheet.kt index 458de9f56..8082e40d1 100644 --- a/app/src/google/kotlin/org/meshtastic/app/map/component/CustomTileProviderManagerSheet.kt +++ b/app/src/google/kotlin/org/meshtastic/app/map/component/CustomTileProviderManagerSheet.kt @@ -27,9 +27,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Delete -import androidx.compose.material.icons.filled.Edit import androidx.compose.material3.Button import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon @@ -71,6 +68,9 @@ import org.meshtastic.core.resources.url_must_contain_placeholders import org.meshtastic.core.resources.url_template import org.meshtastic.core.resources.url_template_hint import org.meshtastic.core.ui.component.MeshtasticDialog +import org.meshtastic.core.ui.icon.Delete +import org.meshtastic.core.ui.icon.Edit +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.util.showToast @Suppress("LongMethod") @@ -155,13 +155,13 @@ fun CustomTileProviderManagerSheet(mapViewModel: MapViewModel) { }, ) { Icon( - Icons.Filled.Edit, + MeshtasticIcons.Edit, contentDescription = stringResource(Res.string.edit_custom_tile_source), ) } IconButton(onClick = { mapViewModel.removeCustomTileProvider(config.id) }) { Icon( - Icons.Filled.Delete, + MeshtasticIcons.Delete, contentDescription = stringResource(Res.string.delete_custom_tile_source), ) } diff --git a/app/src/google/kotlin/org/meshtastic/app/map/component/EditWaypointDialog.kt b/app/src/google/kotlin/org/meshtastic/app/map/component/EditWaypointDialog.kt index df808c615..856124e08 100644 --- a/app/src/google/kotlin/org/meshtastic/app/map/component/EditWaypointDialog.kt +++ b/app/src/google/kotlin/org/meshtastic/app/map/component/EditWaypointDialog.kt @@ -33,9 +33,6 @@ import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.CalendarMonth -import androidx.compose.material.icons.rounded.Lock import androidx.compose.material3.AlertDialog import androidx.compose.material3.Button import androidx.compose.material3.ExperimentalMaterial3Api @@ -82,6 +79,9 @@ import org.meshtastic.core.resources.time import org.meshtastic.core.resources.waypoint_edit import org.meshtastic.core.resources.waypoint_new import org.meshtastic.core.ui.emoji.EmojiPickerDialog +import org.meshtastic.core.ui.icon.CalendarMonth +import org.meshtastic.core.ui.icon.Lock +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.proto.Waypoint import kotlin.time.Duration.Companion.hours @@ -190,7 +190,7 @@ fun EditWaypointDialog( ) { Row(verticalAlignment = Alignment.CenterVertically) { Image( - imageVector = Icons.Rounded.Lock, + imageVector = MeshtasticIcons.Lock, contentDescription = stringResource(Res.string.locked), ) Spacer(modifier = Modifier.width(8.dp)) @@ -209,7 +209,7 @@ fun EditWaypointDialog( ) { Row(verticalAlignment = Alignment.CenterVertically) { Image( - imageVector = Icons.Rounded.CalendarMonth, + imageVector = MeshtasticIcons.CalendarMonth, contentDescription = stringResource(Res.string.expires), ) Spacer(modifier = Modifier.width(8.dp)) diff --git a/app/src/google/kotlin/org/meshtastic/app/map/component/MapControlsOverlay.kt b/app/src/google/kotlin/org/meshtastic/app/map/component/MapControlsOverlay.kt index 19cb41184..4f0b1afa3 100644 --- a/app/src/google/kotlin/org/meshtastic/app/map/component/MapControlsOverlay.kt +++ b/app/src/google/kotlin/org/meshtastic/app/map/component/MapControlsOverlay.kt @@ -20,15 +20,6 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Navigation -import androidx.compose.material.icons.filled.Refresh -import androidx.compose.material.icons.outlined.Layers -import androidx.compose.material.icons.outlined.Map -import androidx.compose.material.icons.outlined.MyLocation -import androidx.compose.material.icons.outlined.Navigation -import androidx.compose.material.icons.outlined.Tune -import androidx.compose.material.icons.rounded.LocationDisabled import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable @@ -44,6 +35,14 @@ import org.meshtastic.core.resources.map_tile_source import org.meshtastic.core.resources.orient_north import org.meshtastic.core.resources.refresh import org.meshtastic.core.resources.toggle_my_position +import org.meshtastic.core.ui.icon.Layers +import org.meshtastic.core.ui.icon.LocationDisabled +import org.meshtastic.core.ui.icon.Map +import org.meshtastic.core.ui.icon.MapCompass +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.MyLocation +import org.meshtastic.core.ui.icon.Refresh +import org.meshtastic.core.ui.icon.Tune import org.meshtastic.core.ui.theme.StatusColors.StatusRed @Composable @@ -73,7 +72,7 @@ fun MapControlsOverlay( CompassButton(onClick = onCompassClick, bearing = bearing, isFollowing = followPhoneBearing) if (isNodeMap) { MapButton( - icon = Icons.Outlined.Tune, + icon = MeshtasticIcons.Tune, contentDescription = stringResource(Res.string.map_filter), onClick = onToggleMapFilterMenu, ) @@ -85,7 +84,7 @@ fun MapControlsOverlay( } else { Box { MapButton( - icon = Icons.Outlined.Tune, + icon = MeshtasticIcons.Tune, contentDescription = stringResource(Res.string.map_filter), onClick = onToggleMapFilterMenu, ) @@ -99,7 +98,7 @@ fun MapControlsOverlay( Box { MapButton( - icon = Icons.Outlined.Map, + icon = MeshtasticIcons.Map, contentDescription = stringResource(Res.string.map_tile_source), onClick = onToggleMapTypeMenu, ) @@ -112,7 +111,7 @@ fun MapControlsOverlay( } MapButton( - icon = Icons.Outlined.Layers, + icon = MeshtasticIcons.Layers, contentDescription = stringResource(Res.string.manage_map_layers), onClick = onManageLayersClicked, ) @@ -124,7 +123,7 @@ fun MapControlsOverlay( } } else { MapButton( - icon = Icons.Filled.Refresh, + icon = MeshtasticIcons.Refresh, contentDescription = stringResource(Res.string.refresh), onClick = onRefresh, ) @@ -135,9 +134,9 @@ fun MapControlsOverlay( MapButton( icon = if (isLocationTrackingEnabled) { - Icons.Rounded.LocationDisabled + MeshtasticIcons.LocationDisabled } else { - Icons.Outlined.MyLocation + MeshtasticIcons.MyLocation }, contentDescription = stringResource(Res.string.toggle_my_position), onClick = onToggleLocationTracking, @@ -147,7 +146,7 @@ fun MapControlsOverlay( @Composable private fun CompassButton(onClick: () -> Unit, bearing: Float, isFollowing: Boolean) { - val icon = if (isFollowing) Icons.Filled.Navigation else Icons.Outlined.Navigation + val icon = if (isFollowing) MeshtasticIcons.MapCompass else MeshtasticIcons.MapCompass MapButton( modifier = Modifier.rotate(-bearing), diff --git a/app/src/google/kotlin/org/meshtastic/app/map/component/MapFilterDropdown.kt b/app/src/google/kotlin/org/meshtastic/app/map/component/MapFilterDropdown.kt index 57886edda..9d9f79ec2 100644 --- a/app/src/google/kotlin/org/meshtastic/app/map/component/MapFilterDropdown.kt +++ b/app/src/google/kotlin/org/meshtastic/app/map/component/MapFilterDropdown.kt @@ -18,10 +18,6 @@ package org.meshtastic.app.map.component import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.padding -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Place -import androidx.compose.material.icons.filled.Star -import androidx.compose.material.icons.outlined.RadioButtonUnchecked import androidx.compose.material3.Checkbox import androidx.compose.material3.DropdownMenu import androidx.compose.material3.DropdownMenuItem @@ -45,6 +41,10 @@ import org.meshtastic.core.resources.last_heard_filter_label import org.meshtastic.core.resources.only_favorites import org.meshtastic.core.resources.show_precision_circle import org.meshtastic.core.resources.show_waypoints +import org.meshtastic.core.ui.icon.Favorite +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Place +import org.meshtastic.core.ui.icon.RadioButtonUnchecked import org.meshtastic.feature.map.LastHeardFilter import kotlin.math.roundToInt @@ -56,7 +56,10 @@ internal fun MapFilterDropdown(expanded: Boolean, onDismissRequest: () -> Unit, text = { Text(stringResource(Res.string.only_favorites)) }, onClick = { mapViewModel.toggleOnlyFavorites() }, leadingIcon = { - Icon(imageVector = Icons.Filled.Star, contentDescription = stringResource(Res.string.only_favorites)) + Icon( + imageVector = MeshtasticIcons.Favorite, + contentDescription = stringResource(Res.string.only_favorites), + ) }, trailingIcon = { Checkbox( @@ -69,7 +72,10 @@ internal fun MapFilterDropdown(expanded: Boolean, onDismissRequest: () -> Unit, text = { Text(stringResource(Res.string.show_waypoints)) }, onClick = { mapViewModel.toggleShowWaypointsOnMap() }, leadingIcon = { - Icon(imageVector = Icons.Filled.Place, contentDescription = stringResource(Res.string.show_waypoints)) + Icon( + imageVector = MeshtasticIcons.Place, + contentDescription = stringResource(Res.string.show_waypoints), + ) }, trailingIcon = { Checkbox( @@ -83,7 +89,7 @@ internal fun MapFilterDropdown(expanded: Boolean, onDismissRequest: () -> Unit, onClick = { mapViewModel.toggleShowPrecisionCircleOnMap() }, leadingIcon = { Icon( - imageVector = Icons.Outlined.RadioButtonUnchecked, // Placeholder icon + imageVector = MeshtasticIcons.RadioButtonUnchecked, // Placeholder icon contentDescription = stringResource(Res.string.show_precision_circle), ) }, diff --git a/app/src/google/kotlin/org/meshtastic/app/map/component/MapTypeDropdown.kt b/app/src/google/kotlin/org/meshtastic/app/map/component/MapTypeDropdown.kt index 58c728cec..ad4bd58bb 100644 --- a/app/src/google/kotlin/org/meshtastic/app/map/component/MapTypeDropdown.kt +++ b/app/src/google/kotlin/org/meshtastic/app/map/component/MapTypeDropdown.kt @@ -16,8 +16,6 @@ */ package org.meshtastic.app.map.component -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Check import androidx.compose.material3.DropdownMenu import androidx.compose.material3.DropdownMenuItem import androidx.compose.material3.HorizontalDivider @@ -36,6 +34,8 @@ import org.meshtastic.core.resources.map_type_normal import org.meshtastic.core.resources.map_type_satellite import org.meshtastic.core.resources.map_type_terrain import org.meshtastic.core.resources.selected_map_type +import org.meshtastic.core.ui.icon.Check +import org.meshtastic.core.ui.icon.MeshtasticIcons @Suppress("LongMethod") @Composable @@ -67,7 +67,12 @@ internal fun MapTypeDropdown( }, trailingIcon = if (selectedCustomUrl == null && selectedGoogleMapType == type) { - { Icon(Icons.Filled.Check, contentDescription = stringResource(Res.string.selected_map_type)) } + { + Icon( + MeshtasticIcons.Check, + contentDescription = stringResource(Res.string.selected_map_type), + ) + } } else { null }, @@ -87,7 +92,7 @@ internal fun MapTypeDropdown( if (selectedCustomUrl == config.urlTemplate) { { Icon( - Icons.Filled.Check, + MeshtasticIcons.Check, contentDescription = stringResource(Res.string.selected_map_type), ) } diff --git a/build-logic/convention/src/main/kotlin/KmpFeatureConventionPlugin.kt b/build-logic/convention/src/main/kotlin/KmpFeatureConventionPlugin.kt index 4bc4cb927..4d02a630a 100644 --- a/build-logic/convention/src/main/kotlin/KmpFeatureConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/KmpFeatureConventionPlugin.kt @@ -43,7 +43,6 @@ class KmpFeatureConventionPlugin : Plugin { sourceSets.getByName("commonMain").dependencies { // Compose Multiplatform UI implementation(libs.library("compose-multiplatform-material3")) - implementation(libs.library("compose-multiplatform-materialIconsExtended")) // Lifecycle & ViewModel (JetBrains KMP forks — safe in commonMain) implementation(libs.library("jetbrains-lifecycle-viewmodel-compose")) @@ -64,7 +63,7 @@ class KmpFeatureConventionPlugin : Plugin { implementation(libs.library("accompanist-permissions")) implementation(libs.library("androidx-activity-compose")) implementation(libs.library("androidx-compose-material3")) - implementation(libs.library("androidx-compose-material-iconsExtended")) + implementation(libs.library("androidx-compose-ui-text")) implementation(libs.library("androidx-compose-ui-tooling-preview")) } diff --git a/core/barcode/build.gradle.kts b/core/barcode/build.gradle.kts index a03b02a0f..0be6e2fa7 100644 --- a/core/barcode/build.gradle.kts +++ b/core/barcode/build.gradle.kts @@ -34,7 +34,6 @@ dependencies { implementation(libs.androidx.activity.compose) implementation(libs.androidx.compose.material3) - implementation(libs.androidx.compose.material.iconsExtended) implementation(libs.androidx.compose.runtime) implementation(libs.androidx.compose.ui) implementation(libs.accompanist.permissions) diff --git a/core/barcode/src/main/kotlin/org/meshtastic/core/barcode/BarcodeScannerProvider.kt b/core/barcode/src/main/kotlin/org/meshtastic/core/barcode/BarcodeScannerProvider.kt index 5c266b544..fae85eba5 100644 --- a/core/barcode/src/main/kotlin/org/meshtastic/core/barcode/BarcodeScannerProvider.kt +++ b/core/barcode/src/main/kotlin/org/meshtastic/core/barcode/BarcodeScannerProvider.kt @@ -29,8 +29,6 @@ import androidx.compose.foundation.Canvas import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Close import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.runtime.Composable @@ -61,6 +59,8 @@ import com.google.accompanist.permissions.rememberPermissionState import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.close +import org.meshtastic.core.ui.icon.Close +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.util.BarcodeScanner import java.util.concurrent.Executors @@ -116,7 +116,7 @@ private fun BarcodeScannerDialog(onResult: (String?) -> Unit, onDismiss: () -> U } IconButton(onClick = onDismiss, modifier = Modifier.align(Alignment.TopStart).padding(16.dp)) { Icon( - imageVector = Icons.Default.Close, + imageVector = MeshtasticIcons.Close, contentDescription = stringResource(Res.string.close), tint = Color.White, ) diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_abc.xml b/core/resources/src/commonMain/composeResources/drawable/ic_abc.xml new file mode 100644 index 000000000..66e48ebc1 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_abc.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_account_circle.xml b/core/resources/src/commonMain/composeResources/drawable/ic_account_circle.xml new file mode 100644 index 000000000..8524fb183 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_account_circle.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_add.xml b/core/resources/src/commonMain/composeResources/drawable/ic_add.xml new file mode 100644 index 000000000..f1ba62db7 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_add.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_add_link.xml b/core/resources/src/commonMain/composeResources/drawable/ic_add_link.xml new file mode 100644 index 000000000..b2d0feeeb --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_add_link.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_add_reaction.xml b/core/resources/src/commonMain/composeResources/drawable/ic_add_reaction.xml new file mode 100644 index 000000000..1eb47a0cc --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_add_reaction.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_admin_panel_settings.xml b/core/resources/src/commonMain/composeResources/drawable/ic_admin_panel_settings.xml new file mode 100644 index 000000000..5103e2d30 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_admin_panel_settings.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_air.xml b/core/resources/src/commonMain/composeResources/drawable/ic_air.xml new file mode 100644 index 000000000..5585deb3b --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_air.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_alt_route.xml b/core/resources/src/commonMain/composeResources/drawable/ic_alt_route.xml new file mode 100644 index 000000000..7beaaea87 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_alt_route.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_android.xml b/core/resources/src/commonMain/composeResources/drawable/ic_android.xml new file mode 100644 index 000000000..a8a1a2596 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_android.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_app_settings_alt.xml b/core/resources/src/commonMain/composeResources/drawable/ic_app_settings_alt.xml new file mode 100644 index 000000000..c1ab5ce07 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_app_settings_alt.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_arrow_back.xml b/core/resources/src/commonMain/composeResources/drawable/ic_arrow_back.xml new file mode 100644 index 000000000..842837341 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_arrow_back.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_arrow_circle_up.xml b/core/resources/src/commonMain/composeResources/drawable/ic_arrow_circle_up.xml new file mode 100644 index 000000000..feb32cb93 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_arrow_circle_up.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_arrow_downward.xml b/core/resources/src/commonMain/composeResources/drawable/ic_arrow_downward.xml new file mode 100644 index 000000000..436250a81 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_arrow_downward.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_bar_chart.xml b/core/resources/src/commonMain/composeResources/drawable/ic_bar_chart.xml new file mode 100644 index 000000000..15175d774 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_bar_chart.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_battery_horiz_000.xml b/core/resources/src/commonMain/composeResources/drawable/ic_battery_horiz_000.xml new file mode 100644 index 000000000..49dd7e7bb --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_battery_horiz_000.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_battery_question_mark.xml b/core/resources/src/commonMain/composeResources/drawable/ic_battery_question_mark.xml new file mode 100644 index 000000000..ef13c999e --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_battery_question_mark.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_bedtime.xml b/core/resources/src/commonMain/composeResources/drawable/ic_bedtime.xml new file mode 100644 index 000000000..37d642eec --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_bedtime.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_bluetooth.xml b/core/resources/src/commonMain/composeResources/drawable/ic_bluetooth.xml new file mode 100644 index 000000000..7a0f7ba67 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_bluetooth.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_bluetooth_connected.xml b/core/resources/src/commonMain/composeResources/drawable/ic_bluetooth_connected.xml new file mode 100644 index 000000000..17d627e51 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_bluetooth_connected.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_bluetooth_searching.xml b/core/resources/src/commonMain/composeResources/drawable/ic_bluetooth_searching.xml new file mode 100644 index 000000000..b82b12b0d --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_bluetooth_searching.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_blur_on.xml b/core/resources/src/commonMain/composeResources/drawable/ic_blur_on.xml new file mode 100644 index 000000000..a9e62dfbf --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_blur_on.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_bolt.xml b/core/resources/src/commonMain/composeResources/drawable/ic_bolt.xml new file mode 100644 index 000000000..4bf1cf8af --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_bolt.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_bug_report.xml b/core/resources/src/commonMain/composeResources/drawable/ic_bug_report.xml new file mode 100644 index 000000000..c0c11e389 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_bug_report.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_cached.xml b/core/resources/src/commonMain/composeResources/drawable/ic_cached.xml new file mode 100644 index 000000000..dbc757d8b --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_cached.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_calendar_month.xml b/core/resources/src/commonMain/composeResources/drawable/ic_calendar_month.xml new file mode 100644 index 000000000..619ea2176 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_calendar_month.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_cell_tower.xml b/core/resources/src/commonMain/composeResources/drawable/ic_cell_tower.xml new file mode 100644 index 000000000..c7bc849e2 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_cell_tower.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_charging_station.xml b/core/resources/src/commonMain/composeResources/drawable/ic_charging_station.xml new file mode 100644 index 000000000..7ef3c8463 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_charging_station.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_chat_bubble_outline.xml b/core/resources/src/commonMain/composeResources/drawable/ic_chat_bubble_outline.xml new file mode 100644 index 000000000..38611380f --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_chat_bubble_outline.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_check.xml b/core/resources/src/commonMain/composeResources/drawable/ic_check.xml new file mode 100644 index 000000000..c87532011 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_check.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_check_circle.xml b/core/resources/src/commonMain/composeResources/drawable/ic_check_circle.xml new file mode 100644 index 000000000..10030f259 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_check_circle.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_check_circle_outline.xml b/core/resources/src/commonMain/composeResources/drawable/ic_check_circle_outline.xml new file mode 100644 index 000000000..24d91e8f5 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_check_circle_outline.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_chevron_right.xml b/core/resources/src/commonMain/composeResources/drawable/ic_chevron_right.xml new file mode 100644 index 000000000..0cba5c4e2 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_chevron_right.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_cleaning_services.xml b/core/resources/src/commonMain/composeResources/drawable/ic_cleaning_services.xml new file mode 100644 index 000000000..de395dbc6 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_cleaning_services.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_clear.xml b/core/resources/src/commonMain/composeResources/drawable/ic_clear.xml new file mode 100644 index 000000000..f713c7ea6 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_clear.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_close.xml b/core/resources/src/commonMain/composeResources/drawable/ic_close.xml new file mode 100644 index 000000000..87da91234 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_close.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_cloud.xml b/core/resources/src/commonMain/composeResources/drawable/ic_cloud.xml new file mode 100644 index 000000000..ebba8711c --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_cloud.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_cloud_done.xml b/core/resources/src/commonMain/composeResources/drawable/ic_cloud_done.xml new file mode 100644 index 000000000..2982c6961 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_cloud_done.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_cloud_download.xml b/core/resources/src/commonMain/composeResources/drawable/ic_cloud_download.xml new file mode 100644 index 000000000..bf3b15657 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_cloud_download.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_cloud_sync.xml b/core/resources/src/commonMain/composeResources/drawable/ic_cloud_sync.xml new file mode 100644 index 000000000..e52b0df51 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_cloud_sync.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_cloud_upload.xml b/core/resources/src/commonMain/composeResources/drawable/ic_cloud_upload.xml new file mode 100644 index 000000000..b5f7761a1 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_cloud_upload.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_compress.xml b/core/resources/src/commonMain/composeResources/drawable/ic_compress.xml new file mode 100644 index 000000000..449ed300e --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_compress.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_content_copy.xml b/core/resources/src/commonMain/composeResources/drawable/ic_content_copy.xml new file mode 100644 index 000000000..7e279850e --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_content_copy.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_cruelty_free.xml b/core/resources/src/commonMain/composeResources/drawable/ic_cruelty_free.xml new file mode 100644 index 000000000..d4e145185 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_cruelty_free.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_dangerous.xml b/core/resources/src/commonMain/composeResources/drawable/ic_dangerous.xml new file mode 100644 index 000000000..2703c9773 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_dangerous.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_data_array.xml b/core/resources/src/commonMain/composeResources/drawable/ic_data_array.xml new file mode 100644 index 000000000..339f48690 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_data_array.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_data_usage.xml b/core/resources/src/commonMain/composeResources/drawable/ic_data_usage.xml new file mode 100644 index 000000000..649a9b452 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_data_usage.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_delete.xml b/core/resources/src/commonMain/composeResources/drawable/ic_delete.xml new file mode 100644 index 000000000..63562a0f0 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_delete.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_delete_outline.xml b/core/resources/src/commonMain/composeResources/drawable/ic_delete_outline.xml new file mode 100644 index 000000000..63562a0f0 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_delete_outline.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_display_settings.xml b/core/resources/src/commonMain/composeResources/drawable/ic_display_settings.xml new file mode 100644 index 000000000..79d0ea729 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_display_settings.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_do_disturb_on.xml b/core/resources/src/commonMain/composeResources/drawable/ic_do_disturb_on.xml new file mode 100644 index 000000000..677d20fac --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_do_disturb_on.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_done.xml b/core/resources/src/commonMain/composeResources/drawable/ic_done.xml new file mode 100644 index 000000000..c87532011 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_done.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_download.xml b/core/resources/src/commonMain/composeResources/drawable/ic_download.xml new file mode 100644 index 000000000..6431c3e05 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_download.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_drag_handle.xml b/core/resources/src/commonMain/composeResources/drawable/ic_drag_handle.xml new file mode 100644 index 000000000..6b675c008 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_drag_handle.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_edit.xml b/core/resources/src/commonMain/composeResources/drawable/ic_edit.xml new file mode 100644 index 000000000..3a54c4161 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_edit.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_electric_bolt.xml b/core/resources/src/commonMain/composeResources/drawable/ic_electric_bolt.xml new file mode 100644 index 000000000..b055e49c4 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_electric_bolt.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_elevation.xml b/core/resources/src/commonMain/composeResources/drawable/ic_elevation.xml new file mode 100644 index 000000000..cd0fc5ddf --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_elevation.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_error.xml b/core/resources/src/commonMain/composeResources/drawable/ic_error.xml new file mode 100644 index 000000000..071972c15 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_error.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_error_outline.xml b/core/resources/src/commonMain/composeResources/drawable/ic_error_outline.xml new file mode 100644 index 000000000..c38fb68d5 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_error_outline.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_expand_less.xml b/core/resources/src/commonMain/composeResources/drawable/ic_expand_less.xml new file mode 100644 index 000000000..f3bc2b43f --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_expand_less.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_expand_more.xml b/core/resources/src/commonMain/composeResources/drawable/ic_expand_more.xml new file mode 100644 index 000000000..6d3203895 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_expand_more.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_explore.xml b/core/resources/src/commonMain/composeResources/drawable/ic_explore.xml new file mode 100644 index 000000000..619e507f5 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_explore.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_fast_forward.xml b/core/resources/src/commonMain/composeResources/drawable/ic_fast_forward.xml new file mode 100644 index 000000000..17c061c93 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_fast_forward.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_file_download.xml b/core/resources/src/commonMain/composeResources/drawable/ic_file_download.xml new file mode 100644 index 000000000..6597a8e9f --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_file_download.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_filter_alt.xml b/core/resources/src/commonMain/composeResources/drawable/ic_filter_alt.xml new file mode 100644 index 000000000..4fa820424 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_filter_alt.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_filter_alt_off.xml b/core/resources/src/commonMain/composeResources/drawable/ic_filter_alt_off.xml new file mode 100644 index 000000000..cf450ae1d --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_filter_alt_off.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_filter_list.xml b/core/resources/src/commonMain/composeResources/drawable/ic_filter_list.xml new file mode 100644 index 000000000..1572886be --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_filter_list.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_filter_list_off.xml b/core/resources/src/commonMain/composeResources/drawable/ic_filter_list_off.xml new file mode 100644 index 000000000..db86ecef5 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_filter_list_off.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_fingerprint.xml b/core/resources/src/commonMain/composeResources/drawable/ic_fingerprint.xml new file mode 100644 index 000000000..e571895d6 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_fingerprint.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_folder.xml b/core/resources/src/commonMain/composeResources/drawable/ic_folder.xml new file mode 100644 index 000000000..6682ed7ed --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_folder.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_folder_open.xml b/core/resources/src/commonMain/composeResources/drawable/ic_folder_open.xml new file mode 100644 index 000000000..32f24c846 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_folder_open.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_fork_left.xml b/core/resources/src/commonMain/composeResources/drawable/ic_fork_left.xml new file mode 100644 index 000000000..73946e6f2 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_fork_left.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_format_paint.xml b/core/resources/src/commonMain/composeResources/drawable/ic_format_paint.xml new file mode 100644 index 000000000..722f25eb3 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_format_paint.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_format_quote.xml b/core/resources/src/commonMain/composeResources/drawable/ic_format_quote.xml new file mode 100644 index 000000000..d9fb2dd29 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_format_quote.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_forum.xml b/core/resources/src/commonMain/composeResources/drawable/ic_forum.xml new file mode 100644 index 000000000..7aad3358a --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_forum.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_forward.xml b/core/resources/src/commonMain/composeResources/drawable/ic_forward.xml new file mode 100644 index 000000000..f0504254e --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_forward.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_gps_fixed.xml b/core/resources/src/commonMain/composeResources/drawable/ic_gps_fixed.xml new file mode 100644 index 000000000..9d66bcfe6 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_gps_fixed.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_gps_off.xml b/core/resources/src/commonMain/composeResources/drawable/ic_gps_off.xml new file mode 100644 index 000000000..eab8830d9 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_gps_off.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_graphic_eq.xml b/core/resources/src/commonMain/composeResources/drawable/ic_graphic_eq.xml new file mode 100644 index 000000000..9b6498e38 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_graphic_eq.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_grass.xml b/core/resources/src/commonMain/composeResources/drawable/ic_grass.xml new file mode 100644 index 000000000..e0eeda24f --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_grass.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_group.xml b/core/resources/src/commonMain/composeResources/drawable/ic_group.xml new file mode 100644 index 000000000..ce6437bcf --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_group.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_groups.xml b/core/resources/src/commonMain/composeResources/drawable/ic_groups.xml new file mode 100644 index 000000000..ed4ebec70 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_groups.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_height.xml b/core/resources/src/commonMain/composeResources/drawable/ic_height.xml new file mode 100644 index 000000000..b2eb0eda3 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_height.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_history.xml b/core/resources/src/commonMain/composeResources/drawable/ic_history.xml new file mode 100644 index 000000000..662ff1943 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_history.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_home.xml b/core/resources/src/commonMain/composeResources/drawable/ic_home.xml new file mode 100644 index 000000000..62f50d3d9 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_home.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_how_to_reg.xml b/core/resources/src/commonMain/composeResources/drawable/ic_how_to_reg.xml new file mode 100644 index 000000000..df208c337 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_how_to_reg.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_hub.xml b/core/resources/src/commonMain/composeResources/drawable/ic_hub.xml new file mode 100644 index 000000000..61f70fe03 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_hub.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_icecream.xml b/core/resources/src/commonMain/composeResources/drawable/ic_icecream.xml new file mode 100644 index 000000000..4757a4803 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_icecream.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_info.xml b/core/resources/src/commonMain/composeResources/drawable/ic_info.xml new file mode 100644 index 000000000..7f68b0a63 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_info.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_key_off.xml b/core/resources/src/commonMain/composeResources/drawable/ic_key_off.xml new file mode 100644 index 000000000..942121ea6 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_key_off.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_keyboard_arrow_down.xml b/core/resources/src/commonMain/composeResources/drawable/ic_keyboard_arrow_down.xml new file mode 100644 index 000000000..fa148c0bf --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_keyboard_arrow_down.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_keyboard_arrow_right.xml b/core/resources/src/commonMain/composeResources/drawable/ic_keyboard_arrow_right.xml new file mode 100644 index 000000000..0cba5c4e2 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_keyboard_arrow_right.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_keyboard_arrow_up.xml b/core/resources/src/commonMain/composeResources/drawable/ic_keyboard_arrow_up.xml new file mode 100644 index 000000000..e880ca90c --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_keyboard_arrow_up.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_lan.xml b/core/resources/src/commonMain/composeResources/drawable/ic_lan.xml new file mode 100644 index 000000000..3f4d22dea --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_lan.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_language.xml b/core/resources/src/commonMain/composeResources/drawable/ic_language.xml new file mode 100644 index 000000000..3eee5a866 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_language.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_layers.xml b/core/resources/src/commonMain/composeResources/drawable/ic_layers.xml new file mode 100644 index 000000000..4d44fb4fb --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_layers.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_lens.xml b/core/resources/src/commonMain/composeResources/drawable/ic_lens.xml new file mode 100644 index 000000000..b47c57e34 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_lens.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_light_mode.xml b/core/resources/src/commonMain/composeResources/drawable/ic_light_mode.xml new file mode 100644 index 000000000..df48c1e32 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_light_mode.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_line_axis.xml b/core/resources/src/commonMain/composeResources/drawable/ic_line_axis.xml new file mode 100644 index 000000000..0a0b418ed --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_line_axis.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_link.xml b/core/resources/src/commonMain/composeResources/drawable/ic_link.xml new file mode 100644 index 000000000..41d18e2c2 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_link.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_link_off.xml b/core/resources/src/commonMain/composeResources/drawable/ic_link_off.xml new file mode 100644 index 000000000..6a962e461 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_link_off.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_list.xml b/core/resources/src/commonMain/composeResources/drawable/ic_list.xml new file mode 100644 index 000000000..d66499010 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_list.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_location_disabled.xml b/core/resources/src/commonMain/composeResources/drawable/ic_location_disabled.xml new file mode 100644 index 000000000..eab8830d9 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_location_disabled.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_lock.xml b/core/resources/src/commonMain/composeResources/drawable/ic_lock.xml new file mode 100644 index 000000000..600c7d013 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_lock.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_lock_open.xml b/core/resources/src/commonMain/composeResources/drawable/ic_lock_open.xml new file mode 100644 index 000000000..3c13fd84a --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_lock_open.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_map.xml b/core/resources/src/commonMain/composeResources/drawable/ic_map.xml new file mode 100644 index 000000000..d2c353abb --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_map.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_mark_chat_read.xml b/core/resources/src/commonMain/composeResources/drawable/ic_mark_chat_read.xml new file mode 100644 index 000000000..a856eef0f --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_mark_chat_read.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_memory.xml b/core/resources/src/commonMain/composeResources/drawable/ic_memory.xml new file mode 100644 index 000000000..4dbaa23ec --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_memory.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_message.xml b/core/resources/src/commonMain/composeResources/drawable/ic_message.xml new file mode 100644 index 000000000..aca74bdcb --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_message.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_military_tech.xml b/core/resources/src/commonMain/composeResources/drawable/ic_military_tech.xml new file mode 100644 index 000000000..f416ca54d --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_military_tech.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_more_vert.xml b/core/resources/src/commonMain/composeResources/drawable/ic_more_vert.xml new file mode 100644 index 000000000..1612c7c4f --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_more_vert.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_my_location.xml b/core/resources/src/commonMain/composeResources/drawable/ic_my_location.xml new file mode 100644 index 000000000..9d66bcfe6 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_my_location.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_navigation.xml b/core/resources/src/commonMain/composeResources/drawable/ic_navigation.xml new file mode 100644 index 000000000..e4f5cdbdb --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_navigation.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_near_me.xml b/core/resources/src/commonMain/composeResources/drawable/ic_near_me.xml new file mode 100644 index 000000000..ef46aa3f2 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_near_me.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_nfc.xml b/core/resources/src/commonMain/composeResources/drawable/ic_nfc.xml new file mode 100644 index 000000000..c0326031d --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_nfc.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_no_cell.xml b/core/resources/src/commonMain/composeResources/drawable/ic_no_cell.xml new file mode 100644 index 000000000..33d8bf662 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_no_cell.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_no_device.xml b/core/resources/src/commonMain/composeResources/drawable/ic_no_device.xml new file mode 100644 index 000000000..ebea76d42 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_no_device.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_nodes.xml b/core/resources/src/commonMain/composeResources/drawable/ic_nodes.xml new file mode 100644 index 000000000..1a3504ea2 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_nodes.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_notes.xml b/core/resources/src/commonMain/composeResources/drawable/ic_notes.xml new file mode 100644 index 000000000..56b87147e --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_notes.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_notifications.xml b/core/resources/src/commonMain/composeResources/drawable/ic_notifications.xml new file mode 100644 index 000000000..4a2cc8a4d --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_notifications.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_numbers.xml b/core/resources/src/commonMain/composeResources/drawable/ic_numbers.xml new file mode 100644 index 000000000..9710fdc52 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_numbers.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_offline_share.xml b/core/resources/src/commonMain/composeResources/drawable/ic_offline_share.xml new file mode 100644 index 000000000..ff676f1e9 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_offline_share.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_output.xml b/core/resources/src/commonMain/composeResources/drawable/ic_output.xml new file mode 100644 index 000000000..efb4788a4 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_output.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_people.xml b/core/resources/src/commonMain/composeResources/drawable/ic_people.xml new file mode 100644 index 000000000..ce6437bcf --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_people.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_perm_scan_wifi.xml b/core/resources/src/commonMain/composeResources/drawable/ic_perm_scan_wifi.xml new file mode 100644 index 000000000..044b270a3 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_perm_scan_wifi.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_person.xml b/core/resources/src/commonMain/composeResources/drawable/ic_person.xml new file mode 100644 index 000000000..95b88a6c9 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_person.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_person_add.xml b/core/resources/src/commonMain/composeResources/drawable/ic_person_add.xml new file mode 100644 index 000000000..542ded533 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_person_add.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_person_off.xml b/core/resources/src/commonMain/composeResources/drawable/ic_person_off.xml new file mode 100644 index 000000000..827d36317 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_person_off.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_person_search.xml b/core/resources/src/commonMain/composeResources/drawable/ic_person_search.xml new file mode 100644 index 000000000..ee62e4939 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_person_search.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_phone_android.xml b/core/resources/src/commonMain/composeResources/drawable/ic_phone_android.xml new file mode 100644 index 000000000..6848cd3bb --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_phone_android.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_pin_drop.xml b/core/resources/src/commonMain/composeResources/drawable/ic_pin_drop.xml new file mode 100644 index 000000000..55885c3a5 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_pin_drop.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_place.xml b/core/resources/src/commonMain/composeResources/drawable/ic_place.xml new file mode 100644 index 000000000..c641035fa --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_place.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_play_arrow.xml b/core/resources/src/commonMain/composeResources/drawable/ic_play_arrow.xml new file mode 100644 index 000000000..9cb4f8bde --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_play_arrow.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_podcasts.xml b/core/resources/src/commonMain/composeResources/drawable/ic_podcasts.xml new file mode 100644 index 000000000..22f1d500c --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_podcasts.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_power.xml b/core/resources/src/commonMain/composeResources/drawable/ic_power.xml new file mode 100644 index 000000000..b451b3ff3 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_power.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_power_settings_new.xml b/core/resources/src/commonMain/composeResources/drawable/ic_power_settings_new.xml new file mode 100644 index 000000000..0b58d7c5e --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_power_settings_new.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_qr_code.xml b/core/resources/src/commonMain/composeResources/drawable/ic_qr_code.xml new file mode 100644 index 000000000..2f1bbb997 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_qr_code.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_qr_code_2.xml b/core/resources/src/commonMain/composeResources/drawable/ic_qr_code_2.xml new file mode 100644 index 000000000..981d42cc3 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_qr_code_2.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_qr_code_scanner.xml b/core/resources/src/commonMain/composeResources/drawable/ic_qr_code_scanner.xml new file mode 100644 index 000000000..ef1de5a93 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_qr_code_scanner.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_radio_button_unchecked.xml b/core/resources/src/commonMain/composeResources/drawable/ic_radio_button_unchecked.xml new file mode 100644 index 000000000..b47c57e34 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_radio_button_unchecked.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_refresh.xml b/core/resources/src/commonMain/composeResources/drawable/ic_refresh.xml new file mode 100644 index 000000000..1adebe584 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_refresh.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_reply.xml b/core/resources/src/commonMain/composeResources/drawable/ic_reply.xml new file mode 100644 index 000000000..25bfa764e --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_reply.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_restart_alt.xml b/core/resources/src/commonMain/composeResources/drawable/ic_restart_alt.xml new file mode 100644 index 000000000..fcdd91f25 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_restart_alt.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_restore.xml b/core/resources/src/commonMain/composeResources/drawable/ic_restore.xml new file mode 100644 index 000000000..b0833e733 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_restore.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_route.xml b/core/resources/src/commonMain/composeResources/drawable/ic_route.xml new file mode 100644 index 000000000..c165d4dae --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_route.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_router.xml b/core/resources/src/commonMain/composeResources/drawable/ic_router.xml new file mode 100644 index 000000000..1096b3cad --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_router.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_satellite_alt.xml b/core/resources/src/commonMain/composeResources/drawable/ic_satellite_alt.xml new file mode 100644 index 000000000..d4e582648 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_satellite_alt.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_save.xml b/core/resources/src/commonMain/composeResources/drawable/ic_save.xml new file mode 100644 index 000000000..7b9cf3d35 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_save.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_scale.xml b/core/resources/src/commonMain/composeResources/drawable/ic_scale.xml new file mode 100644 index 000000000..87c867258 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_scale.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_schedule.xml b/core/resources/src/commonMain/composeResources/drawable/ic_schedule.xml new file mode 100644 index 000000000..41aeb1e9b --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_schedule.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_search.xml b/core/resources/src/commonMain/composeResources/drawable/ic_search.xml new file mode 100644 index 000000000..cd121c00a --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_search.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_security.xml b/core/resources/src/commonMain/composeResources/drawable/ic_security.xml new file mode 100644 index 000000000..735e158b0 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_security.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_select_all.xml b/core/resources/src/commonMain/composeResources/drawable/ic_select_all.xml new file mode 100644 index 000000000..457ce4efc --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_select_all.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_send.xml b/core/resources/src/commonMain/composeResources/drawable/ic_send.xml new file mode 100644 index 000000000..31647aa99 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_send.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_sensors.xml b/core/resources/src/commonMain/composeResources/drawable/ic_sensors.xml new file mode 100644 index 000000000..a5c15d2a7 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_sensors.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_settings.xml b/core/resources/src/commonMain/composeResources/drawable/ic_settings.xml new file mode 100644 index 000000000..ab4406f1a --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_settings.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_settings_ethernet.xml b/core/resources/src/commonMain/composeResources/drawable/ic_settings_ethernet.xml new file mode 100644 index 000000000..a03f3e402 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_settings_ethernet.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_settings_input_antenna.xml b/core/resources/src/commonMain/composeResources/drawable/ic_settings_input_antenna.xml new file mode 100644 index 000000000..3f17f3fa1 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_settings_input_antenna.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_settings_remote.xml b/core/resources/src/commonMain/composeResources/drawable/ic_settings_remote.xml new file mode 100644 index 000000000..e1627a60c --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_settings_remote.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_share.xml b/core/resources/src/commonMain/composeResources/drawable/ic_share.xml new file mode 100644 index 000000000..f98e497f2 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_share.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_0_bar.xml b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_0_bar.xml new file mode 100644 index 000000000..11f20972b --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_0_bar.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_1_bar.xml b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_1_bar.xml new file mode 100644 index 000000000..82143eb6b --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_1_bar.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_2_bar.xml b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_2_bar.xml new file mode 100644 index 000000000..e4202f9b6 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_2_bar.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_3_bar.xml b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_3_bar.xml new file mode 100644 index 000000000..c46ee9405 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_3_bar.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_4_bar.xml b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_4_bar.xml new file mode 100644 index 000000000..db0759d20 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_4_bar.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_alt.xml b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_alt.xml new file mode 100644 index 000000000..87dec5806 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_alt.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_alt_1_bar.xml b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_alt_1_bar.xml new file mode 100644 index 000000000..b38b4b1d2 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_alt_1_bar.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_alt_2_bar.xml b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_alt_2_bar.xml new file mode 100644 index 000000000..062acca7d --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_alt_2_bar.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_off.xml b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_off.xml new file mode 100644 index 000000000..ff3a38816 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_signal_cellular_off.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_social_distance.xml b/core/resources/src/commonMain/composeResources/drawable/ic_social_distance.xml new file mode 100644 index 000000000..b2742ecbf --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_social_distance.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_soil_moisture.xml b/core/resources/src/commonMain/composeResources/drawable/ic_soil_moisture.xml index cee547ca5..a95e93ff6 100644 --- a/core/resources/src/commonMain/composeResources/drawable/ic_soil_moisture.xml +++ b/core/resources/src/commonMain/composeResources/drawable/ic_soil_moisture.xml @@ -1,11 +1,18 @@ - - - - - - - - - - + + + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_soil_temperature.xml b/core/resources/src/commonMain/composeResources/drawable/ic_soil_temperature.xml index 6b1e4611f..452efdcab 100644 --- a/core/resources/src/commonMain/composeResources/drawable/ic_soil_temperature.xml +++ b/core/resources/src/commonMain/composeResources/drawable/ic_soil_temperature.xml @@ -1,11 +1,18 @@ - - - - - - - - - - + + + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_sort.xml b/core/resources/src/commonMain/composeResources/drawable/ic_sort.xml new file mode 100644 index 000000000..17391d706 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_sort.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_speaker_notes.xml b/core/resources/src/commonMain/composeResources/drawable/ic_speaker_notes.xml new file mode 100644 index 000000000..8c6a43386 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_speaker_notes.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_speaker_notes_off.xml b/core/resources/src/commonMain/composeResources/drawable/ic_speaker_notes_off.xml new file mode 100644 index 000000000..f65ac8c0f --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_speaker_notes_off.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_speaker_phone.xml b/core/resources/src/commonMain/composeResources/drawable/ic_speaker_phone.xml new file mode 100644 index 000000000..06f5880c2 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_speaker_phone.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_speed.xml b/core/resources/src/commonMain/composeResources/drawable/ic_speed.xml new file mode 100644 index 000000000..8081754ae --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_speed.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_ssid_chart.xml b/core/resources/src/commonMain/composeResources/drawable/ic_ssid_chart.xml new file mode 100644 index 000000000..be9d2ced6 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_ssid_chart.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_stacked_line_chart.xml b/core/resources/src/commonMain/composeResources/drawable/ic_stacked_line_chart.xml new file mode 100644 index 000000000..d43d3ca8a --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_stacked_line_chart.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_star.xml b/core/resources/src/commonMain/composeResources/drawable/ic_star.xml new file mode 100644 index 000000000..b679cae97 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_star.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_star_border.xml b/core/resources/src/commonMain/composeResources/drawable/ic_star_border.xml new file mode 100644 index 000000000..b679cae97 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_star_border.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_storage.xml b/core/resources/src/commonMain/composeResources/drawable/ic_storage.xml new file mode 100644 index 000000000..122fcbba5 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_storage.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_system_update.xml b/core/resources/src/commonMain/composeResources/drawable/ic_system_update.xml new file mode 100644 index 000000000..51b52de0a --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_system_update.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_terminal.xml b/core/resources/src/commonMain/composeResources/drawable/ic_terminal.xml new file mode 100644 index 000000000..53a7a529d --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_terminal.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_thermostat.xml b/core/resources/src/commonMain/composeResources/drawable/ic_thermostat.xml new file mode 100644 index 000000000..477f5aefa --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_thermostat.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_thumb_up.xml b/core/resources/src/commonMain/composeResources/drawable/ic_thumb_up.xml new file mode 100644 index 000000000..923dc9ad2 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_thumb_up.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_trip_origin.xml b/core/resources/src/commonMain/composeResources/drawable/ic_trip_origin.xml new file mode 100644 index 000000000..7786fdcc4 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_trip_origin.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_tsunami.xml b/core/resources/src/commonMain/composeResources/drawable/ic_tsunami.xml new file mode 100644 index 000000000..896ddbb7b --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_tsunami.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_tune.xml b/core/resources/src/commonMain/composeResources/drawable/ic_tune.xml new file mode 100644 index 000000000..100f97e99 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_tune.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_upload.xml b/core/resources/src/commonMain/composeResources/drawable/ic_upload.xml new file mode 100644 index 000000000..faba85f21 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_upload.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_usb.xml b/core/resources/src/commonMain/composeResources/drawable/ic_usb.xml new file mode 100644 index 000000000..b143310ea --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_usb.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_usb_off.xml b/core/resources/src/commonMain/composeResources/drawable/ic_usb_off.xml new file mode 100644 index 000000000..4fd611054 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_usb_off.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_verified.xml b/core/resources/src/commonMain/composeResources/drawable/ic_verified.xml new file mode 100644 index 000000000..cc37964b6 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_verified.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_visibility.xml b/core/resources/src/commonMain/composeResources/drawable/ic_visibility.xml new file mode 100644 index 000000000..5c34d0fb4 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_visibility.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_visibility_off.xml b/core/resources/src/commonMain/composeResources/drawable/ic_visibility_off.xml new file mode 100644 index 000000000..5f8461a81 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_visibility_off.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_volume_mute.xml b/core/resources/src/commonMain/composeResources/drawable/ic_volume_mute.xml new file mode 100644 index 000000000..365755f28 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_volume_mute.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_volume_off.xml b/core/resources/src/commonMain/composeResources/drawable/ic_volume_off.xml new file mode 100644 index 000000000..67cfd3029 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_volume_off.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_volume_up.xml b/core/resources/src/commonMain/composeResources/drawable/ic_volume_up.xml new file mode 100644 index 000000000..7af57d8e2 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_volume_up.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_warning.xml b/core/resources/src/commonMain/composeResources/drawable/ic_warning.xml new file mode 100644 index 000000000..eccf236c5 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_warning.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_water_drop.xml b/core/resources/src/commonMain/composeResources/drawable/ic_water_drop.xml new file mode 100644 index 000000000..a4d8399b9 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_water_drop.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_waving_hand.xml b/core/resources/src/commonMain/composeResources/drawable/ic_waving_hand.xml new file mode 100644 index 000000000..6d73c96e8 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_waving_hand.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_wifi.xml b/core/resources/src/commonMain/composeResources/drawable/ic_wifi.xml new file mode 100644 index 000000000..af3ab82d3 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_wifi.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_wifi_channel.xml b/core/resources/src/commonMain/composeResources/drawable/ic_wifi_channel.xml new file mode 100644 index 000000000..ae6bd5af9 --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_wifi_channel.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/resources/src/commonMain/composeResources/drawable/ic_work.xml b/core/resources/src/commonMain/composeResources/drawable/ic_work.xml new file mode 100644 index 000000000..6c6d1fd4b --- /dev/null +++ b/core/resources/src/commonMain/composeResources/drawable/ic_work.xml @@ -0,0 +1,9 @@ + + + diff --git a/core/ui/build.gradle.kts b/core/ui/build.gradle.kts index dbbe12db9..05d276cf0 100644 --- a/core/ui/build.gradle.kts +++ b/core/ui/build.gradle.kts @@ -44,7 +44,6 @@ kotlin { implementation(projects.core.service) implementation(libs.compose.multiplatform.material3) - implementation(libs.compose.multiplatform.materialIconsExtended) implementation(libs.compose.multiplatform.ui) implementation(libs.compose.multiplatform.foundation) api(libs.compose.multiplatform.ui.tooling.preview) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/ConnectionsNavIcon.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/ConnectionsNavIcon.kt index 872a5b82a..de3908c54 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/ConnectionsNavIcon.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/ConnectionsNavIcon.kt @@ -17,12 +17,6 @@ package org.meshtastic.core.ui.component import androidx.compose.animation.Crossfade -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Bluetooth -import androidx.compose.material.icons.rounded.Cached -import androidx.compose.material.icons.rounded.Snooze -import androidx.compose.material.icons.rounded.Usb -import androidx.compose.material.icons.rounded.Wifi import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme.colorScheme import androidx.compose.runtime.Composable @@ -35,9 +29,14 @@ import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.graphics.vector.rememberVectorPainter import org.meshtastic.core.model.ConnectionState import org.meshtastic.core.model.DeviceType +import org.meshtastic.core.ui.icon.Bluetooth import org.meshtastic.core.ui.icon.Device +import org.meshtastic.core.ui.icon.DeviceSleep import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.icon.NoDevice +import org.meshtastic.core.ui.icon.Reconnecting +import org.meshtastic.core.ui.icon.Usb +import org.meshtastic.core.ui.icon.Wifi import org.meshtastic.core.ui.theme.StatusColors.StatusGreen import org.meshtastic.core.ui.theme.StatusColors.StatusOrange import org.meshtastic.core.ui.theme.StatusColors.StatusRed @@ -86,14 +85,14 @@ private fun getTint(connectionState: ConnectionState): Color = when (connectionS fun getIconPair(connectionState: ConnectionState, deviceType: DeviceType? = null): Pair = when (connectionState) { ConnectionState.Disconnected -> MeshtasticIcons.NoDevice to null - ConnectionState.DeviceSleep -> MeshtasticIcons.Device to Icons.Rounded.Snooze - ConnectionState.Connecting -> MeshtasticIcons.Device to Icons.Rounded.Cached + ConnectionState.DeviceSleep -> MeshtasticIcons.Device to MeshtasticIcons.DeviceSleep + ConnectionState.Connecting -> MeshtasticIcons.Device to MeshtasticIcons.Reconnecting else -> MeshtasticIcons.Device to when (deviceType) { - DeviceType.BLE -> Icons.Rounded.Bluetooth - DeviceType.TCP -> Icons.Rounded.Wifi - DeviceType.USB -> Icons.Rounded.Usb + DeviceType.BLE -> MeshtasticIcons.Bluetooth + DeviceType.TCP -> MeshtasticIcons.Wifi + DeviceType.USB -> MeshtasticIcons.Usb else -> null } } diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/CopyIconButton.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/CopyIconButton.kt index 05529c387..2d0172ea8 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/CopyIconButton.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/CopyIconButton.kt @@ -16,8 +16,6 @@ */ package org.meshtastic.core.ui.component -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.twotone.ContentCopy import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.runtime.Composable @@ -28,6 +26,8 @@ import kotlinx.coroutines.launch import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.copy +import org.meshtastic.core.ui.icon.Copy +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.util.createClipEntry @Composable @@ -47,6 +47,6 @@ fun CopyIconButton( } }, ) { - Icon(imageVector = Icons.TwoTone.ContentCopy, contentDescription = label) + Icon(imageVector = MeshtasticIcons.Copy, contentDescription = label) } } diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditBase64Preference.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditBase64Preference.kt index 26d2277a6..d62b8af99 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditBase64Preference.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditBase64Preference.kt @@ -21,9 +21,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.twotone.Close -import androidx.compose.material.icons.twotone.Refresh import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.LocalContentColor @@ -50,6 +47,9 @@ import org.meshtastic.core.model.util.encodeToString import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.error import org.meshtastic.core.resources.reset +import org.meshtastic.core.ui.icon.Close +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Refresh @Suppress("LongMethod", "CyclomaticComplexMethod", "MagicNumber") @Composable @@ -80,8 +80,8 @@ fun EditBase64Preference( val (icon, description) = when { - isError -> Icons.TwoTone.Close to stringResource(Res.string.error) - onGenerateKey != null && !isFocused -> Icons.TwoTone.Refresh to stringResource(Res.string.reset) + isError -> MeshtasticIcons.Close to stringResource(Res.string.error) + onGenerateKey != null && !isFocused -> MeshtasticIcons.Refresh to stringResource(Res.string.reset) else -> null to null } Column(modifier = modifier.padding(horizontal = 16.dp, vertical = 8.dp)) { diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditListPreference.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditListPreference.kt index 652762dac..c45834638 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditListPreference.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditListPreference.kt @@ -22,8 +22,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.twotone.Close import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -46,6 +44,8 @@ import org.meshtastic.core.resources.gpio_pin import org.meshtastic.core.resources.ignore_incoming import org.meshtastic.core.resources.name import org.meshtastic.core.resources.type +import org.meshtastic.core.ui.icon.Close +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.proto.RemoteHardwarePin import org.meshtastic.proto.RemoteHardwarePinType @@ -85,7 +85,7 @@ inline fun EditListPreference( }, ) { Icon( - imageVector = Icons.TwoTone.Close, + imageVector = MeshtasticIcons.Close, contentDescription = stringResource(Res.string.delete), modifier = Modifier.wrapContentSize(), ) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditPasswordPreference.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditPasswordPreference.kt index e8b71ee01..681952e61 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditPasswordPreference.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditPasswordPreference.kt @@ -18,8 +18,6 @@ package org.meshtastic.core.ui.component import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.twotone.VisibilityOff import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.runtime.Composable @@ -37,6 +35,8 @@ import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.hide_password import org.meshtastic.core.resources.show_password +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.VisibilityOff @Composable fun EditPasswordPreference( @@ -65,7 +65,8 @@ fun EditPasswordPreference( trailingIcon = { IconButton(onClick = { isPasswordVisible = !isPasswordVisible }) { Icon( - imageVector = if (isPasswordVisible) Icons.TwoTone.VisibilityOff else Icons.TwoTone.VisibilityOff, + imageVector = + if (isPasswordVisible) MeshtasticIcons.VisibilityOff else MeshtasticIcons.VisibilityOff, contentDescription = if (isPasswordVisible) { stringResource(Res.string.hide_password) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditTextPreference.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditTextPreference.kt index 9f6a59d5f..43a19ef1b 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditTextPreference.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditTextPreference.kt @@ -22,8 +22,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.twotone.Info import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedTextField @@ -45,6 +43,8 @@ import androidx.compose.ui.unit.dp import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.error +import org.meshtastic.core.ui.icon.Info +import org.meshtastic.core.ui.icon.MeshtasticIcons @Composable fun SignedIntegerEditTextPreference( @@ -234,7 +234,7 @@ fun EditTextPreference( } else if (isError) { { Icon( - imageVector = Icons.TwoTone.Info, + imageVector = MeshtasticIcons.Info, contentDescription = stringResource(Res.string.error), tint = MaterialTheme.colorScheme.error, ) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/HopsInfo.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/HopsInfo.kt index 42b569094..a7e13e54c 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/HopsInfo.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/HopsInfo.kt @@ -24,7 +24,7 @@ import androidx.compose.ui.tooling.preview.PreviewLightDark import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.hops_away -import org.meshtastic.core.ui.icon.Hops +import org.meshtastic.core.ui.icon.HopCount import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.theme.AppTheme @@ -32,7 +32,7 @@ import org.meshtastic.core.ui.theme.AppTheme fun HopsInfo(hops: Int, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface) { IconInfo( modifier = modifier, - icon = MeshtasticIcons.Hops, + icon = MeshtasticIcons.HopCount, contentDescription = stringResource(Res.string.hops_away), label = stringResource(Res.string.hops_away), text = hops.toString(), diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/ImportFab.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/ImportFab.kt index edda19c65..c461a065f 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/ImportFab.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/ImportFab.kt @@ -20,10 +20,6 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Link -import androidx.compose.material.icons.rounded.Nfc -import androidx.compose.material.icons.twotone.QrCodeScanner import androidx.compose.material3.OutlinedTextField import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -52,8 +48,11 @@ import org.meshtastic.core.resources.scan_shared_contact_nfc import org.meshtastic.core.resources.scan_shared_contact_qr import org.meshtastic.core.resources.share_channels_qr import org.meshtastic.core.resources.url +import org.meshtastic.core.ui.icon.LinkIcon import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Nfc import org.meshtastic.core.ui.icon.QrCode2 +import org.meshtastic.core.ui.icon.QrCodeScanner import org.meshtastic.core.ui.theme.AppTheme import org.meshtastic.core.ui.util.LocalBarcodeScannerProvider import org.meshtastic.core.ui.util.LocalBarcodeScannerSupported @@ -155,7 +154,7 @@ fun MeshtasticImportFAB( stringResource( if (isContactContext) Res.string.scan_shared_contact_nfc else Res.string.scan_channels_nfc, ), - icon = Icons.Rounded.Nfc, + icon = MeshtasticIcons.Nfc, onClick = { isNfcScanning = true }, testTag = "nfc_import", ), @@ -169,7 +168,7 @@ fun MeshtasticImportFAB( stringResource( if (isContactContext) Res.string.scan_shared_contact_qr else Res.string.scan_channels_qr, ), - icon = Icons.TwoTone.QrCodeScanner, + icon = MeshtasticIcons.QrCodeScanner, onClick = { barcodeScanner.startScan() }, testTag = "qr_import", ), @@ -182,7 +181,7 @@ fun MeshtasticImportFAB( stringResource( if (isContactContext) Res.string.input_shared_contact_url else Res.string.input_channel_url, ), - icon = Icons.Rounded.Link, + icon = MeshtasticIcons.LinkIcon, onClick = { showUrlDialog = true }, testTag = "url_import", ), diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/ListItem.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/ListItem.kt index e4442f4cd..cccdb8e44 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/ListItem.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/ListItem.kt @@ -19,9 +19,6 @@ package org.meshtastic.core.ui.component import androidx.compose.foundation.clickable import androidx.compose.foundation.combinedClickable import androidx.compose.foundation.layout.size -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.rounded.KeyboardArrowRight -import androidx.compose.material.icons.rounded.Android import androidx.compose.material3.Icon import androidx.compose.material3.ListItem import androidx.compose.material3.ListItemDefaults @@ -38,6 +35,9 @@ import androidx.compose.ui.platform.LocalClipboard import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import kotlinx.coroutines.launch +import org.meshtastic.core.ui.icon.Android +import org.meshtastic.core.ui.icon.KeyboardArrowRight +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.theme.AppTheme import org.meshtastic.core.ui.util.createClipEntry @@ -55,7 +55,7 @@ fun ListItem( enabled: Boolean = true, leadingIcon: ImageVector? = null, leadingIconTint: Color = LocalContentColor.current, - trailingIcon: ImageVector? = Icons.AutoMirrored.Rounded.KeyboardArrowRight, + trailingIcon: ImageVector? = MeshtasticIcons.KeyboardArrowRight, trailingIconTint: Color = LocalContentColor.current, onClick: (() -> Unit)? = null, ) { @@ -154,25 +154,25 @@ fun ImageVector?.icon(tint: Color = LocalContentColor.current): @Composable (() @Preview(showBackground = true) @Composable private fun ListItemPreview() { - AppTheme { ListItem(text = "Text", leadingIcon = Icons.Rounded.Android, enabled = true) {} } + AppTheme { ListItem(text = "Text", leadingIcon = MeshtasticIcons.Android, enabled = true) {} } } @Preview(showBackground = true) @Composable private fun ListItemDisabledPreview() { - AppTheme { ListItem(text = "Text", leadingIcon = Icons.Rounded.Android, enabled = false) {} } + AppTheme { ListItem(text = "Text", leadingIcon = MeshtasticIcons.Android, enabled = false) {} } } @Preview(showBackground = true) @Composable private fun SwitchListItemPreview() { - AppTheme { SwitchListItem(text = "Text", leadingIcon = Icons.Rounded.Android, checked = true, onClick = {}) } + AppTheme { SwitchListItem(text = "Text", leadingIcon = MeshtasticIcons.Android, checked = true, onClick = {}) } } @Preview(showBackground = true) @Composable private fun ListItemPreviewSupportingText() { AppTheme { - ListItem(text = "Text 1", leadingIcon = Icons.Rounded.Android, supportingText = "Text2", trailingIcon = null) + ListItem(text = "Text 1", leadingIcon = MeshtasticIcons.Android, supportingText = "Text2", trailingIcon = null) } } diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/LoraSignalIndicator.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/LoraSignalIndicator.kt index 18992c0e7..216ec2108 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/LoraSignalIndicator.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/LoraSignalIndicator.kt @@ -27,11 +27,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.SignalCellular4Bar -import androidx.compose.material.icons.rounded.SignalCellularAlt -import androidx.compose.material.icons.rounded.SignalCellularAlt1Bar -import androidx.compose.material.icons.rounded.SignalCellularAlt2Bar import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme.colorScheme @@ -41,15 +36,20 @@ import androidx.compose.runtime.Stable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.unit.dp +import org.jetbrains.compose.resources.DrawableResource import org.jetbrains.compose.resources.StringResource import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.common.util.formatString import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.bad import org.meshtastic.core.resources.fair import org.meshtastic.core.resources.good +import org.meshtastic.core.resources.ic_signal_cellular_4_bar +import org.meshtastic.core.resources.ic_signal_cellular_alt +import org.meshtastic.core.resources.ic_signal_cellular_alt_1_bar +import org.meshtastic.core.resources.ic_signal_cellular_alt_2_bar import org.meshtastic.core.resources.none_quality import org.meshtastic.core.resources.rssi import org.meshtastic.core.resources.signal @@ -69,13 +69,13 @@ const val RSSI_FAIR_THRESHOLD = -126 @Stable enum class Quality( @Stable val nameRes: StringResource, - @Stable val imageVector: ImageVector, + @Stable val icon: DrawableResource, @Stable val color: @Composable () -> Color, ) { - NONE(Res.string.none_quality, Icons.Rounded.SignalCellularAlt1Bar, { colorScheme.StatusRed }), - BAD(Res.string.bad, Icons.Rounded.SignalCellularAlt2Bar, { colorScheme.StatusOrange }), - FAIR(Res.string.fair, Icons.Rounded.SignalCellularAlt, { colorScheme.StatusYellow }), - GOOD(Res.string.good, Icons.Rounded.SignalCellular4Bar, { colorScheme.StatusGreen }), + NONE(Res.string.none_quality, Res.drawable.ic_signal_cellular_alt_1_bar, { colorScheme.StatusRed }), + BAD(Res.string.bad, Res.drawable.ic_signal_cellular_alt_2_bar, { colorScheme.StatusOrange }), + FAIR(Res.string.fair, Res.drawable.ic_signal_cellular_alt, { colorScheme.StatusYellow }), + GOOD(Res.string.good, Res.drawable.ic_signal_cellular_4_bar, { colorScheme.StatusGreen }), } /** @@ -100,9 +100,9 @@ fun NodeSignalQuality(snr: Float, rssi: Int, modifier: Modifier = Modifier) { ) Icon( modifier = Modifier.size(SIZE_ICON_DP.dp), - imageVector = quality.imageVector, + imageVector = vectorResource(quality.icon), contentDescription = stringResource(Res.string.signal_quality), - tint = quality.color.invoke(), + tint = quality.color(), ) } } @@ -129,9 +129,9 @@ fun LoraSignalIndicator(snr: Float, rssi: Int, contentColor: Color = MaterialThe ) { Icon( modifier = Modifier.size(SIZE_ICON_DP.dp), - imageVector = quality.imageVector, + imageVector = vectorResource(quality.icon), contentDescription = stringResource(Res.string.signal_quality), - tint = quality.color.invoke(), + tint = quality.color(), ) Text( text = "${stringResource(Res.string.signal)} ${stringResource(quality.nameRes)}", diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MainAppBar.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MainAppBar.kt index 650c357b5..2bf85818e 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MainAppBar.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MainAppBar.kt @@ -20,8 +20,6 @@ import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeOut import androidx.compose.foundation.layout.padding -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi import androidx.compose.material3.Icon @@ -39,6 +37,8 @@ import org.meshtastic.core.model.Node import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.ic_meshtastic import org.meshtastic.core.resources.navigate_back +import org.meshtastic.core.ui.icon.ArrowBack +import org.meshtastic.core.ui.icon.MeshtasticIcons @OptIn(ExperimentalMaterial3ExpressiveApi::class, ExperimentalMaterial3Api::class) @Composable @@ -78,7 +78,7 @@ fun MainAppBar( { IconButton(onClick = onNavigateUp) { Icon( - imageVector = Icons.AutoMirrored.Filled.ArrowBack, + imageVector = MeshtasticIcons.ArrowBack, contentDescription = stringResource(Res.string.navigate_back), ) } diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MaterialBatteryInfo.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MaterialBatteryInfo.kt index 4b64052e5..7e8bd9b6a 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MaterialBatteryInfo.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MaterialBatteryInfo.kt @@ -19,8 +19,6 @@ package org.meshtastic.core.ui.component import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.size -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Power import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text @@ -45,6 +43,7 @@ import org.meshtastic.core.resources.unknown import org.meshtastic.core.ui.icon.BatteryEmpty import org.meshtastic.core.ui.icon.BatteryUnknown import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.PowerSupply import org.meshtastic.core.ui.theme.AppTheme import org.meshtastic.core.ui.theme.StatusColors.StatusGreen import org.meshtastic.core.ui.theme.StatusColors.StatusOrange @@ -78,7 +77,7 @@ fun MaterialBatteryInfo( } else if (level > 100) { Icon( modifier = Modifier.size(SIZE_ICON.dp).rotate(90f), - imageVector = Icons.Rounded.Power, + imageVector = MeshtasticIcons.PowerSupply, tint = contentColor.copy(alpha = 0.65f), contentDescription = levelString, ) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MaterialBluetoothSignalInfo.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MaterialBluetoothSignalInfo.kt index cfc368275..a0663ad86 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MaterialBluetoothSignalInfo.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MaterialBluetoothSignalInfo.kt @@ -19,9 +19,6 @@ package org.meshtastic.core.ui.component import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.size -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Bluetooth -import androidx.compose.material.icons.rounded.SignalCellularOff import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface @@ -41,12 +38,14 @@ import androidx.compose.ui.unit.dp import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.dbm_value +import org.meshtastic.core.ui.icon.Bluetooth import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.icon.SignalCellular0Bar import org.meshtastic.core.ui.icon.SignalCellular1Bar import org.meshtastic.core.ui.icon.SignalCellular2Bar import org.meshtastic.core.ui.icon.SignalCellular3Bar import org.meshtastic.core.ui.icon.SignalCellular4Bar +import org.meshtastic.core.ui.icon.SignalOff import org.meshtastic.core.ui.theme.AppTheme import org.meshtastic.core.ui.theme.StatusColors.StatusGreen import org.meshtastic.core.ui.theme.StatusColors.StatusOrange @@ -84,7 +83,7 @@ fun MaterialSignalInfo( 2 -> MeshtasticIcons.SignalCellular2Bar to MaterialTheme.colorScheme.StatusOrange 3 -> MeshtasticIcons.SignalCellular3Bar to MaterialTheme.colorScheme.StatusYellow 4 -> MeshtasticIcons.SignalCellular4Bar to MaterialTheme.colorScheme.StatusGreen - else -> Icons.Rounded.SignalCellularOff to MaterialTheme.colorScheme.onSurfaceVariant + else -> MeshtasticIcons.SignalOff to MaterialTheme.colorScheme.onSurfaceVariant } val foregroundPainter = typeIcon?.let { rememberVectorPainter(typeIcon) } @@ -117,7 +116,7 @@ fun MaterialBluetoothSignalInfo(rssi: Int, modifier: Modifier = Modifier) { modifier = modifier, signalBars = getBluetoothSignalBars(rssi = rssi), signalStrengthValue = stringResource(Res.string.dbm_value, rssi), - typeIcon = Icons.Rounded.Bluetooth, + typeIcon = MeshtasticIcons.Bluetooth, ) } diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MenuFAB.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MenuFAB.kt index 724e7e0dd..757127d50 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MenuFAB.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MenuFAB.kt @@ -16,9 +16,6 @@ */ package org.meshtastic.core.ui.component -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.rounded.OfflineShare -import androidx.compose.material.icons.filled.Close import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi import androidx.compose.material3.FloatingActionButtonMenu import androidx.compose.material3.FloatingActionButtonMenuItem @@ -31,6 +28,9 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.testTag +import org.meshtastic.core.ui.icon.Close +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.OfflineShare @OptIn(ExperimentalMaterial3ExpressiveApi::class) @Composable @@ -50,7 +50,7 @@ fun MenuFAB( checked = expanded, onCheckedChange = onExpandedChange, content = { - val imageVector = if (expanded) Icons.Filled.Close else Icons.AutoMirrored.Rounded.OfflineShare + val imageVector = if (expanded) MeshtasticIcons.Close else MeshtasticIcons.OfflineShare Icon(imageVector = imageVector, contentDescription = contentDescription) }, containerColor = ToggleFloatingActionButtonDefaults.containerColor(), diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MeshtasticNavigationSuite.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MeshtasticNavigationSuite.kt index 39f8fc6b1..1e0fae0c5 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MeshtasticNavigationSuite.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/MeshtasticNavigationSuite.kt @@ -47,6 +47,7 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.lifecycle.compose.collectAsStateWithLifecycle import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.model.ConnectionState import org.meshtastic.core.model.DeviceType import org.meshtastic.core.navigation.ContactsRoutes @@ -225,7 +226,7 @@ private fun NavigationIconContent( ) { Crossfade(isSelected, label = "BottomBarIcon") { isSelectedState -> Icon( - imageVector = destination.icon, + imageVector = vectorResource(destination.icon), contentDescription = stringResource(destination.label), tint = if (isSelectedState) colorScheme.primary else LocalContentColor.current, ) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/NodeKeyStatusIcon.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/NodeKeyStatusIcon.kt index ad1110867..9ba911bb0 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/NodeKeyStatusIcon.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/NodeKeyStatusIcon.kt @@ -45,14 +45,15 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewLightDark import androidx.compose.ui.unit.dp import okio.ByteString +import org.jetbrains.compose.resources.DrawableResource import org.jetbrains.compose.resources.StringResource import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.model.Channel import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.config_security_public_key @@ -63,6 +64,9 @@ import org.meshtastic.core.resources.encryption_pkc_text import org.meshtastic.core.resources.encryption_psk import org.meshtastic.core.resources.encryption_psk_text import org.meshtastic.core.resources.error +import org.meshtastic.core.resources.ic_key_off +import org.meshtastic.core.resources.ic_lock +import org.meshtastic.core.resources.ic_lock_open import org.meshtastic.core.resources.security_icon_help_dismiss import org.meshtastic.core.resources.security_icon_help_show_all import org.meshtastic.core.resources.security_icon_help_show_less @@ -136,7 +140,7 @@ fun NodeKeyStatusIcon( */ @Immutable enum class NodeKeySecurityState( - @Stable val icon: ImageVector, + @Stable val icon: DrawableResource, @Stable val color: @Composable () -> Color, val descriptionResId: StringResource, val helpTextResId: StringResource, @@ -144,7 +148,7 @@ enum class NodeKeySecurityState( ) { // State for public key mismatch PKM( - icon = MeshtasticIcons.KeyOff, + icon = Res.drawable.ic_key_off, color = { colorScheme.StatusRed }, descriptionResId = Res.string.encryption_error, helpTextResId = Res.string.encryption_error_text, @@ -153,7 +157,7 @@ enum class NodeKeySecurityState( // State for public key encryption PKC( - icon = MeshtasticIcons.Lock, + icon = Res.drawable.ic_lock, color = { colorScheme.StatusGreen }, title = Res.string.encryption_pkc, helpTextResId = Res.string.encryption_pkc_text, @@ -162,7 +166,7 @@ enum class NodeKeySecurityState( // State for shared key encryption PSK( - icon = MeshtasticIcons.LockOpen, + icon = Res.drawable.ic_lock_open, color = { colorScheme.StatusYellow }, title = Res.string.encryption_psk, helpTextResId = Res.string.encryption_psk_text, @@ -252,14 +256,13 @@ private fun AllKeyStates() { modifier = Modifier.verticalScroll(rememberScrollState()), ) { NodeKeySecurityState.entries.forEach { state -> - // Uses enum entries Row(verticalAlignment = Alignment.CenterVertically) { - when (state) { - NodeKeySecurityState.PKM -> NodeKeyStatusIcon(hasPKC = false, mismatchKey = true) - - NodeKeySecurityState.PKC -> NodeKeyStatusIcon(hasPKC = true, mismatchKey = false) - - else -> NodeKeyStatusIcon(hasPKC = false, mismatchKey = false) + IconButton(onClick = {}, modifier = Modifier) { + Icon( + imageVector = vectorResource(state.icon), + contentDescription = stringResource(state.descriptionResId), + tint = state.color(), + ) } Column(modifier = Modifier.padding(start = 16.dp)) { diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/QrDialog.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/QrDialog.kt index d72c4cde0..1dd55b78e 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/QrDialog.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/QrDialog.kt @@ -24,8 +24,6 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.twotone.ContentCopy import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -46,6 +44,8 @@ import org.meshtastic.core.resources.copy import org.meshtastic.core.resources.okay import org.meshtastic.core.resources.qr_code import org.meshtastic.core.resources.url +import org.meshtastic.core.ui.icon.Copy +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.util.SetScreenBrightness import org.meshtastic.core.ui.util.createClipEntry @@ -91,10 +91,7 @@ fun QrDialog(title: String, uriString: String, qrPainter: Painter?, onDismiss: ( coroutineScope.launch { clipboardManager.setClipEntry(createClipEntry(uriString)) } }, ) { - Icon( - imageVector = Icons.TwoTone.ContentCopy, - contentDescription = stringResource(Res.string.copy), - ) + Icon(imageVector = MeshtasticIcons.Copy, contentDescription = stringResource(Res.string.copy)) } } } diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/SecurityIcon.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/SecurityIcon.kt index c5bab9c56..d16beab70 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/SecurityIcon.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/SecurityIcon.kt @@ -53,11 +53,16 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import org.jetbrains.compose.resources.DrawableResource import org.jetbrains.compose.resources.StringResource import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.model.Channel import org.meshtastic.core.model.util.getChannel import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_lock +import org.meshtastic.core.resources.ic_lock_open +import org.meshtastic.core.resources.ic_warning import org.meshtastic.core.resources.security_icon_badge_warning_description import org.meshtastic.core.resources.security_icon_description import org.meshtastic.core.resources.security_icon_help_dismiss @@ -73,10 +78,6 @@ import org.meshtastic.core.resources.security_icon_insecure_no_precise import org.meshtastic.core.resources.security_icon_insecure_precise_only import org.meshtastic.core.resources.security_icon_secure import org.meshtastic.core.resources.security_icon_warning_precise_mqtt -import org.meshtastic.core.ui.icon.Lock -import org.meshtastic.core.ui.icon.LockOpen -import org.meshtastic.core.ui.icon.MeshtasticIcons -import org.meshtastic.core.ui.icon.Warning import org.meshtastic.core.ui.theme.StatusColors.StatusGreen import org.meshtastic.core.ui.theme.StatusColors.StatusRed import org.meshtastic.core.ui.theme.StatusColors.StatusYellow @@ -99,16 +100,16 @@ private const val PRECISE_POSITION_BITS = 32 */ @Immutable enum class SecurityState( - @Stable val icon: ImageVector, + @Stable val icon: DrawableResource, @Stable val color: @Composable () -> Color, val descriptionResId: StringResource, val helpTextResId: StringResource, - @Stable val badgeIcon: ImageVector? = null, + @Stable val badgeIcon: DrawableResource? = null, @Stable val badgeIconColor: @Composable () -> Color? = { null }, ) { /** State for a secure channel (green lock). */ SECURE( - icon = MeshtasticIcons.Lock, + icon = Res.drawable.ic_lock, color = { colorScheme.StatusGreen }, descriptionResId = Res.string.security_icon_secure, helpTextResId = Res.string.security_icon_help_green_lock, @@ -119,7 +120,7 @@ enum class SecurityState( * warning. (yellow open lock) */ INSECURE_NO_PRECISE( - icon = MeshtasticIcons.LockOpen, + icon = Res.drawable.ic_lock_open, color = { colorScheme.StatusYellow }, descriptionResId = Res.string.security_icon_insecure_no_precise, helpTextResId = Res.string.security_icon_help_yellow_open_lock, @@ -130,7 +131,7 @@ enum class SecurityState( * lock) */ INSECURE_PRECISE_ONLY( - icon = MeshtasticIcons.LockOpen, + icon = Res.drawable.ic_lock_open, color = { colorScheme.StatusRed }, descriptionResId = Res.string.security_icon_insecure_precise_only, helpTextResId = Res.string.security_icon_help_red_open_lock, @@ -141,11 +142,11 @@ enum class SecurityState( * badge). */ INSECURE_PRECISE_MQTT_WARNING( - icon = MeshtasticIcons.LockOpen, + icon = Res.drawable.ic_lock_open, color = { colorScheme.StatusRed }, descriptionResId = Res.string.security_icon_warning_precise_mqtt, helpTextResId = Res.string.security_icon_help_warning_precise_mqtt, - badgeIcon = MeshtasticIcons.Warning, + badgeIcon = Res.drawable.ic_warning, badgeIconColor = { colorScheme.StatusYellow }, ), } @@ -238,11 +239,11 @@ fun SecurityIcon( }, ) { SecurityIconDisplay( - icon = securityState.icon, - mainIconTint = securityState.color.invoke(), + icon = vectorResource(securityState.icon), + mainIconTint = securityState.color(), contentDescription = fullContentDescription, - badgeIcon = securityState.badgeIcon, - badgeIconColor = securityState.badgeIconColor.invoke(), + badgeIcon = securityState.badgeIcon?.let { vectorResource(it) }, + badgeIconColor = securityState.badgeIconColor(), ) } @@ -453,12 +454,12 @@ private fun SecurityHelpDialog(securityState: SecurityState, onDismiss: () -> Un private fun ContextualSecurityState(securityState: SecurityState) { Column(horizontalAlignment = Alignment.CenterHorizontally) { SecurityIconDisplay( - icon = securityState.icon, - mainIconTint = securityState.color.invoke(), + icon = vectorResource(securityState.icon), + mainIconTint = securityState.color(), contentDescription = stringResource(securityState.descriptionResId), modifier = Modifier.size(48.dp), - badgeIcon = securityState.badgeIcon, - badgeIconColor = securityState.badgeIconColor.invoke(), + badgeIcon = securityState.badgeIcon?.let { vectorResource(it) }, + badgeIconColor = securityState.badgeIconColor(), ) Spacer(Modifier.height(16.dp)) Text(text = stringResource(securityState.helpTextResId), style = MaterialTheme.typography.bodyMedium) @@ -479,12 +480,12 @@ private fun AllSecurityStates() { // Uses enum entries Row(verticalAlignment = Alignment.CenterVertically) { SecurityIconDisplay( - icon = state.icon, - mainIconTint = state.color.invoke(), + icon = vectorResource(state.icon), + mainIconTint = state.color(), contentDescription = stringResource(state.descriptionResId), modifier = Modifier.size(48.dp), - badgeIcon = state.badgeIcon, - badgeIconColor = state.badgeIconColor.invoke(), + badgeIcon = state.badgeIcon?.let { vectorResource(it) }, + badgeIconColor = state.badgeIconColor(), ) Column(modifier = Modifier.padding(start = 16.dp)) { Text(text = stringResource(state.descriptionResId), style = MaterialTheme.typography.titleMedium) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/SignalInfo.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/SignalInfo.kt index 0a9c9b7e1..5a6c58c23 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/SignalInfo.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/SignalInfo.kt @@ -33,6 +33,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.common.util.formatString import org.meshtastic.core.model.Node import org.meshtastic.core.resources.Res @@ -58,7 +59,7 @@ fun SignalInfo( horizontalArrangement = Arrangement.spacedBy(4.dp), ) { Icon( - imageVector = quality.imageVector, + imageVector = vectorResource(quality.icon), contentDescription = stringResource(Res.string.signal_quality), modifier = Modifier.size(16.dp), tint = signalColor, diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/TelemetryInfo.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/TelemetryInfo.kt index 26877ab5f..b60cec418 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/TelemetryInfo.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/TelemetryInfo.kt @@ -55,15 +55,15 @@ import org.meshtastic.core.resources.temperature import org.meshtastic.core.resources.uptime import org.meshtastic.core.ui.icon.AirQuality import org.meshtastic.core.ui.icon.ArrowCircleUp +import org.meshtastic.core.ui.icon.ElectricPower import org.meshtastic.core.ui.icon.HardwareModel import org.meshtastic.core.ui.icon.Humidity import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.icon.NodeId -import org.meshtastic.core.ui.icon.Paxcount -import org.meshtastic.core.ui.icon.Power +import org.meshtastic.core.ui.icon.PeopleCount import org.meshtastic.core.ui.icon.Pressure import org.meshtastic.core.ui.icon.Role -import org.meshtastic.core.ui.icon.Soil +import org.meshtastic.core.ui.icon.SoilMoisture import org.meshtastic.core.ui.icon.Temperature import org.meshtastic.core.ui.icon.role import org.meshtastic.proto.Config @@ -126,7 +126,7 @@ fun SoilTemperatureInfo( ) { OverlayIconInfo( modifier = modifier, - icon = MeshtasticIcons.Soil, + icon = MeshtasticIcons.SoilMoisture, overlayIcon = MeshtasticIcons.Temperature, contentDescription = stringResource(Res.string.env_metrics_log), label = stringResource(Res.string.soil_temperature), @@ -143,7 +143,7 @@ fun SoilMoistureInfo( ) { OverlayIconInfo( modifier = modifier, - icon = MeshtasticIcons.Soil, + icon = MeshtasticIcons.SoilMoisture, overlayIcon = MeshtasticIcons.Humidity, contentDescription = stringResource(Res.string.env_metrics_log), label = stringResource(Res.string.soil_moisture), @@ -160,7 +160,7 @@ fun PaxcountInfo( ) { IconInfo( modifier = modifier, - icon = MeshtasticIcons.Paxcount, + icon = MeshtasticIcons.PeopleCount, contentDescription = stringResource(Res.string.pax_metrics_log), label = stringResource(Res.string.pax), text = pax, @@ -193,7 +193,7 @@ fun PowerInfo( ) { IconInfo( modifier = modifier, - icon = MeshtasticIcons.Power, + icon = MeshtasticIcons.ElectricPower, contentDescription = stringResource(Res.string.env_metrics_log), label = label, text = value, diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/TransportIcon.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/TransportIcon.kt index 538eaf996..92d3df65c 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/TransportIcon.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/TransportIcon.kt @@ -26,9 +26,9 @@ import org.meshtastic.core.resources.via_api import org.meshtastic.core.resources.via_mqtt import org.meshtastic.core.resources.via_udp import org.meshtastic.core.ui.icon.Api -import org.meshtastic.core.ui.icon.Cloud import org.meshtastic.core.ui.icon.Device import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.MqttConnected import org.meshtastic.core.ui.icon.Udp import org.meshtastic.proto.MeshPacket @@ -37,7 +37,7 @@ fun TransportIcon(transport: Int, viaMqtt: Boolean, modifier: Modifier = Modifie val (icon, description) = when { viaMqtt || transport == MeshPacket.TransportMechanism.TRANSPORT_MQTT.value -> - MeshtasticIcons.Cloud to stringResource(Res.string.via_mqtt) + MeshtasticIcons.MqttConnected to stringResource(Res.string.via_mqtt) transport == MeshPacket.TransportMechanism.TRANSPORT_MULTICAST_UDP.value -> MeshtasticIcons.Udp to stringResource(Res.string.via_udp) transport == MeshPacket.TransportMechanism.TRANSPORT_API.value -> diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/emoji/EmojiPickerDialog.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/emoji/EmojiPickerDialog.kt index 9a67babc0..b0e01011e 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/emoji/EmojiPickerDialog.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/emoji/EmojiPickerDialog.kt @@ -43,9 +43,6 @@ import androidx.compose.foundation.lazy.grid.LazyVerticalGrid import androidx.compose.foundation.lazy.grid.rememberLazyGridState import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Close -import androidx.compose.material.icons.rounded.Search import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -80,6 +77,9 @@ import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.clear import org.meshtastic.core.resources.search_emoji import org.meshtastic.core.ui.component.BottomSheetDialog +import org.meshtastic.core.ui.icon.Close +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Search // ── Constants ────────────────────────────────────────────────────────────────── @@ -218,13 +218,13 @@ private fun SearchBar(query: String, onQueryChange: (String) -> Unit) { ) }, leadingIcon = { - Icon(imageVector = Icons.Rounded.Search, contentDescription = null, modifier = Modifier.size(20.dp)) + Icon(imageVector = MeshtasticIcons.Search, contentDescription = null, modifier = Modifier.size(20.dp)) }, trailingIcon = { if (query.isNotEmpty()) { IconButton(onClick = { onQueryChange("") }) { Icon( - imageVector = Icons.Rounded.Close, + imageVector = MeshtasticIcons.Close, contentDescription = stringResource(Res.string.clear), modifier = Modifier.size(20.dp), ) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Actions.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Actions.kt index 3506605e3..456470f6e 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Actions.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Actions.kt @@ -16,74 +16,126 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.Reply -import androidx.compose.material.icons.automirrored.filled.Send -import androidx.compose.material.icons.automirrored.filled.Sort -import androidx.compose.material.icons.rounded.Add -import androidx.compose.material.icons.rounded.AddReaction -import androidx.compose.material.icons.rounded.Clear -import androidx.compose.material.icons.rounded.Close -import androidx.compose.material.icons.rounded.CloudDownload -import androidx.compose.material.icons.rounded.ContentCopy -import androidx.compose.material.icons.rounded.Delete -import androidx.compose.material.icons.rounded.Edit -import androidx.compose.material.icons.rounded.Folder -import androidx.compose.material.icons.rounded.MarkChatRead -import androidx.compose.material.icons.rounded.MoreVert -import androidx.compose.material.icons.rounded.QrCode2 -import androidx.compose.material.icons.rounded.Refresh -import androidx.compose.material.icons.rounded.Save -import androidx.compose.material.icons.rounded.Search -import androidx.compose.material.icons.rounded.SelectAll -import androidx.compose.material.icons.rounded.Share -import androidx.compose.material.icons.rounded.SystemUpdate -import androidx.compose.material.icons.rounded.ThumbUp +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_add +import org.meshtastic.core.resources.ic_add_reaction +import org.meshtastic.core.resources.ic_bar_chart +import org.meshtastic.core.resources.ic_clear +import org.meshtastic.core.resources.ic_close +import org.meshtastic.core.resources.ic_content_copy +import org.meshtastic.core.resources.ic_delete +import org.meshtastic.core.resources.ic_done +import org.meshtastic.core.resources.ic_download +import org.meshtastic.core.resources.ic_drag_handle +import org.meshtastic.core.resources.ic_edit +import org.meshtastic.core.resources.ic_file_download +import org.meshtastic.core.resources.ic_filter_alt +import org.meshtastic.core.resources.ic_filter_alt_off +import org.meshtastic.core.resources.ic_folder +import org.meshtastic.core.resources.ic_folder_open +import org.meshtastic.core.resources.ic_list +import org.meshtastic.core.resources.ic_mark_chat_read +import org.meshtastic.core.resources.ic_more_vert +import org.meshtastic.core.resources.ic_offline_share +import org.meshtastic.core.resources.ic_output +import org.meshtastic.core.resources.ic_play_arrow +import org.meshtastic.core.resources.ic_power_settings_new +import org.meshtastic.core.resources.ic_qr_code +import org.meshtastic.core.resources.ic_qr_code_2 +import org.meshtastic.core.resources.ic_qr_code_scanner +import org.meshtastic.core.resources.ic_refresh +import org.meshtastic.core.resources.ic_reply +import org.meshtastic.core.resources.ic_restart_alt +import org.meshtastic.core.resources.ic_restore +import org.meshtastic.core.resources.ic_save +import org.meshtastic.core.resources.ic_search +import org.meshtastic.core.resources.ic_select_all +import org.meshtastic.core.resources.ic_send +import org.meshtastic.core.resources.ic_share +import org.meshtastic.core.resources.ic_sort +import org.meshtastic.core.resources.ic_system_update +import org.meshtastic.core.resources.ic_thumb_up +import org.meshtastic.core.resources.ic_upload val MeshtasticIcons.Add: ImageVector - get() = Icons.Rounded.Add + @Composable get() = vectorResource(Res.drawable.ic_add) val MeshtasticIcons.AddReaction: ImageVector - get() = Icons.Rounded.AddReaction + @Composable get() = vectorResource(Res.drawable.ic_add_reaction) val MeshtasticIcons.Clear: ImageVector - get() = Icons.Rounded.Clear + @Composable get() = vectorResource(Res.drawable.ic_clear) val MeshtasticIcons.Close: ImageVector - get() = Icons.Rounded.Close + @Composable get() = vectorResource(Res.drawable.ic_close) val MeshtasticIcons.Copy: ImageVector - get() = Icons.Rounded.ContentCopy + @Composable get() = vectorResource(Res.drawable.ic_content_copy) val MeshtasticIcons.Delete: ImageVector - get() = Icons.Rounded.Delete + @Composable get() = vectorResource(Res.drawable.ic_delete) val MeshtasticIcons.Edit: ImageVector - get() = Icons.Rounded.Edit + @Composable get() = vectorResource(Res.drawable.ic_edit) val MeshtasticIcons.More: ImageVector - get() = Icons.Rounded.MoreVert + @Composable get() = vectorResource(Res.drawable.ic_more_vert) val MeshtasticIcons.Refresh: ImageVector - get() = Icons.Rounded.Refresh + @Composable get() = vectorResource(Res.drawable.ic_refresh) val MeshtasticIcons.Reply: ImageVector - get() = Icons.AutoMirrored.Filled.Reply + @Composable get() = vectorResource(Res.drawable.ic_reply) val MeshtasticIcons.Save: ImageVector - get() = Icons.Rounded.Save + @Composable get() = vectorResource(Res.drawable.ic_save) val MeshtasticIcons.Search: ImageVector - get() = Icons.Rounded.Search + @Composable get() = vectorResource(Res.drawable.ic_search) val MeshtasticIcons.Send: ImageVector - get() = Icons.AutoMirrored.Filled.Send + @Composable get() = vectorResource(Res.drawable.ic_send) val MeshtasticIcons.Share: ImageVector - get() = Icons.Rounded.Share + @Composable get() = vectorResource(Res.drawable.ic_share) val MeshtasticIcons.Sort: ImageVector - get() = Icons.AutoMirrored.Filled.Sort -val MeshtasticIcons.CloudDownload: ImageVector - get() = Icons.Rounded.CloudDownload + @Composable get() = vectorResource(Res.drawable.ic_sort) val MeshtasticIcons.Folder: ImageVector - get() = Icons.Rounded.Folder + @Composable get() = vectorResource(Res.drawable.ic_folder) val MeshtasticIcons.SystemUpdate: ImageVector - get() = Icons.Rounded.SystemUpdate + @Composable get() = vectorResource(Res.drawable.ic_system_update) val MeshtasticIcons.SelectAll: ImageVector - get() = Icons.Rounded.SelectAll + @Composable get() = vectorResource(Res.drawable.ic_select_all) val MeshtasticIcons.ThumbUp: ImageVector - get() = Icons.Rounded.ThumbUp - + @Composable get() = vectorResource(Res.drawable.ic_thumb_up) val MeshtasticIcons.MarkChatRead: ImageVector - get() = Icons.Rounded.MarkChatRead - + @Composable get() = vectorResource(Res.drawable.ic_mark_chat_read) val MeshtasticIcons.QrCode2: ImageVector - get() = Icons.Rounded.QrCode2 + @Composable get() = vectorResource(Res.drawable.ic_qr_code_2) + +val MeshtasticIcons.Download: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_download) +val MeshtasticIcons.Upload: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_upload) +val MeshtasticIcons.DragHandle: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_drag_handle) +val MeshtasticIcons.Done: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_done) +val MeshtasticIcons.QrCode: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_qr_code) +val MeshtasticIcons.FolderOpen: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_folder_open) +val MeshtasticIcons.Output: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_output) +val MeshtasticIcons.FileDownload: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_file_download) +val MeshtasticIcons.PlayArrow: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_play_arrow) +val MeshtasticIcons.FilterAlt: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_filter_alt) +val MeshtasticIcons.FilterAltOff: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_filter_alt_off) +val MeshtasticIcons.OfflineShare: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_offline_share) +val MeshtasticIcons.QrCodeScanner: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_qr_code_scanner) +val MeshtasticIcons.RestartAlt: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_restart_alt) +val MeshtasticIcons.PowerSettingsNew: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_power_settings_new) +val MeshtasticIcons.FactoryReset: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_restore) +val MeshtasticIcons.BarChart: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_bar_chart) +val MeshtasticIcons.List: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_list) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Battery.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Battery.kt index 0ecd42227..6c458be40 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Battery.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Battery.kt @@ -16,168 +16,19 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.SolidColor +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.graphics.vector.path -import androidx.compose.ui.unit.dp +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_battery_alert +import org.meshtastic.core.resources.ic_battery_horiz_000 +import org.meshtastic.core.resources.ic_battery_question_mark -/** - * This is from Material Symbols. - * - * @see - * [battery_android_0](https://fonts.google.com/icons?icon.query=battery+android+0&icon.size=24&icon.color=%23e3e3e3&icon.style=Rounded) - */ val MeshtasticIcons.BatteryEmpty: ImageVector - get() { - if (batteryEmpty != null) { - return batteryEmpty!! - } - batteryEmpty = - ImageVector.Builder( - name = "BatteryEmpty", - defaultWidth = 24.dp, - defaultHeight = 24.dp, - viewportWidth = 960f, - viewportHeight = 960f, - ) - .apply { - path(fill = SolidColor(Color.Black)) { - moveTo(160f, 720f) - quadToRelative(-50f, 0f, -85f, -35f) - reflectiveQuadToRelative(-35f, -85f) - verticalLineToRelative(-240f) - quadToRelative(0f, -50f, 35f, -85f) - reflectiveQuadToRelative(85f, -35f) - horizontalLineToRelative(540f) - quadToRelative(50f, 0f, 85f, 35f) - reflectiveQuadToRelative(35f, 85f) - verticalLineToRelative(240f) - quadToRelative(0f, 50f, -35f, 85f) - reflectiveQuadToRelative(-85f, 35f) - lineTo(160f, 720f) - close() - moveTo(160f, 640f) - horizontalLineToRelative(540f) - quadToRelative(17f, 0f, 28.5f, -11.5f) - reflectiveQuadTo(740f, 600f) - verticalLineToRelative(-240f) - quadToRelative(0f, -17f, -11.5f, -28.5f) - reflectiveQuadTo(700f, 320f) - lineTo(160f, 320f) - quadToRelative(-17f, 0f, -28.5f, 11.5f) - reflectiveQuadTo(120f, 360f) - verticalLineToRelative(240f) - quadToRelative(0f, 17f, 11.5f, 28.5f) - reflectiveQuadTo(160f, 640f) - close() - moveTo(860f, 580f) - verticalLineToRelative(-200f) - horizontalLineToRelative(20f) - quadToRelative(17f, 0f, 28.5f, 11.5f) - reflectiveQuadTo(920f, 420f) - verticalLineToRelative(120f) - quadToRelative(0f, 17f, -11.5f, 28.5f) - reflectiveQuadTo(880f, 580f) - horizontalLineToRelative(-20f) - close() - moveTo(120f, 640f) - verticalLineToRelative(-320f) - verticalLineToRelative(320f) - close() - } - } - .build() + @Composable get() = vectorResource(Res.drawable.ic_battery_horiz_000) - return batteryEmpty!! - } - -private var batteryEmpty: ImageVector? = null - -/** - * This is from Material Symbols. - * - * @see - * [battery_android_question](https://fonts.google.com/icons?icon.query=battery+android+question&icon.size=24&icon.color=%23e3e3e3&icon.style=Rounded) - */ val MeshtasticIcons.BatteryUnknown: ImageVector - get() { - if (batteryUnknown != null) { - return batteryUnknown!! - } - batteryUnknown = - ImageVector.Builder( - name = "BatteryUnknown", - defaultWidth = 24.dp, - defaultHeight = 24.dp, - viewportWidth = 960f, - viewportHeight = 960f, - ) - .apply { - path(fill = SolidColor(Color.Black)) { - moveTo(120f, 640f) - verticalLineToRelative(-320f) - verticalLineToRelative(320f) - close() - moveTo(726f, 720f) - lineTo(160f, 720f) - quadToRelative(-50f, 0f, -85f, -35f) - reflectiveQuadToRelative(-35f, -85f) - verticalLineToRelative(-240f) - quadToRelative(0f, -50f, 35f, -85f) - reflectiveQuadToRelative(85f, -35f) - horizontalLineToRelative(521f) - quadToRelative(-20f, 16f, -35f, 36f) - reflectiveQuadToRelative(-25f, 44f) - lineTo(160f, 320f) - quadToRelative(-17f, 0f, -28.5f, 11.5f) - reflectiveQuadTo(120f, 360f) - verticalLineToRelative(240f) - quadToRelative(0f, 17f, 11.5f, 28.5f) - reflectiveQuadTo(160f, 640f) - horizontalLineToRelative(520f) - quadToRelative(2f, 25f, 14.5f, 45.5f) - reflectiveQuadTo(726f, 720f) - close() - moveTo(800f, 660f) - quadToRelative(17f, 0f, 28.5f, -11.5f) - reflectiveQuadTo(840f, 620f) - quadToRelative(0f, -17f, -11.5f, -28.5f) - reflectiveQuadTo(800f, 580f) - quadToRelative(-17f, 0f, -28.5f, 11.5f) - reflectiveQuadTo(760f, 620f) - quadToRelative(0f, 17f, 11.5f, 28.5f) - reflectiveQuadTo(800f, 660f) - close() - moveTo(772f, 538f) - horizontalLineToRelative(57f) - verticalLineToRelative(-21f) - quadToRelative(0f, -10f, 5f, -19f) - quadToRelative(6f, -13f, 15.5f, -22f) - reflectiveQuadToRelative(19.5f, -19f) - quadToRelative(17f, -17f, 28.5f, -37f) - reflectiveQuadToRelative(11.5f, -43f) - quadToRelative(0f, -42f, -32.5f, -69.5f) - reflectiveQuadTo(800f, 280f) - quadToRelative(-38f, 0f, -68f, 22f) - reflectiveQuadToRelative(-40f, 58f) - lineToRelative(51f, 21f) - quadToRelative(6f, -20f, 21.5f, -33f) - reflectiveQuadToRelative(35.5f, -13f) - quadToRelative(21f, 0f, 36.5f, 12f) - reflectiveQuadToRelative(15.5f, 32f) - quadToRelative(0f, 17f, -10f, 30.5f) - reflectiveQuadTo(820f, 434f) - quadToRelative(-11f, 11f, -22.5f, 21.5f) - reflectiveQuadTo(779f, 480f) - quadToRelative(-6f, 14f, -6.5f, 28.5f) - reflectiveQuadTo(772f, 538f) - close() - } - } - .build() + @Composable get() = vectorResource(Res.drawable.ic_battery_question_mark) - return batteryUnknown!! - } - -private var batteryUnknown: ImageVector? = null +val MeshtasticIcons.BatteryAlert: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_battery_alert) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Counter.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Counter.kt index 4bf0b6a97..cdad51fd1 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Counter.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Counter.kt @@ -18,6 +18,8 @@ package org.meshtastic.core.ui.icon import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.ic_counter_0 import org.meshtastic.core.resources.ic_counter_1 import org.meshtastic.core.resources.ic_counter_2 @@ -28,39 +30,21 @@ import org.meshtastic.core.resources.ic_counter_6 import org.meshtastic.core.resources.ic_counter_7 import org.meshtastic.core.resources.ic_counter_8 -/** These are from Material Symbols drawables. */ val MeshtasticIcons.Counter0: ImageVector - @Composable - get() = org.jetbrains.compose.resources.vectorResource(org.meshtastic.core.resources.Res.drawable.ic_counter_0) - + @Composable get() = vectorResource(Res.drawable.ic_counter_0) val MeshtasticIcons.Counter1: ImageVector - @Composable - get() = org.jetbrains.compose.resources.vectorResource(org.meshtastic.core.resources.Res.drawable.ic_counter_1) - + @Composable get() = vectorResource(Res.drawable.ic_counter_1) val MeshtasticIcons.Counter2: ImageVector - @Composable - get() = org.jetbrains.compose.resources.vectorResource(org.meshtastic.core.resources.Res.drawable.ic_counter_2) - + @Composable get() = vectorResource(Res.drawable.ic_counter_2) val MeshtasticIcons.Counter3: ImageVector - @Composable - get() = org.jetbrains.compose.resources.vectorResource(org.meshtastic.core.resources.Res.drawable.ic_counter_3) - + @Composable get() = vectorResource(Res.drawable.ic_counter_3) val MeshtasticIcons.Counter4: ImageVector - @Composable - get() = org.jetbrains.compose.resources.vectorResource(org.meshtastic.core.resources.Res.drawable.ic_counter_4) - + @Composable get() = vectorResource(Res.drawable.ic_counter_4) val MeshtasticIcons.Counter5: ImageVector - @Composable - get() = org.jetbrains.compose.resources.vectorResource(org.meshtastic.core.resources.Res.drawable.ic_counter_5) - + @Composable get() = vectorResource(Res.drawable.ic_counter_5) val MeshtasticIcons.Counter6: ImageVector - @Composable - get() = org.jetbrains.compose.resources.vectorResource(org.meshtastic.core.resources.Res.drawable.ic_counter_6) - + @Composable get() = vectorResource(Res.drawable.ic_counter_6) val MeshtasticIcons.Counter7: ImageVector - @Composable - get() = org.jetbrains.compose.resources.vectorResource(org.meshtastic.core.resources.Res.drawable.ic_counter_7) - + @Composable get() = vectorResource(Res.drawable.ic_counter_7) val MeshtasticIcons.Counter8: ImageVector - @Composable - get() = org.jetbrains.compose.resources.vectorResource(org.meshtastic.core.resources.Res.drawable.ic_counter_8) + @Composable get() = vectorResource(Res.drawable.ic_counter_8) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Device.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Device.kt index 1c44b9a13..66060116f 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Device.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Device.kt @@ -16,176 +16,63 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Fingerprint -import androidx.compose.material.icons.rounded.Home -import androidx.compose.material.icons.rounded.MilitaryTech -import androidx.compose.material.icons.rounded.MyLocation -import androidx.compose.material.icons.rounded.Person -import androidx.compose.material.icons.rounded.PersonOff -import androidx.compose.material.icons.rounded.Router -import androidx.compose.material.icons.rounded.Search -import androidx.compose.material.icons.rounded.Sensors -import androidx.compose.material.icons.rounded.VisibilityOff -import androidx.compose.material.icons.rounded.Work import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.SolidColor import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.graphics.vector.path -import androidx.compose.ui.unit.dp import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_android +import org.meshtastic.core.resources.ic_fingerprint +import org.meshtastic.core.resources.ic_fork_left +import org.meshtastic.core.resources.ic_home +import org.meshtastic.core.resources.ic_icecream +import org.meshtastic.core.resources.ic_military_tech import org.meshtastic.core.resources.ic_mountain_flag +import org.meshtastic.core.resources.ic_my_location +import org.meshtastic.core.resources.ic_numbers +import org.meshtastic.core.resources.ic_person +import org.meshtastic.core.resources.ic_person_off +import org.meshtastic.core.resources.ic_phone_android +import org.meshtastic.core.resources.ic_router +import org.meshtastic.core.resources.ic_search +import org.meshtastic.core.resources.ic_sensors +import org.meshtastic.core.resources.ic_visibility_off +import org.meshtastic.core.resources.ic_work import org.meshtastic.proto.Config -val MeshtasticIcons.HardwareModel: ImageVector - get() = Icons.Rounded.Router val MeshtasticIcons.Role: ImageVector - get() = Icons.Rounded.Work + @Composable get() = vectorResource(Res.drawable.ic_work) val MeshtasticIcons.NodeId: ImageVector - get() = Icons.Rounded.Fingerprint + @Composable get() = vectorResource(Res.drawable.ic_fingerprint) /** Returns a specific icon for a given [Config.DeviceConfig.Role]. */ @Composable fun MeshtasticIcons.role(role: Config.DeviceConfig.Role?): ImageVector = when (role) { - Config.DeviceConfig.Role.CLIENT -> Icons.Rounded.Person - Config.DeviceConfig.Role.CLIENT_MUTE -> Icons.Rounded.PersonOff + Config.DeviceConfig.Role.CLIENT -> vectorResource(Res.drawable.ic_person) + Config.DeviceConfig.Role.CLIENT_MUTE -> vectorResource(Res.drawable.ic_person_off) Config.DeviceConfig.Role.ROUTER -> vectorResource(Res.drawable.ic_mountain_flag) - Config.DeviceConfig.Role.TRACKER -> Icons.Rounded.MyLocation - Config.DeviceConfig.Role.SENSOR -> Icons.Rounded.Sensors - Config.DeviceConfig.Role.TAK -> Icons.Rounded.MilitaryTech - Config.DeviceConfig.Role.TAK_TRACKER -> Icons.Rounded.MyLocation - Config.DeviceConfig.Role.CLIENT_HIDDEN -> Icons.Rounded.VisibilityOff - Config.DeviceConfig.Role.LOST_AND_FOUND -> Icons.Rounded.Search - Config.DeviceConfig.Role.CLIENT_BASE -> Icons.Rounded.Home - Config.DeviceConfig.Role.ROUTER_LATE -> Icons.Rounded.Router - else -> Icons.Rounded.Work + Config.DeviceConfig.Role.TRACKER -> vectorResource(Res.drawable.ic_my_location) + Config.DeviceConfig.Role.SENSOR -> vectorResource(Res.drawable.ic_sensors) + Config.DeviceConfig.Role.TAK -> vectorResource(Res.drawable.ic_military_tech) + Config.DeviceConfig.Role.TAK_TRACKER -> vectorResource(Res.drawable.ic_my_location) + Config.DeviceConfig.Role.CLIENT_HIDDEN -> vectorResource(Res.drawable.ic_visibility_off) + Config.DeviceConfig.Role.LOST_AND_FOUND -> vectorResource(Res.drawable.ic_search) + Config.DeviceConfig.Role.CLIENT_BASE -> vectorResource(Res.drawable.ic_home) + Config.DeviceConfig.Role.ROUTER_LATE -> vectorResource(Res.drawable.ic_router) + else -> vectorResource(Res.drawable.ic_work) } -/** - * This is from Material Symbols. - * - * @see - * [router](https://fonts.google.com/icons?selected=Material+Symbols+Rounded:router:FILL@0;wght@400;GRAD@0;opsz@24&icon.query=router&icon.size=24&icon.color=%23e3e3e3&icon.platform=android&icon.style=Rounded) - */ val MeshtasticIcons.Device: ImageVector - get() { - if (device != null) { - return device!! - } - device = - ImageVector.Builder( - name = "Outlined.Device", - defaultWidth = 24.dp, - defaultHeight = 24.dp, - viewportWidth = 960f, - viewportHeight = 960f, - ) - .apply { - path(fill = SolidColor(Color(0xFFE3E3E3))) { - moveTo(200f, 840f) - quadToRelative(-33f, 0f, -56.5f, -23.5f) - reflectiveQuadTo(120f, 760f) - verticalLineToRelative(-160f) - quadToRelative(0f, -33f, 23.5f, -56.5f) - reflectiveQuadTo(200f, 520f) - horizontalLineToRelative(400f) - verticalLineToRelative(-120f) - quadToRelative(0f, -17f, 11.5f, -28.5f) - reflectiveQuadTo(640f, 360f) - quadToRelative(17f, 0f, 28.5f, 11.5f) - reflectiveQuadTo(680f, 400f) - verticalLineToRelative(120f) - horizontalLineToRelative(80f) - quadToRelative(33f, 0f, 56.5f, 23.5f) - reflectiveQuadTo(840f, 600f) - verticalLineToRelative(160f) - quadToRelative(0f, 33f, -23.5f, 56.5f) - reflectiveQuadTo(760f, 840f) - lineTo(200f, 840f) - close() - moveTo(200f, 760f) - horizontalLineToRelative(560f) - verticalLineToRelative(-160f) - lineTo(200f, 600f) - verticalLineToRelative(160f) - close() - moveTo(280f, 720f) - quadToRelative(17f, 0f, 28.5f, -11.5f) - reflectiveQuadTo(320f, 680f) - quadToRelative(0f, -17f, -11.5f, -28.5f) - reflectiveQuadTo(280f, 640f) - quadToRelative(-17f, 0f, -28.5f, 11.5f) - reflectiveQuadTo(240f, 680f) - quadToRelative(0f, 17f, 11.5f, 28.5f) - reflectiveQuadTo(280f, 720f) - close() - moveTo(420f, 720f) - quadToRelative(17f, 0f, 28.5f, -11.5f) - reflectiveQuadTo(460f, 680f) - quadToRelative(0f, -17f, -11.5f, -28.5f) - reflectiveQuadTo(420f, 640f) - quadToRelative(-17f, 0f, -28.5f, 11.5f) - reflectiveQuadTo(380f, 680f) - quadToRelative(0f, 17f, 11.5f, 28.5f) - reflectiveQuadTo(420f, 720f) - close() - moveTo(560f, 720f) - quadToRelative(17f, 0f, 28.5f, -11.5f) - reflectiveQuadTo(600f, 680f) - quadToRelative(0f, -17f, -11.5f, -28.5f) - reflectiveQuadTo(560f, 640f) - quadToRelative(-17f, 0f, -28.5f, 11.5f) - reflectiveQuadTo(520f, 680f) - quadToRelative(0f, 17f, 11.5f, 28.5f) - reflectiveQuadTo(560f, 720f) - close() - moveTo(640f, 300f) - quadToRelative(-11f, 0f, -20f, 2f) - reflectiveQuadToRelative(-18f, 6f) - quadToRelative(-16f, 7f, -32.5f, 6f) - reflectiveQuadTo(541f, 301f) - quadToRelative(-12f, -12f, -11.5f, -29f) - reflectiveQuadToRelative(14.5f, -25f) - quadToRelative(21f, -13f, 45.5f, -20f) - reflectiveQuadToRelative(50.5f, -7f) - quadToRelative(27f, 0f, 51f, 7f) - reflectiveQuadToRelative(45f, 20f) - quadToRelative(14f, 8f, 14.5f, 25f) - reflectiveQuadTo(739f, 301f) - quadToRelative(-12f, 12f, -29f, 13f) - reflectiveQuadToRelative(-33f, -6f) - quadToRelative(-8f, -4f, -17.5f, -6f) - reflectiveQuadToRelative(-19.5f, -2f) - close() - moveTo(640f, 160f) - quadToRelative(-39f, 0f, -74.5f, 11.5f) - reflectiveQuadTo(500f, 205f) - quadToRelative(-14f, 10f, -30.5f, 9f) - reflectiveQuadTo(442f, 202f) - quadToRelative(-12f, -12f, -12f, -28f) - reflectiveQuadToRelative(13f, -26f) - quadToRelative(41f, -32f, 91f, -50f) - reflectiveQuadToRelative(106f, -18f) - quadToRelative(56f, 0f, 106f, 18f) - reflectiveQuadToRelative(91f, 50f) - quadToRelative(13f, 10f, 13f, 26f) - reflectiveQuadToRelative(-12f, 28f) - quadToRelative(-11f, 11f, -27.5f, 12f) - reflectiveQuadToRelative(-30.5f, -9f) - quadToRelative(-30f, -22f, -65.5f, -33.5f) - reflectiveQuadTo(640f, 160f) - close() - moveTo(200f, 760f) - verticalLineToRelative(-160f) - verticalLineToRelative(160f) - close() - } - } - .build() + @Composable get() = vectorResource(Res.drawable.ic_router) - return device!! - } - -private var device: ImageVector? = null +val MeshtasticIcons.PhoneAndroid: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_phone_android) +val MeshtasticIcons.ForkLeft: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_fork_left) +val MeshtasticIcons.Icecream: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_icecream) +val MeshtasticIcons.DeviceNumbers: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_numbers) +val MeshtasticIcons.Android: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_android) +val MeshtasticIcons.HardwareModel: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_router) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Elevation.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Elevation.kt index 79287b612..3443e3213 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Elevation.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Elevation.kt @@ -16,84 +16,11 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.SolidColor +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.graphics.vector.path -import androidx.compose.ui.unit.dp +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_elevation -/** - * This is from Material Symbols. - * - * @see - * [elevation](https://fonts.google.com/icons?selected=Material+Symbols+Rounded:elevation:FILL@0;wght@400;GRAD@0;opsz@24&icon.query=elevation&icon.size=24&icon.color=%23e3e3e3&icon.platform=android&icon.style=Rounded) - */ val MeshtasticIcons.Elevation: ImageVector - get() { - if (elevation != null) { - return elevation!! - } - elevation = - ImageVector.Builder( - name = "Rounded.Elevation", - defaultWidth = 24.dp, - defaultHeight = 24.dp, - viewportWidth = 960f, - viewportHeight = 960f, - ) - .apply { - path(fill = SolidColor(Color(0xFFE3E3E3))) { - moveTo(760f, 840f) - lineTo(160f, 840f) - quadToRelative(-25f, 0f, -35.5f, -21.5f) - reflectiveQuadTo(128f, 777f) - lineToRelative(188f, -264f) - quadToRelative(11f, -16f, 28f, -24.5f) - reflectiveQuadToRelative(37f, -8.5f) - horizontalLineToRelative(161f) - lineToRelative(228f, -266f) - quadToRelative(18f, -21f, 44f, -11.5f) - reflectiveQuadToRelative(26f, 37.5f) - verticalLineToRelative(520f) - quadToRelative(0f, 33f, -23.5f, 56.5f) - reflectiveQuadTo(760f, 840f) - close() - moveTo(300f, 400f) - lineTo(176f, 575f) - quadToRelative(-10f, 14f, -26f, 16.5f) - reflectiveQuadToRelative(-30f, -7.5f) - quadToRelative(-14f, -10f, -16.5f, -26f) - reflectiveQuadToRelative(7.5f, -30f) - lineToRelative(125f, -174f) - quadToRelative(11f, -16f, 28f, -25f) - reflectiveQuadToRelative(37f, -9f) - horizontalLineToRelative(161f) - lineToRelative(162f, -189f) - quadToRelative(11f, -13f, 27f, -14f) - reflectiveQuadToRelative(29f, 10f) - quadToRelative(13f, 11f, 14f, 27f) - reflectiveQuadToRelative(-10f, 29f) - lineTo(522f, 372f) - quadToRelative(-11f, 14f, -27f, 21f) - reflectiveQuadToRelative(-33f, 7f) - lineTo(300f, 400f) - close() - moveTo(238f, 760f) - horizontalLineToRelative(522f) - verticalLineToRelative(-412f) - lineTo(602f, 532f) - quadToRelative(-11f, 14f, -27f, 21f) - reflectiveQuadToRelative(-33f, 7f) - lineTo(380f, 560f) - lineTo(238f, 760f) - close() - moveTo(760f, 760f) - close() - } - } - .build() - - return elevation!! - } - -private var elevation: ImageVector? = null + @Composable get() = vectorResource(Res.drawable.ic_elevation) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Hardware.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Hardware.kt index ad1c1dfb4..0a04d47fe 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Hardware.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Hardware.kt @@ -16,15 +16,47 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Bluetooth -import androidx.compose.material.icons.rounded.Usb -import androidx.compose.material.icons.rounded.Wifi +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_bluetooth +import org.meshtastic.core.resources.ic_bluetooth_connected +import org.meshtastic.core.resources.ic_bluetooth_searching +import org.meshtastic.core.resources.ic_cached +import org.meshtastic.core.resources.ic_display_settings +import org.meshtastic.core.resources.ic_memory +import org.meshtastic.core.resources.ic_nfc +import org.meshtastic.core.resources.ic_settings_input_antenna +import org.meshtastic.core.resources.ic_speaker_phone +import org.meshtastic.core.resources.ic_terminal +import org.meshtastic.core.resources.ic_usb +import org.meshtastic.core.resources.ic_usb_off +import org.meshtastic.core.resources.ic_wifi +val MeshtasticIcons.BluetoothConnected: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_bluetooth_connected) +val MeshtasticIcons.BluetoothSearching: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_bluetooth_searching) +val MeshtasticIcons.UsbOff: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_usb_off) +val MeshtasticIcons.Antenna: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_settings_input_antenna) +val MeshtasticIcons.Speaker: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_speaker_phone) +val MeshtasticIcons.Reconnecting: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_cached) +val MeshtasticIcons.Nfc: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_nfc) val MeshtasticIcons.Bluetooth: ImageVector - get() = Icons.Rounded.Bluetooth -val MeshtasticIcons.Usb: ImageVector - get() = Icons.Rounded.Usb + @Composable get() = vectorResource(Res.drawable.ic_bluetooth) val MeshtasticIcons.Wifi: ImageVector - get() = Icons.Rounded.Wifi + @Composable get() = vectorResource(Res.drawable.ic_wifi) +val MeshtasticIcons.Usb: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_usb) +val MeshtasticIcons.Serial: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_terminal) +val MeshtasticIcons.Memory: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_memory) +val MeshtasticIcons.DisplaySettings: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_display_settings) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Map.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Map.kt index 1b4c04a99..3e4635389 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Map.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Map.kt @@ -16,94 +16,57 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.SolidColor +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.graphics.vector.path -import androidx.compose.ui.unit.dp +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_calendar_month +import org.meshtastic.core.resources.ic_check +import org.meshtastic.core.resources.ic_gps_fixed +import org.meshtastic.core.resources.ic_gps_off +import org.meshtastic.core.resources.ic_layers +import org.meshtastic.core.resources.ic_lens +import org.meshtastic.core.resources.ic_location_disabled +import org.meshtastic.core.resources.ic_location_on +import org.meshtastic.core.resources.ic_map +import org.meshtastic.core.resources.ic_my_location +import org.meshtastic.core.resources.ic_navigation +import org.meshtastic.core.resources.ic_pin_drop +import org.meshtastic.core.resources.ic_place +import org.meshtastic.core.resources.ic_route +import org.meshtastic.core.resources.ic_trip_origin +import org.meshtastic.core.resources.ic_tune -/** - * This is from Material Symbols. - * - * @see - * [map](https://fonts.google.com/icons?selected=Material+Symbols+Rounded:map:FILL@0;wght@400;GRAD@0;opsz@24&icon.query=map&icon.size=24&icon.color=%23e3e3e3&icon.platform=android&icon.style=Rounded) - */ +// Map control icons +val MeshtasticIcons.Layers: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_layers) +val MeshtasticIcons.MyLocation: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_my_location) +val MeshtasticIcons.LocationDisabled: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_location_disabled) +val MeshtasticIcons.PinDrop: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_pin_drop) +val MeshtasticIcons.TripOrigin: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_trip_origin) +val MeshtasticIcons.CalendarMonth: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_calendar_month) +val MeshtasticIcons.MapCompass: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_navigation) +val MeshtasticIcons.Tune: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_tune) +val MeshtasticIcons.Place: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_place) +val MeshtasticIcons.Lens: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_lens) +val MeshtasticIcons.GpsFixed: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_gps_fixed) +val MeshtasticIcons.GpsOff: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_gps_off) +val MeshtasticIcons.Check: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_check) val MeshtasticIcons.Map: ImageVector - get() { - if (map != null) { - return map!! - } - map = - ImageVector.Builder( - name = "Outlined.Map", - defaultWidth = 24.dp, - defaultHeight = 24.dp, - viewportWidth = 960f, - viewportHeight = 960f, - ) - .apply { - path(fill = SolidColor(Color.Black)) { - moveToRelative(574f, 831f) - lineToRelative(-214f, -75f) - lineToRelative(-186f, 72f) - quadToRelative(-10f, 4f, -19.5f, 2.5f) - reflectiveQuadTo(137f, 824f) - quadToRelative(-8f, -5f, -12.5f, -13.5f) - reflectiveQuadTo(120f, 791f) - verticalLineToRelative(-561f) - quadToRelative(0f, -13f, 7.5f, -23f) - reflectiveQuadToRelative(20.5f, -15f) - lineToRelative(186f, -63f) - quadToRelative(6f, -2f, 12.5f, -3f) - reflectiveQuadToRelative(13.5f, -1f) - quadToRelative(7f, 0f, 13.5f, 1f) - reflectiveQuadToRelative(12.5f, 3f) - lineToRelative(214f, 75f) - lineToRelative(186f, -72f) - quadToRelative(10f, -4f, 19.5f, -2.5f) - reflectiveQuadTo(823f, 136f) - quadToRelative(8f, 5f, 12.5f, 13.5f) - reflectiveQuadTo(840f, 169f) - verticalLineToRelative(561f) - quadToRelative(0f, 13f, -7.5f, 23f) - reflectiveQuadTo(812f, 768f) - lineToRelative(-186f, 63f) - quadToRelative(-6f, 2f, -12.5f, 3f) - reflectiveQuadToRelative(-13.5f, 1f) - quadToRelative(-7f, 0f, -13.5f, -1f) - reflectiveQuadToRelative(-12.5f, -3f) - close() - moveTo(560f, 742f) - verticalLineToRelative(-468f) - lineToRelative(-160f, -56f) - verticalLineToRelative(468f) - lineToRelative(160f, 56f) - close() - moveTo(640f, 742f) - lineTo(760f, 702f) - verticalLineToRelative(-474f) - lineToRelative(-120f, 46f) - verticalLineToRelative(468f) - close() - moveTo(200f, 732f) - lineTo(320f, 686f) - verticalLineToRelative(-468f) - lineToRelative(-120f, 40f) - verticalLineToRelative(474f) - close() - moveTo(640f, 274f) - verticalLineToRelative(468f) - verticalLineToRelative(-468f) - close() - moveTo(320f, 218f) - verticalLineToRelative(468f) - verticalLineToRelative(-468f) - close() - } - } - .build() - - return map!! - } - -private var map: ImageVector? = null + @Composable get() = vectorResource(Res.drawable.ic_map) +val MeshtasticIcons.LocationOn: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_location_on) +val MeshtasticIcons.Route: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_route) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Messages.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Messages.kt index 899c65f19..f2f6d26cf 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Messages.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Messages.kt @@ -16,85 +16,42 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.SolidColor +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.graphics.vector.path -import androidx.compose.ui.unit.dp +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_add_link +import org.meshtastic.core.resources.ic_chat_bubble_outline +import org.meshtastic.core.resources.ic_fast_forward +import org.meshtastic.core.resources.ic_filter_list +import org.meshtastic.core.resources.ic_filter_list_off +import org.meshtastic.core.resources.ic_format_quote +import org.meshtastic.core.resources.ic_forum +import org.meshtastic.core.resources.ic_link +import org.meshtastic.core.resources.ic_message +import org.meshtastic.core.resources.ic_visibility +import org.meshtastic.core.resources.ic_visibility_off -/** - * This is from Material Symbols. - * - * @see - * [forum](https://fonts.google.com/icons?selected=Material+Symbols+Rounded:forum:FILL@0;wght@400;GRAD@0;opsz@24&icon.query=forum&icon.size=24&icon.color=%23e3e3e3&icon.platform=android&icon.style=Rounded) - */ +// Messaging UI icons +val MeshtasticIcons.ChatBubbleOutline: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_chat_bubble_outline) +val MeshtasticIcons.FormatQuote: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_format_quote) +val MeshtasticIcons.FilterList: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_filter_list) +val MeshtasticIcons.FilterListOff: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_filter_list_off) +val MeshtasticIcons.FastForward: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_fast_forward) +val MeshtasticIcons.Visibility: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_visibility) +val MeshtasticIcons.VisibilityOff: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_visibility_off) +val MeshtasticIcons.AddLink: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_add_link) +val MeshtasticIcons.LinkIcon: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_link) +val MeshtasticIcons.Message: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_message) val MeshtasticIcons.Conversations: ImageVector - get() { - if (conversations != null) { - return conversations!! - } - conversations = - ImageVector.Builder( - name = "Outlined.Conversations", - defaultWidth = 24.dp, - defaultHeight = 24.dp, - viewportWidth = 960f, - viewportHeight = 960f, - ) - .apply { - path(fill = SolidColor(Color.Black)) { - moveTo(840f, 824f) - quadToRelative(-8f, 0f, -15f, -3f) - reflectiveQuadToRelative(-13f, -9f) - lineToRelative(-92f, -92f) - lineTo(320f, 720f) - quadToRelative(-33f, 0f, -56.5f, -23.5f) - reflectiveQuadTo(240f, 640f) - verticalLineToRelative(-40f) - horizontalLineToRelative(440f) - quadToRelative(33f, 0f, 56.5f, -23.5f) - reflectiveQuadTo(760f, 520f) - verticalLineToRelative(-280f) - horizontalLineToRelative(40f) - quadToRelative(33f, 0f, 56.5f, 23.5f) - reflectiveQuadTo(880f, 320f) - verticalLineToRelative(463f) - quadToRelative(0f, 18f, -12f, 29.5f) - reflectiveQuadTo(840f, 824f) - close() - moveTo(160f, 487f) - lineToRelative(47f, -47f) - horizontalLineToRelative(393f) - verticalLineToRelative(-280f) - lineTo(160f, 160f) - verticalLineToRelative(327f) - close() - moveTo(120f, 624f) - quadToRelative(-16f, 0f, -28f, -11.5f) - reflectiveQuadTo(80f, 583f) - verticalLineToRelative(-423f) - quadToRelative(0f, -33f, 23.5f, -56.5f) - reflectiveQuadTo(160f, 80f) - horizontalLineToRelative(440f) - quadToRelative(33f, 0f, 56.5f, 23.5f) - reflectiveQuadTo(680f, 160f) - verticalLineToRelative(280f) - quadToRelative(0f, 33f, -23.5f, 56.5f) - reflectiveQuadTo(600f, 520f) - lineTo(240f, 520f) - lineToRelative(-92f, 92f) - quadToRelative(-6f, 6f, -13f, 9f) - reflectiveQuadToRelative(-15f, 3f) - close() - moveTo(160f, 440f) - verticalLineToRelative(-280f) - verticalLineToRelative(280f) - close() - } - } - .build() - - return conversations!! - } - -private var conversations: ImageVector? = null + @Composable get() = vectorResource(Res.drawable.ic_forum) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Navigation.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Navigation.kt new file mode 100644 index 000000000..ad35114d4 --- /dev/null +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Navigation.kt @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2025-2026 Meshtastic LLC + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.meshtastic.core.ui.icon + +import androidx.compose.runtime.Composable +import androidx.compose.ui.graphics.vector.ImageVector +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_arrow_back +import org.meshtastic.core.resources.ic_arrow_downward +import org.meshtastic.core.resources.ic_chevron_right +import org.meshtastic.core.resources.ic_expand_less +import org.meshtastic.core.resources.ic_expand_more +import org.meshtastic.core.resources.ic_keyboard_arrow_down +import org.meshtastic.core.resources.ic_keyboard_arrow_right +import org.meshtastic.core.resources.ic_keyboard_arrow_up + +val MeshtasticIcons.ArrowBack: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_arrow_back) +val MeshtasticIcons.ChevronRight: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_chevron_right) +val MeshtasticIcons.KeyboardArrowRight: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_keyboard_arrow_right) +val MeshtasticIcons.KeyboardArrowDown: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_keyboard_arrow_down) +val MeshtasticIcons.KeyboardArrowUp: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_keyboard_arrow_up) +val MeshtasticIcons.ArrowDownward: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_arrow_downward) +val MeshtasticIcons.ExpandMore: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_expand_more) +val MeshtasticIcons.ExpandLess: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_expand_less) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/NoDevice.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/NoDevice.kt index 503fc3289..2c2b1ea51 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/NoDevice.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/NoDevice.kt @@ -16,149 +16,11 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.SolidColor +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.graphics.vector.path -import androidx.compose.ui.unit.dp +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_no_device -/** - * This is from Material Symbols. - * - * @see - * [router_off](https://fonts.google.com/icons?icon.query=router+off&icon.size=24&icon.color=%23e3e3e3&icon.style=Rounded) - */ val MeshtasticIcons.NoDevice: ImageVector - get() { - if (noDevice != null) { - return noDevice!! - } - noDevice = - ImageVector.Builder( - name = "Outlined.NoDevice", - defaultWidth = 24.dp, - defaultHeight = 24.dp, - viewportWidth = 960f, - viewportHeight = 960f, - ) - .apply { - path(fill = SolidColor(Color.Black)) { - moveTo(806f, 692f) - lineTo(600f, 486f) - verticalLineToRelative(-86f) - quadToRelative(0f, -17f, 11.5f, -28.5f) - reflectiveQuadTo(640f, 360f) - quadToRelative(17f, 0f, 28.5f, 11.5f) - reflectiveQuadTo(680f, 400f) - verticalLineToRelative(120f) - horizontalLineToRelative(80f) - quadToRelative(33f, 0f, 56.5f, 23.5f) - reflectiveQuadTo(840f, 600f) - verticalLineToRelative(78f) - quadToRelative(0f, 14f, -12f, 19f) - reflectiveQuadToRelative(-22f, -5f) - close() - moveTo(200f, 760f) - horizontalLineToRelative(446f) - lineTo(486f, 600f) - lineTo(200f, 600f) - verticalLineToRelative(160f) - close() - moveTo(200f, 840f) - quadToRelative(-33f, 0f, -56.5f, -23.5f) - reflectiveQuadTo(120f, 760f) - verticalLineToRelative(-160f) - quadToRelative(0f, -33f, 23.5f, -56.5f) - reflectiveQuadTo(200f, 520f) - horizontalLineToRelative(206f) - lineTo(83f, 197f) - quadToRelative(-12f, -12f, -12f, -28.5f) - reflectiveQuadTo(83f, 140f) - quadToRelative(12f, -12f, 28.5f, -12f) - reflectiveQuadToRelative(28.5f, 12f) - lineToRelative(680f, 680f) - quadToRelative(12f, 12f, 12f, 28f) - reflectiveQuadToRelative(-12f, 28f) - quadToRelative(-12f, 12f, -28.5f, 12f) - reflectiveQuadTo(763f, 876f) - lineToRelative(-37f, -36f) - lineTo(200f, 840f) - close() - moveTo(280f, 720f) - quadToRelative(-17f, 0f, -28.5f, -11.5f) - reflectiveQuadTo(240f, 680f) - quadToRelative(0f, -17f, 11.5f, -28.5f) - reflectiveQuadTo(280f, 640f) - quadToRelative(17f, 0f, 28.5f, 11.5f) - reflectiveQuadTo(320f, 680f) - quadToRelative(0f, 17f, -11.5f, 28.5f) - reflectiveQuadTo(280f, 720f) - close() - moveTo(420f, 720f) - quadToRelative(-17f, 0f, -28.5f, -11.5f) - reflectiveQuadTo(380f, 680f) - quadToRelative(0f, -17f, 11.5f, -28.5f) - reflectiveQuadTo(420f, 640f) - quadToRelative(17f, 0f, 28.5f, 11.5f) - reflectiveQuadTo(460f, 680f) - quadToRelative(0f, 17f, -11.5f, 28.5f) - reflectiveQuadTo(420f, 720f) - close() - moveTo(560f, 720f) - quadToRelative(-17f, 0f, -28.5f, -11.5f) - reflectiveQuadTo(520f, 680f) - quadToRelative(0f, -17f, 11.5f, -28.5f) - reflectiveQuadTo(560f, 640f) - quadToRelative(17f, 0f, 28.5f, 11.5f) - reflectiveQuadTo(600f, 680f) - quadToRelative(0f, 17f, -11.5f, 28.5f) - reflectiveQuadTo(560f, 720f) - close() - moveTo(200f, 760f) - verticalLineToRelative(-160f) - verticalLineToRelative(160f) - close() - moveTo(640f, 300f) - quadToRelative(-11f, 0f, -20f, 2f) - reflectiveQuadToRelative(-18f, 6f) - quadToRelative(-16f, 7f, -32.5f, 6f) - reflectiveQuadTo(541f, 301f) - quadToRelative(-12f, -12f, -11.5f, -29f) - reflectiveQuadToRelative(14.5f, -25f) - quadToRelative(21f, -13f, 45.5f, -20f) - reflectiveQuadToRelative(50.5f, -7f) - quadToRelative(27f, 0f, 51f, 7f) - reflectiveQuadToRelative(45f, 20f) - quadToRelative(14f, 8f, 14.5f, 25f) - reflectiveQuadTo(739f, 301f) - quadToRelative(-12f, 12f, -29f, 13f) - reflectiveQuadToRelative(-33f, -6f) - quadToRelative(-8f, -4f, -17.5f, -6f) - reflectiveQuadToRelative(-19.5f, -2f) - close() - moveTo(640f, 160f) - quadToRelative(-39f, 0f, -74.5f, 11.5f) - reflectiveQuadTo(500f, 205f) - quadToRelative(-14f, 10f, -30.5f, 9f) - reflectiveQuadTo(442f, 202f) - quadToRelative(-12f, -12f, -12f, -28f) - reflectiveQuadToRelative(13f, -26f) - quadToRelative(41f, -32f, 91f, -50f) - reflectiveQuadToRelative(106f, -18f) - quadToRelative(56f, 0f, 106f, 18f) - reflectiveQuadToRelative(91f, 50f) - quadToRelative(13f, 10f, 13f, 26f) - reflectiveQuadToRelative(-12f, 28f) - quadToRelative(-11f, 11f, -27.5f, 12f) - reflectiveQuadToRelative(-30.5f, -9f) - quadToRelative(-30f, -22f, -65.5f, -33.5f) - reflectiveQuadTo(640f, 160f) - close() - } - } - .build() - - return noDevice!! - } - -private var noDevice: ImageVector? = null + @Composable get() = vectorResource(Res.drawable.ic_no_device) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Nodes.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Nodes.kt index 9f1fd8caa..0262b5dc3 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Nodes.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Nodes.kt @@ -16,150 +16,20 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.SolidColor +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.graphics.vector.path -import androidx.compose.ui.unit.dp +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_delete_outline +import org.meshtastic.core.resources.ic_do_disturb_on +import org.meshtastic.core.resources.ic_nodes +import org.meshtastic.core.resources.ic_notes -/** - * This is from Material Symbols. - * - * @see - * [graph_3](https://fonts.google.com/icons?icon.query=graph+3&icon.size=24&icon.color=%23e3e3e3&icon.style=Rounded) - */ +val MeshtasticIcons.Notes: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_notes) +val MeshtasticIcons.DoDisturb: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_do_disturb_on) +val MeshtasticIcons.DeleteNode: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_delete_outline) val MeshtasticIcons.Nodes: ImageVector - get() { - if (nodes != null) { - return nodes!! - } - nodes = - ImageVector.Builder( - name = "Outlined.Nodes", - defaultWidth = 24.dp, - defaultHeight = 24.dp, - viewportWidth = 960f, - viewportHeight = 960f, - ) - .apply { - path(fill = SolidColor(Color.Black)) { - moveTo(480f, 880f) - quadToRelative(-50f, 0f, -85f, -35f) - reflectiveQuadToRelative(-35f, -85f) - quadToRelative(0f, -5f, 0.5f, -11f) - reflectiveQuadToRelative(1.5f, -11f) - lineToRelative(-83f, -47f) - quadToRelative(-16f, 14f, -36f, 21.5f) - reflectiveQuadToRelative(-43f, 7.5f) - quadToRelative(-50f, 0f, -85f, -35f) - reflectiveQuadToRelative(-35f, -85f) - quadToRelative(0f, -50f, 35f, -85f) - reflectiveQuadToRelative(85f, -35f) - quadToRelative(24f, 0f, 45f, 9f) - reflectiveQuadToRelative(38f, 25f) - lineToRelative(119f, -60f) - quadToRelative(-3f, -23f, 2.5f, -45f) - reflectiveQuadToRelative(19.5f, -41f) - lineToRelative(-34f, -52f) - quadToRelative(-7f, 2f, -14.5f, 3f) - reflectiveQuadToRelative(-15.5f, 1f) - quadToRelative(-50f, 0f, -85f, -35f) - reflectiveQuadToRelative(-35f, -85f) - quadToRelative(0f, -50f, 35f, -85f) - reflectiveQuadToRelative(85f, -35f) - quadToRelative(50f, 0f, 85f, 35f) - reflectiveQuadToRelative(35f, 85f) - quadToRelative(0f, 20f, -6.5f, 38.5f) - reflectiveQuadTo(456f, 272f) - lineToRelative(35f, 52f) - quadToRelative(8f, -2f, 15f, -3f) - reflectiveQuadToRelative(15f, -1f) - quadToRelative(17f, 0f, 32f, 4f) - reflectiveQuadToRelative(29f, 12f) - lineToRelative(66f, -54f) - quadToRelative(-4f, -10f, -6f, -20.5f) - reflectiveQuadToRelative(-2f, -21.5f) - quadToRelative(0f, -50f, 35f, -85f) - reflectiveQuadToRelative(85f, -35f) - quadToRelative(50f, 0f, 85f, 35f) - reflectiveQuadToRelative(35f, 85f) - quadToRelative(0f, 50f, -35f, 85f) - reflectiveQuadToRelative(-85f, 35f) - quadToRelative(-17f, 0f, -32f, -4.5f) - reflectiveQuadTo(699f, 343f) - lineToRelative(-66f, 55f) - quadToRelative(4f, 10f, 6f, 20.5f) - reflectiveQuadToRelative(2f, 21.5f) - quadToRelative(0f, 50f, -35f, 85f) - reflectiveQuadToRelative(-85f, 35f) - quadToRelative(-24f, 0f, -45.5f, -9f) - reflectiveQuadTo(437f, 526f) - lineToRelative(-118f, 59f) - quadToRelative(2f, 9f, 1.5f, 18f) - reflectiveQuadToRelative(-2.5f, 18f) - lineToRelative(84f, 48f) - quadToRelative(16f, -14f, 35.5f, -21.5f) - reflectiveQuadTo(480f, 640f) - quadToRelative(50f, 0f, 85f, 35f) - reflectiveQuadToRelative(35f, 85f) - quadToRelative(0f, 50f, -35f, 85f) - reflectiveQuadToRelative(-85f, 35f) - close() - moveTo(200f, 640f) - quadToRelative(17f, 0f, 28.5f, -11.5f) - reflectiveQuadTo(240f, 600f) - quadToRelative(0f, -17f, -11.5f, -28.5f) - reflectiveQuadTo(200f, 560f) - quadToRelative(-17f, 0f, -28.5f, 11.5f) - reflectiveQuadTo(160f, 600f) - quadToRelative(0f, 17f, 11.5f, 28.5f) - reflectiveQuadTo(200f, 640f) - close() - moveTo(360f, 240f) - quadToRelative(17f, 0f, 28.5f, -11.5f) - reflectiveQuadTo(400f, 200f) - quadToRelative(0f, -17f, -11.5f, -28.5f) - reflectiveQuadTo(360f, 160f) - quadToRelative(-17f, 0f, -28.5f, 11.5f) - reflectiveQuadTo(320f, 200f) - quadToRelative(0f, 17f, 11.5f, 28.5f) - reflectiveQuadTo(360f, 240f) - close() - moveTo(480f, 800f) - quadToRelative(17f, 0f, 28.5f, -11.5f) - reflectiveQuadTo(520f, 760f) - quadToRelative(0f, -17f, -11.5f, -28.5f) - reflectiveQuadTo(480f, 720f) - quadToRelative(-17f, 0f, -28.5f, 11.5f) - reflectiveQuadTo(440f, 760f) - quadToRelative(0f, 17f, 11.5f, 28.5f) - reflectiveQuadTo(480f, 800f) - close() - moveTo(520f, 480f) - quadToRelative(17f, 0f, 28.5f, -11.5f) - reflectiveQuadTo(560f, 440f) - quadToRelative(0f, -17f, -11.5f, -28.5f) - reflectiveQuadTo(520f, 400f) - quadToRelative(-17f, 0f, -28.5f, 11.5f) - reflectiveQuadTo(480f, 440f) - quadToRelative(0f, 17f, 11.5f, 28.5f) - reflectiveQuadTo(520f, 480f) - close() - moveTo(760f, 280f) - quadToRelative(17f, 0f, 28.5f, -11.5f) - reflectiveQuadTo(800f, 240f) - quadToRelative(0f, -17f, -11.5f, -28.5f) - reflectiveQuadTo(760f, 200f) - quadToRelative(-17f, 0f, -28.5f, 11.5f) - reflectiveQuadTo(720f, 240f) - quadToRelative(0f, 17f, 11.5f, 28.5f) - reflectiveQuadTo(760f, 280f) - close() - } - } - .build() - - return nodes!! - } - -private var nodes: ImageVector? = null + @Composable get() = vectorResource(Res.drawable.ic_nodes) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Person.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Person.kt index 016eab9d0..2e9fd9390 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Person.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Person.kt @@ -16,24 +16,33 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.AccountCircle -import androidx.compose.material.icons.rounded.Group -import androidx.compose.material.icons.rounded.Groups -import androidx.compose.material.icons.rounded.Person -import androidx.compose.material.icons.rounded.PersonOff -import androidx.compose.material.icons.rounded.PersonSearch +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_account_circle +import org.meshtastic.core.resources.ic_group +import org.meshtastic.core.resources.ic_groups +import org.meshtastic.core.resources.ic_people +import org.meshtastic.core.resources.ic_person +import org.meshtastic.core.resources.ic_person_add +import org.meshtastic.core.resources.ic_person_off +import org.meshtastic.core.resources.ic_person_search -val MeshtasticIcons.Person: ImageVector - get() = Icons.Rounded.Person val MeshtasticIcons.PersonOff: ImageVector - get() = Icons.Rounded.PersonOff -val MeshtasticIcons.Groups: ImageVector - get() = Icons.Rounded.Groups + @Composable get() = vectorResource(Res.drawable.ic_person_off) val MeshtasticIcons.Group: ImageVector - get() = Icons.Rounded.Group + @Composable get() = vectorResource(Res.drawable.ic_group) val MeshtasticIcons.AccountCircle: ImageVector - get() = Icons.Rounded.AccountCircle + @Composable get() = vectorResource(Res.drawable.ic_account_circle) val MeshtasticIcons.PersonSearch: ImageVector - get() = Icons.Rounded.PersonSearch + @Composable get() = vectorResource(Res.drawable.ic_person_search) + +val MeshtasticIcons.PersonAdd: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_person_add) +val MeshtasticIcons.Person: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_person) +val MeshtasticIcons.Groups: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_groups) +val MeshtasticIcons.PeopleCount: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_people) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Security.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Security.kt index 136b58e5e..e545cee5e 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Security.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Security.kt @@ -16,24 +16,23 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Fingerprint -import androidx.compose.material.icons.rounded.KeyOff -import androidx.compose.material.icons.rounded.Lock -import androidx.compose.material.icons.rounded.LockOpen -import androidx.compose.material.icons.rounded.Verified -import androidx.compose.material.icons.rounded.Warning +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_key_off +import org.meshtastic.core.resources.ic_lock +import org.meshtastic.core.resources.ic_lock_open +import org.meshtastic.core.resources.ic_security +import org.meshtastic.core.resources.ic_verified -val MeshtasticIcons.Lock: ImageVector - get() = Icons.Rounded.Lock -val MeshtasticIcons.LockOpen: ImageVector - get() = Icons.Rounded.LockOpen -val MeshtasticIcons.Warning: ImageVector - get() = Icons.Rounded.Warning -val MeshtasticIcons.KeyOff: ImageVector - get() = Icons.Rounded.KeyOff val MeshtasticIcons.Verified: ImageVector - get() = Icons.Rounded.Verified -val MeshtasticIcons.Fingerprint: ImageVector - get() = Icons.Rounded.Fingerprint + @Composable get() = vectorResource(Res.drawable.ic_verified) +val MeshtasticIcons.Lock: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_lock) +val MeshtasticIcons.LockOpen: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_lock_open) +val MeshtasticIcons.KeyOff: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_key_off) +val MeshtasticIcons.SecurityShield: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_security) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Settings.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Settings.kt index 741273259..936d5748a 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Settings.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Settings.kt @@ -16,144 +16,57 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.SolidColor +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.graphics.vector.path -import androidx.compose.ui.unit.dp +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_abc +import org.meshtastic.core.resources.ic_admin_panel_settings +import org.meshtastic.core.resources.ic_app_settings_alt +import org.meshtastic.core.resources.ic_bug_report +import org.meshtastic.core.resources.ic_cleaning_services +import org.meshtastic.core.resources.ic_data_usage +import org.meshtastic.core.resources.ic_format_paint +import org.meshtastic.core.resources.ic_language +import org.meshtastic.core.resources.ic_list +import org.meshtastic.core.resources.ic_notifications +import org.meshtastic.core.resources.ic_perm_scan_wifi +import org.meshtastic.core.resources.ic_sensors +import org.meshtastic.core.resources.ic_settings +import org.meshtastic.core.resources.ic_settings_remote +import org.meshtastic.core.resources.ic_storage +import org.meshtastic.core.resources.ic_waving_hand -/** - * This is from Material Symbols. - * - * @see - * [settings](https://fonts.google.com/icons?selected=Material+Symbols+Rounded:settings:FILL@0;wght@400;GRAD@0;opsz@24&icon.style=Rounded&icon.query=settings&icon.set=Material+Symbols&icon.size=24&icon.color=%23e3e3e3&icon.platform=android) - */ +// Config route icons +val MeshtasticIcons.AdminPanelSettings: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_admin_panel_settings) +val MeshtasticIcons.AppSettingsAlt: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_app_settings_alt) +val MeshtasticIcons.BugReport: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_bug_report) +val MeshtasticIcons.CleaningServices: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_cleaning_services) +val MeshtasticIcons.FormatPaint: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_format_paint) +val MeshtasticIcons.Language: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_language) +val MeshtasticIcons.WavingHand: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_waving_hand) +val MeshtasticIcons.Abc: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_abc) val MeshtasticIcons.Settings: ImageVector - get() { - if (settings != null) { - return settings!! - } - settings = - ImageVector.Builder( - name = "Settings", - defaultWidth = 24.dp, - defaultHeight = 24.dp, - viewportWidth = 960f, - viewportHeight = 960f, - ) - .apply { - path(fill = SolidColor(Color(0xFFE3E3E3))) { - moveTo(433f, 880f) - quadToRelative(-27f, 0f, -46.5f, -18f) - reflectiveQuadTo(363f, 818f) - lineToRelative(-9f, -66f) - quadToRelative(-13f, -5f, -24.5f, -12f) - reflectiveQuadTo(307f, 725f) - lineToRelative(-62f, 26f) - quadToRelative(-25f, 11f, -50f, 2f) - reflectiveQuadToRelative(-39f, -32f) - lineToRelative(-47f, -82f) - quadToRelative(-14f, -23f, -8f, -49f) - reflectiveQuadToRelative(27f, -43f) - lineToRelative(53f, -40f) - quadToRelative(-1f, -7f, -1f, -13.5f) - verticalLineToRelative(-27f) - quadToRelative(0f, -6.5f, 1f, -13.5f) - lineToRelative(-53f, -40f) - quadToRelative(-21f, -17f, -27f, -43f) - reflectiveQuadToRelative(8f, -49f) - lineToRelative(47f, -82f) - quadToRelative(14f, -23f, 39f, -32f) - reflectiveQuadToRelative(50f, 2f) - lineToRelative(62f, 26f) - quadToRelative(11f, -8f, 23f, -15f) - reflectiveQuadToRelative(24f, -12f) - lineToRelative(9f, -66f) - quadToRelative(4f, -26f, 23.5f, -44f) - reflectiveQuadToRelative(46.5f, -18f) - horizontalLineToRelative(94f) - quadToRelative(27f, 0f, 46.5f, 18f) - reflectiveQuadToRelative(23.5f, 44f) - lineToRelative(9f, 66f) - quadToRelative(13f, 5f, 24.5f, 12f) - reflectiveQuadToRelative(22.5f, 15f) - lineToRelative(62f, -26f) - quadToRelative(25f, -11f, 50f, -2f) - reflectiveQuadToRelative(39f, 32f) - lineToRelative(47f, 82f) - quadToRelative(14f, 23f, 8f, 49f) - reflectiveQuadToRelative(-27f, 43f) - lineToRelative(-53f, 40f) - quadToRelative(1f, 7f, 1f, 13.5f) - verticalLineToRelative(27f) - quadToRelative(0f, 6.5f, -2f, 13.5f) - lineToRelative(53f, 40f) - quadToRelative(21f, 17f, 27f, 43f) - reflectiveQuadToRelative(-8f, 49f) - lineToRelative(-48f, 82f) - quadToRelative(-14f, 23f, -39f, 32f) - reflectiveQuadToRelative(-50f, -2f) - lineToRelative(-60f, -26f) - quadToRelative(-11f, 8f, -23f, 15f) - reflectiveQuadToRelative(-24f, 12f) - lineToRelative(-9f, 66f) - quadToRelative(-4f, 26f, -23.5f, 44f) - reflectiveQuadTo(527f, 880f) - horizontalLineToRelative(-94f) - close() - moveTo(440f, 800f) - horizontalLineToRelative(79f) - lineToRelative(14f, -106f) - quadToRelative(31f, -8f, 57.5f, -23.5f) - reflectiveQuadTo(639f, 633f) - lineToRelative(99f, 41f) - lineToRelative(39f, -68f) - lineToRelative(-86f, -65f) - quadToRelative(5f, -14f, 7f, -29.5f) - reflectiveQuadToRelative(2f, -31.5f) - quadToRelative(0f, -16f, -2f, -31.5f) - reflectiveQuadToRelative(-7f, -29.5f) - lineToRelative(86f, -65f) - lineToRelative(-39f, -68f) - lineToRelative(-99f, 42f) - quadToRelative(-22f, -23f, -48.5f, -38.5f) - reflectiveQuadTo(533f, 266f) - lineToRelative(-13f, -106f) - horizontalLineToRelative(-79f) - lineToRelative(-14f, 106f) - quadToRelative(-31f, 8f, -57.5f, 23.5f) - reflectiveQuadTo(321f, 327f) - lineToRelative(-99f, -41f) - lineToRelative(-39f, 68f) - lineToRelative(86f, 64f) - quadToRelative(-5f, 15f, -7f, 30f) - reflectiveQuadToRelative(-2f, 32f) - quadToRelative(0f, 16f, 2f, 31f) - reflectiveQuadToRelative(7f, 30f) - lineToRelative(-86f, 65f) - lineToRelative(39f, 68f) - lineToRelative(99f, -42f) - quadToRelative(22f, 23f, 48.5f, 38.5f) - reflectiveQuadTo(427f, 694f) - lineToRelative(13f, 106f) - close() - moveTo(482f, 620f) - quadToRelative(58f, 0f, 99f, -41f) - reflectiveQuadToRelative(41f, -99f) - quadToRelative(0f, -58f, -41f, -99f) - reflectiveQuadToRelative(-99f, -41f) - quadToRelative(-59f, 0f, -99.5f, 41f) - reflectiveQuadTo(342f, 480f) - quadToRelative(0f, 58f, 40.5f, 99f) - reflectiveQuadToRelative(99.5f, 41f) - close() - moveTo(480f, 480f) - close() - } - } - .build() - - return settings!! - } - -private var settings: ImageVector? = null + @Composable get() = vectorResource(Res.drawable.ic_settings) +val MeshtasticIcons.ConfigChannels: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_list) +val MeshtasticIcons.Notifications: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_notifications) +val MeshtasticIcons.DataUsage: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_data_usage) +val MeshtasticIcons.PermScanWifi: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_perm_scan_wifi) +val MeshtasticIcons.DetectionSensor: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_sensors) +val MeshtasticIcons.SettingsRemote: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_settings_remote) +val MeshtasticIcons.Storage: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_storage) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Signal.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Signal.kt index bd77cf8db..805eebdbc 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Signal.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Signal.kt @@ -16,239 +16,71 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.CrueltyFree -import androidx.compose.material.icons.rounded.Route -import androidx.compose.material.icons.rounded.SignalCellularAlt -import androidx.compose.material.icons.rounded.SsidChart -import androidx.compose.material.icons.rounded.WifiChannel -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.SolidColor +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.graphics.vector.path -import androidx.compose.ui.unit.dp +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_cell_tower +import org.meshtastic.core.resources.ic_cruelty_free +import org.meshtastic.core.resources.ic_graphic_eq +import org.meshtastic.core.resources.ic_hub +import org.meshtastic.core.resources.ic_near_me +import org.meshtastic.core.resources.ic_podcasts +import org.meshtastic.core.resources.ic_signal_cellular_0_bar +import org.meshtastic.core.resources.ic_signal_cellular_1_bar +import org.meshtastic.core.resources.ic_signal_cellular_2_bar +import org.meshtastic.core.resources.ic_signal_cellular_3_bar +import org.meshtastic.core.resources.ic_signal_cellular_4_bar +import org.meshtastic.core.resources.ic_signal_cellular_alt +import org.meshtastic.core.resources.ic_signal_cellular_alt_1_bar +import org.meshtastic.core.resources.ic_signal_cellular_alt_2_bar +import org.meshtastic.core.resources.ic_signal_cellular_off +import org.meshtastic.core.resources.ic_ssid_chart +import org.meshtastic.core.resources.ic_tsunami +import org.meshtastic.core.resources.ic_wifi_channel -val MeshtasticIcons.Hops: ImageVector - get() = Icons.Rounded.CrueltyFree -val MeshtasticIcons.Route: ImageVector - get() = Icons.Rounded.Route +val MeshtasticIcons.HopCount: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_cruelty_free) val MeshtasticIcons.Channel: ImageVector - get() = Icons.Rounded.WifiChannel -val MeshtasticIcons.ChannelUtilization: ImageVector - get() = Icons.Rounded.SignalCellularAlt + @Composable get() = vectorResource(Res.drawable.ic_wifi_channel) val MeshtasticIcons.AirUtilization: ImageVector - get() = Icons.Rounded.SsidChart + @Composable get() = vectorResource(Res.drawable.ic_ssid_chart) + +// Signal measurement metrics +val MeshtasticIcons.Snr: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_graphic_eq) +val MeshtasticIcons.Rssi: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_podcasts) val MeshtasticIcons.SignalCellular0Bar: ImageVector - get() { - if (signalCellular0Bar != null) { - return signalCellular0Bar!! - } - signalCellular0Bar = - ImageVector.Builder( - name = "SignalCellular0Bar", - defaultWidth = 24.dp, - defaultHeight = 24.dp, - viewportWidth = 960f, - viewportHeight = 960f, - ) - .apply { - path(fill = SolidColor(Color(0xFFE3E3E3))) { - moveTo(177f, 880f) - quadToRelative(-27f, 0f, -37.5f, -24.5f) - reflectiveQuadTo(148f, 812f) - lineToRelative(664f, -664f) - quadToRelative(19f, -19f, 43.5f, -8.5f) - reflectiveQuadTo(880f, 177f) - verticalLineToRelative(643f) - quadToRelative(0f, 25f, -17.5f, 42.5f) - reflectiveQuadTo(820f, 880f) - lineTo(177f, 880f) - close() - moveTo(273f, 800f) - horizontalLineToRelative(527f) - verticalLineToRelative(-526f) - lineTo(273f, 800f) - close() - } - } - .build() - - return signalCellular0Bar!! - } - -private var signalCellular0Bar: ImageVector? = null + @Composable get() = vectorResource(Res.drawable.ic_signal_cellular_0_bar) val MeshtasticIcons.SignalCellular1Bar: ImageVector - get() { - if (signalCellular1Bar != null) { - return signalCellular1Bar!! - } - signalCellular1Bar = - ImageVector.Builder( - name = "SignalCellular1Bar", - defaultWidth = 24.dp, - defaultHeight = 24.dp, - viewportWidth = 960f, - viewportHeight = 960f, - ) - .apply { - path(fill = SolidColor(Color(0xFFE3E3E3))) { - moveTo(177f, 880f) - quadToRelative(-18f, 0f, -29.5f, -12f) - reflectiveQuadTo(136f, 840f) - quadToRelative(0f, -8f, 3f, -15f) - reflectiveQuadToRelative(9f, -13f) - lineToRelative(664f, -664f) - quadToRelative(6f, -6f, 13f, -9f) - reflectiveQuadToRelative(15f, -3f) - quadToRelative(16f, 0f, 28f, 11.5f) - reflectiveQuadToRelative(12f, 29.5f) - verticalLineToRelative(643f) - quadToRelative(0f, 25f, -17.5f, 42.5f) - reflectiveQuadTo(820f, 880f) - lineTo(177f, 880f) - close() - moveTo(400f, 800f) - horizontalLineToRelative(400f) - verticalLineToRelative(-526f) - lineTo(400f, 674f) - verticalLineToRelative(126f) - close() - } - } - .build() - - return signalCellular1Bar!! - } - -private var signalCellular1Bar: ImageVector? = null + @Composable get() = vectorResource(Res.drawable.ic_signal_cellular_1_bar) val MeshtasticIcons.SignalCellular2Bar: ImageVector - get() { - if (signalCellular2Bar != null) { - return signalCellular2Bar!! - } - signalCellular2Bar = - ImageVector.Builder( - name = "SignalCellular2Bar", - defaultWidth = 24.dp, - defaultHeight = 24.dp, - viewportWidth = 960f, - viewportHeight = 960f, - ) - .apply { - path(fill = SolidColor(Color(0xFFE3E3E3))) { - moveTo(177f, 880f) - quadToRelative(-18f, 0f, -29.5f, -12f) - reflectiveQuadTo(136f, 840f) - quadToRelative(0f, -8f, 3f, -15f) - reflectiveQuadToRelative(9f, -13f) - lineToRelative(664f, -664f) - quadToRelative(6f, -6f, 13f, -9f) - reflectiveQuadToRelative(15f, -3f) - quadToRelative(16f, 0f, 28f, 11.5f) - reflectiveQuadToRelative(12f, 29.5f) - verticalLineToRelative(643f) - quadToRelative(0f, 25f, -17.5f, 42.5f) - reflectiveQuadTo(820f, 880f) - lineTo(177f, 880f) - close() - moveTo(520f, 800f) - horizontalLineToRelative(280f) - verticalLineToRelative(-526f) - lineTo(520f, 554f) - verticalLineToRelative(246f) - close() - } - } - .build() - - return signalCellular2Bar!! - } - -private var signalCellular2Bar: ImageVector? = null + @Composable get() = vectorResource(Res.drawable.ic_signal_cellular_2_bar) val MeshtasticIcons.SignalCellular3Bar: ImageVector - get() { - if (signalCellular3Bar != null) { - return signalCellular3Bar!! - } - signalCellular3Bar = - ImageVector.Builder( - name = "SignalCellular3Bar", - defaultWidth = 24.dp, - defaultHeight = 24.dp, - viewportWidth = 960f, - viewportHeight = 960f, - ) - .apply { - path(fill = SolidColor(Color(0xFFE3E3E3))) { - moveTo(177f, 880f) - quadToRelative(-18f, 0f, -29.5f, -12f) - reflectiveQuadTo(136f, 840f) - quadToRelative(0f, -8f, 3f, -15f) - reflectiveQuadToRelative(9f, -13f) - lineToRelative(664f, -664f) - quadToRelative(6f, -6f, 13f, -9f) - reflectiveQuadToRelative(15f, -3f) - quadToRelative(16f, 0f, 28f, 11.5f) - reflectiveQuadToRelative(12f, 29.5f) - verticalLineToRelative(643f) - quadToRelative(0f, 25f, -17.5f, 42.5f) - reflectiveQuadTo(820f, 880f) - lineTo(177f, 880f) - close() - moveTo(600f, 800f) - horizontalLineToRelative(200f) - verticalLineToRelative(-526f) - lineTo(600f, 474f) - verticalLineToRelative(326f) - close() - } - } - .build() - - return signalCellular3Bar!! - } - -private var signalCellular3Bar: ImageVector? = null + @Composable get() = vectorResource(Res.drawable.ic_signal_cellular_3_bar) val MeshtasticIcons.SignalCellular4Bar: ImageVector - get() { - if (signalCellular4Bar != null) { - return signalCellular4Bar!! - } - signalCellular4Bar = - ImageVector.Builder( - name = "SignalCellular4Bar", - defaultWidth = 24.dp, - defaultHeight = 24.dp, - viewportWidth = 960f, - viewportHeight = 960f, - ) - .apply { - path(fill = SolidColor(Color(0xFFE3E3E3))) { - moveTo(177f, 880f) - quadToRelative(-18f, 0f, -29.5f, -12f) - reflectiveQuadTo(136f, 840f) - quadToRelative(0f, -8f, 3f, -15f) - reflectiveQuadToRelative(9f, -13f) - lineToRelative(664f, -664f) - quadToRelative(6f, -6f, 13f, -9f) - reflectiveQuadToRelative(15f, -3f) - quadToRelative(16f, 0f, 28f, 11.5f) - reflectiveQuadToRelative(12f, 29.5f) - verticalLineToRelative(643f) - quadToRelative(0f, 25f, -17.5f, 42.5f) - reflectiveQuadTo(820f, 880f) - lineTo(177f, 880f) - close() - } - } - .build() + @Composable get() = vectorResource(Res.drawable.ic_signal_cellular_4_bar) - return signalCellular4Bar!! - } +val MeshtasticIcons.MeshHub: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_hub) +val MeshtasticIcons.NearMe: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_near_me) +val MeshtasticIcons.Tsunami: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_tsunami) -private var signalCellular4Bar: ImageVector? = null +val MeshtasticIcons.SignalOff: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_signal_cellular_off) +val MeshtasticIcons.SignalAlt1Bar: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_signal_cellular_alt_1_bar) +val MeshtasticIcons.SignalAlt2Bar: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_signal_cellular_alt_2_bar) +val MeshtasticIcons.CellTower: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_cell_tower) +val MeshtasticIcons.ChannelUtilization: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_signal_cellular_alt) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Status.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Status.kt index a0f02f209..75c2a3d1a 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Status.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Status.kt @@ -16,81 +16,122 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.SpeakerNotes -import androidx.compose.material.icons.automirrored.filled.VolumeOff -import androidx.compose.material.icons.automirrored.filled.VolumeUp -import androidx.compose.material.icons.automirrored.twotone.VolumeMute -import androidx.compose.material.icons.automirrored.twotone.VolumeUp -import androidx.compose.material.icons.rounded.ArrowCircleUp -import androidx.compose.material.icons.rounded.CheckCircleOutline -import androidx.compose.material.icons.rounded.Cloud -import androidx.compose.material.icons.rounded.CloudOff -import androidx.compose.material.icons.rounded.Dangerous -import androidx.compose.material.icons.rounded.History -import androidx.compose.material.icons.rounded.Lan -import androidx.compose.material.icons.rounded.NoCell -import androidx.compose.material.icons.rounded.SettingsEthernet -import androidx.compose.material.icons.rounded.SpeakerNotesOff -import androidx.compose.material.icons.rounded.Star -import androidx.compose.material.icons.rounded.StarBorder -import androidx.compose.material.icons.rounded.Terminal -import androidx.compose.material.icons.twotone.Cloud -import androidx.compose.material.icons.twotone.CloudDone -import androidx.compose.material.icons.twotone.CloudOff -import androidx.compose.material.icons.twotone.CloudSync -import androidx.compose.material.icons.twotone.HowToReg +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_arrow_circle_up +import org.meshtastic.core.resources.ic_bedtime +import org.meshtastic.core.resources.ic_check_circle +import org.meshtastic.core.resources.ic_check_circle_outline +import org.meshtastic.core.resources.ic_cloud +import org.meshtastic.core.resources.ic_cloud_done +import org.meshtastic.core.resources.ic_cloud_download +import org.meshtastic.core.resources.ic_cloud_sync +import org.meshtastic.core.resources.ic_cloud_upload +import org.meshtastic.core.resources.ic_dangerous +import org.meshtastic.core.resources.ic_error +import org.meshtastic.core.resources.ic_error_outline +import org.meshtastic.core.resources.ic_history +import org.meshtastic.core.resources.ic_how_to_reg +import org.meshtastic.core.resources.ic_info +import org.meshtastic.core.resources.ic_lan +import org.meshtastic.core.resources.ic_link_off +import org.meshtastic.core.resources.ic_no_cell +import org.meshtastic.core.resources.ic_radio_button_unchecked +import org.meshtastic.core.resources.ic_schedule +import org.meshtastic.core.resources.ic_settings_ethernet +import org.meshtastic.core.resources.ic_speaker_notes +import org.meshtastic.core.resources.ic_speaker_notes_off +import org.meshtastic.core.resources.ic_star +import org.meshtastic.core.resources.ic_star_border +import org.meshtastic.core.resources.ic_terminal +import org.meshtastic.core.resources.ic_volume_mute +import org.meshtastic.core.resources.ic_volume_off +import org.meshtastic.core.resources.ic_warning +// Favorites val MeshtasticIcons.Favorite: ImageVector - get() = Icons.Rounded.Star + @Composable get() = vectorResource(Res.drawable.ic_star) val MeshtasticIcons.NotFavorite: ImageVector - get() = Icons.Rounded.StarBorder + @Composable get() = vectorResource(Res.drawable.ic_star_border) + +// Mute state val MeshtasticIcons.Muted: ImageVector - get() = Icons.Rounded.SpeakerNotesOff + @Composable get() = vectorResource(Res.drawable.ic_speaker_notes_off) val MeshtasticIcons.Unmuted: ImageVector - get() = Icons.AutoMirrored.Filled.SpeakerNotes + @Composable get() = vectorResource(Res.drawable.ic_speaker_notes) + +// Volume val MeshtasticIcons.VolumeOff: ImageVector - get() = Icons.AutoMirrored.Filled.VolumeOff -val MeshtasticIcons.VolumeUp: ImageVector - get() = Icons.AutoMirrored.Filled.VolumeUp + @Composable get() = vectorResource(Res.drawable.ic_volume_off) +val MeshtasticIcons.VolumeMute: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_volume_mute) + +// Time val MeshtasticIcons.History: ImageVector - get() = Icons.Rounded.History -val MeshtasticIcons.Cloud: ImageVector - get() = Icons.Rounded.Cloud -val MeshtasticIcons.CloudOff: ImageVector - get() = Icons.Rounded.CloudOff + @Composable get() = vectorResource(Res.drawable.ic_history) + +// MQTT status +val MeshtasticIcons.MqttDelivered: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_cloud_done) +val MeshtasticIcons.MqttSyncing: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_cloud_sync) + +// Connectivity val MeshtasticIcons.Unmessageable: ImageVector - get() = Icons.Rounded.NoCell - -val MeshtasticIcons.CloudDone: ImageVector - get() = Icons.TwoTone.CloudDone -val MeshtasticIcons.CloudSync: ImageVector - get() = Icons.TwoTone.CloudSync -val MeshtasticIcons.CloudOffTwoTone: ImageVector - get() = Icons.TwoTone.CloudOff -val MeshtasticIcons.CloudTwoTone: ImageVector - get() = Icons.TwoTone.Cloud - -val MeshtasticIcons.ArrowCircleUp: ImageVector - get() = Icons.Rounded.ArrowCircleUp -val MeshtasticIcons.Dangerous: ImageVector - get() = Icons.Rounded.Dangerous - -val MeshtasticIcons.VolumeUpTwoTone: ImageVector - get() = Icons.AutoMirrored.TwoTone.VolumeUp -val MeshtasticIcons.VolumeMuteTwoTone: ImageVector - get() = Icons.AutoMirrored.TwoTone.VolumeMute - -val MeshtasticIcons.CheckCircle: ImageVector - get() = Icons.Rounded.CheckCircleOutline - -val MeshtasticIcons.Acknowledged: ImageVector - get() = Icons.TwoTone.HowToReg - + @Composable get() = vectorResource(Res.drawable.ic_no_cell) val MeshtasticIcons.Udp: ImageVector - get() = Icons.Rounded.Lan + @Composable get() = vectorResource(Res.drawable.ic_lan) val MeshtasticIcons.Api: ImageVector - get() = Icons.Rounded.Terminal + @Composable get() = vectorResource(Res.drawable.ic_terminal) val MeshtasticIcons.Ethernet: ImageVector - get() = Icons.Rounded.SettingsEthernet + @Composable get() = vectorResource(Res.drawable.ic_settings_ethernet) + +// Update & lifecycle +val MeshtasticIcons.ArrowCircleUp: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_arrow_circle_up) +val MeshtasticIcons.Dangerous: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_dangerous) + +// Result states +val MeshtasticIcons.CheckCircle: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_check_circle_outline) +val MeshtasticIcons.Success: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_check_circle) +val MeshtasticIcons.Error: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_error) +val MeshtasticIcons.ErrorOutline: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_error_outline) +val MeshtasticIcons.Info: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_info) + +// Acknowledgment +val MeshtasticIcons.Acknowledged: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_how_to_reg) + +// Selection state +val MeshtasticIcons.RadioButtonUnchecked: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_radio_button_unchecked) + +// Device sleep +val MeshtasticIcons.DeviceSleep: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_bedtime) + +// Node connection state (non-MQTT) +val MeshtasticIcons.Disconnected: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_link_off) + +// Message delivery status +val MeshtasticIcons.MessageEnroute: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_schedule) +val MeshtasticIcons.MessageError: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_error_outline) +val MeshtasticIcons.Warning: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_warning) +val MeshtasticIcons.MqttConnected: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_cloud) +val MeshtasticIcons.CloudUpload: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_cloud_upload) +val MeshtasticIcons.CloudDownload: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_cloud_download) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Telemetry.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Telemetry.kt index 56f51bd8a..983e07bbf 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Telemetry.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/icon/Telemetry.kt @@ -16,45 +16,78 @@ */ package org.meshtastic.core.ui.icon -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Air -import androidx.compose.material.icons.rounded.DataArray -import androidx.compose.material.icons.rounded.ElectricBolt -import androidx.compose.material.icons.rounded.Grass -import androidx.compose.material.icons.rounded.LineAxis -import androidx.compose.material.icons.rounded.People -import androidx.compose.material.icons.rounded.SocialDistance -import androidx.compose.material.icons.rounded.Speed -import androidx.compose.material.icons.rounded.StackedLineChart -import androidx.compose.material.icons.rounded.Thermostat -import androidx.compose.material.icons.rounded.WaterDrop -import androidx.compose.material.icons.twotone.SatelliteAlt +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector +import org.jetbrains.compose.resources.vectorResource +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_air +import org.meshtastic.core.resources.ic_alt_route +import org.meshtastic.core.resources.ic_blur_on +import org.meshtastic.core.resources.ic_bolt +import org.meshtastic.core.resources.ic_charging_station +import org.meshtastic.core.resources.ic_compress +import org.meshtastic.core.resources.ic_data_array +import org.meshtastic.core.resources.ic_electric_bolt +import org.meshtastic.core.resources.ic_explore +import org.meshtastic.core.resources.ic_grass +import org.meshtastic.core.resources.ic_height +import org.meshtastic.core.resources.ic_light_mode +import org.meshtastic.core.resources.ic_line_axis +import org.meshtastic.core.resources.ic_navigation +import org.meshtastic.core.resources.ic_power +import org.meshtastic.core.resources.ic_satellite_alt +import org.meshtastic.core.resources.ic_scale +import org.meshtastic.core.resources.ic_social_distance +import org.meshtastic.core.resources.ic_speed +import org.meshtastic.core.resources.ic_stacked_line_chart +import org.meshtastic.core.resources.ic_thermostat +import org.meshtastic.core.resources.ic_volume_up +import org.meshtastic.core.resources.ic_water_drop -val MeshtasticIcons.Temperature: ImageVector - get() = Icons.Rounded.Thermostat val MeshtasticIcons.Humidity: ImageVector - get() = Icons.Rounded.WaterDrop + @Composable get() = vectorResource(Res.drawable.ic_water_drop) val MeshtasticIcons.Pressure: ImageVector - get() = Icons.Rounded.Speed -val MeshtasticIcons.Soil: ImageVector - get() = Icons.Rounded.Grass -val MeshtasticIcons.Paxcount: ImageVector - get() = Icons.Rounded.People -val MeshtasticIcons.AirQuality: ImageVector - get() = Icons.Rounded.Air -val MeshtasticIcons.Power: ImageVector - get() = Icons.Rounded.ElectricBolt + @Composable get() = vectorResource(Res.drawable.ic_compress) +val MeshtasticIcons.SoilMoisture: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_grass) +val MeshtasticIcons.ElectricPower: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_electric_bolt) val MeshtasticIcons.Distance: ImageVector - get() = Icons.Rounded.SocialDistance + @Composable get() = vectorResource(Res.drawable.ic_social_distance) val MeshtasticIcons.Satellites: ImageVector - get() = Icons.TwoTone.SatelliteAlt + @Composable get() = vectorResource(Res.drawable.ic_satellite_alt) val MeshtasticIcons.DataArray: ImageVector - get() = Icons.Rounded.DataArray -val MeshtasticIcons.Speed: ImageVector - get() = Icons.Rounded.Speed + @Composable get() = vectorResource(Res.drawable.ic_data_array) val MeshtasticIcons.Chart: ImageVector - get() = Icons.Rounded.StackedLineChart - + @Composable get() = vectorResource(Res.drawable.ic_stacked_line_chart) val MeshtasticIcons.LineAxis: ImageVector - get() = Icons.Rounded.LineAxis + @Composable get() = vectorResource(Res.drawable.ic_line_axis) + +val MeshtasticIcons.Altitude: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_height) +val MeshtasticIcons.Weight: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_scale) +val MeshtasticIcons.Particulate: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_blur_on) +val MeshtasticIcons.WindDirection: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_navigation) +val MeshtasticIcons.Voltage: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_bolt) +val MeshtasticIcons.Compass: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_explore) +val MeshtasticIcons.Temperature: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_thermostat) +val MeshtasticIcons.PowerSupply: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_power) +val MeshtasticIcons.AirQuality: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_air) +val MeshtasticIcons.Speed: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_speed) +val MeshtasticIcons.LightMode: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_light_mode) +val MeshtasticIcons.ChargingStation: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_charging_station) +val MeshtasticIcons.TrafficManagement: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_alt_route) +val MeshtasticIcons.VolumeUp: ImageVector + @Composable get() = vectorResource(Res.drawable.ic_volume_up) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/navigation/TopLevelDestinationExt.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/navigation/TopLevelDestinationExt.kt index e53ef7771..437c6ad3b 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/navigation/TopLevelDestinationExt.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/navigation/TopLevelDestinationExt.kt @@ -16,22 +16,22 @@ */ package org.meshtastic.core.ui.navigation -import androidx.compose.ui.graphics.vector.ImageVector +import org.jetbrains.compose.resources.DrawableResource import org.meshtastic.core.navigation.TopLevelDestination -import org.meshtastic.core.ui.icon.Conversations -import org.meshtastic.core.ui.icon.Map -import org.meshtastic.core.ui.icon.MeshtasticIcons -import org.meshtastic.core.ui.icon.Nodes -import org.meshtastic.core.ui.icon.Settings -import org.meshtastic.core.ui.icon.Wifi +import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_forum +import org.meshtastic.core.resources.ic_map +import org.meshtastic.core.resources.ic_nodes +import org.meshtastic.core.resources.ic_settings +import org.meshtastic.core.resources.ic_wifi -/** Maps a shared [TopLevelDestination] to its corresponding icon from [MeshtasticIcons]. */ -val TopLevelDestination.icon: ImageVector +/** Maps a shared [TopLevelDestination] to its corresponding icon [DrawableResource]. */ +val TopLevelDestination.icon: DrawableResource get() = when (this) { - TopLevelDestination.Conversations -> MeshtasticIcons.Conversations - TopLevelDestination.Nodes -> MeshtasticIcons.Nodes - TopLevelDestination.Map -> MeshtasticIcons.Map - TopLevelDestination.Settings -> MeshtasticIcons.Settings - TopLevelDestination.Connections -> MeshtasticIcons.Wifi + TopLevelDestination.Conversations -> Res.drawable.ic_forum + TopLevelDestination.Nodes -> Res.drawable.ic_nodes + TopLevelDestination.Map -> Res.drawable.ic_map + TopLevelDestination.Settings -> Res.drawable.ic_settings + TopLevelDestination.Connections -> Res.drawable.ic_wifi } diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/util/AlertPreviews.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/util/AlertPreviews.kt index bc4937fd5..a53b82637 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/util/AlertPreviews.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/util/AlertPreviews.kt @@ -20,8 +20,6 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Warning import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -31,6 +29,8 @@ import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.preview_custom_composable_line_one import org.meshtastic.core.resources.preview_custom_composable_line_two import org.meshtastic.core.ui.component.MeshtasticDialog +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Warning import org.meshtastic.core.ui.theme.AppTheme /** A helper component that renders an [AlertManager.AlertData] using the same logic as MainScreen. */ @@ -79,7 +79,7 @@ fun PreviewIconAlert() { AlertManager.AlertData( title = "Warning", message = "This action cannot be undone.", - icon = Icons.Rounded.Warning, + icon = MeshtasticIcons.Warning, ), ) } diff --git a/desktop/build.gradle.kts b/desktop/build.gradle.kts index f1976bc11..c22cbc045 100644 --- a/desktop/build.gradle.kts +++ b/desktop/build.gradle.kts @@ -183,7 +183,6 @@ dependencies { // Compose Desktop implementation(compose.desktop.currentOs) implementation(libs.compose.multiplatform.material3) - implementation(libs.compose.multiplatform.materialIconsExtended) implementation(libs.compose.multiplatform.runtime) implementation(libs.compose.multiplatform.foundation) implementation(libs.compose.multiplatform.resources) diff --git a/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/ConnectionsScreen.kt b/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/ConnectionsScreen.kt index 631a5da9d..05a172e1f 100644 --- a/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/ConnectionsScreen.kt +++ b/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/ConnectionsScreen.kt @@ -27,8 +27,6 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Language import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults import androidx.compose.material3.ExperimentalMaterial3Api @@ -68,6 +66,7 @@ import org.meshtastic.core.resources.unknown_device import org.meshtastic.core.ui.component.ListItem import org.meshtastic.core.ui.component.MainAppBar import org.meshtastic.core.ui.component.TitledCard +import org.meshtastic.core.ui.icon.Language import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.icon.NoDevice import org.meshtastic.core.ui.viewmodel.ConnectionsViewModel @@ -317,7 +316,7 @@ private fun ConnectedDeviceContent( if (regionUnset && selectedDevice != "m") { TitledCard(title = null) { ListItem( - leadingIcon = Icons.Rounded.Language, + leadingIcon = MeshtasticIcons.Language, text = stringResource(Res.string.set_your_region), onClick = onSetRegion, ) diff --git a/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/ConnectionsSegmentedBar.kt b/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/ConnectionsSegmentedBar.kt index acde5889e..af09136f2 100644 --- a/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/ConnectionsSegmentedBar.kt +++ b/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/ConnectionsSegmentedBar.kt @@ -16,10 +16,6 @@ */ package org.meshtastic.feature.connections.ui.components -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Bluetooth -import androidx.compose.material.icons.rounded.Usb -import androidx.compose.material.icons.rounded.Wifi import androidx.compose.material3.Icon import androidx.compose.material3.SegmentedButton import androidx.compose.material3.SegmentedButtonDefaults @@ -27,13 +23,17 @@ import androidx.compose.material3.SingleChoiceSegmentedButtonRow import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.text.style.TextOverflow +import org.jetbrains.compose.resources.DrawableResource import org.jetbrains.compose.resources.StringResource import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.model.DeviceType import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.bluetooth +import org.meshtastic.core.resources.ic_bluetooth +import org.meshtastic.core.resources.ic_usb +import org.meshtastic.core.resources.ic_wifi import org.meshtastic.core.resources.network import org.meshtastic.core.resources.serial @@ -55,15 +55,15 @@ fun ConnectionsSegmentedBar( shape = SegmentedButtonDefaults.itemShape(index, visibleItems.size), onClick = { onClickDeviceType(item.deviceType) }, selected = item.deviceType == selectedDeviceType, - icon = { Icon(imageVector = item.imageVector, contentDescription = text) }, + icon = { Icon(imageVector = vectorResource(item.icon), contentDescription = text) }, label = { Text(text = text, maxLines = 1, overflow = TextOverflow.Ellipsis) }, ) } } } -private enum class Item(val imageVector: ImageVector, val textRes: StringResource, val deviceType: DeviceType) { - BLUETOOTH(imageVector = Icons.Rounded.Bluetooth, textRes = Res.string.bluetooth, deviceType = DeviceType.BLE), - NETWORK(imageVector = Icons.Rounded.Wifi, textRes = Res.string.network, deviceType = DeviceType.TCP), - SERIAL(imageVector = Icons.Rounded.Usb, textRes = Res.string.serial, deviceType = DeviceType.USB), +private enum class Item(val icon: DrawableResource, val textRes: StringResource, val deviceType: DeviceType) { + BLUETOOTH(icon = Res.drawable.ic_bluetooth, textRes = Res.string.bluetooth, deviceType = DeviceType.BLE), + NETWORK(icon = Res.drawable.ic_wifi, textRes = Res.string.network, deviceType = DeviceType.TCP), + SERIAL(icon = Res.drawable.ic_usb, textRes = Res.string.serial, deviceType = DeviceType.USB), } diff --git a/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/DeviceListItem.kt b/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/DeviceListItem.kt index 9331cc909..7071c18c9 100644 --- a/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/DeviceListItem.kt +++ b/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/DeviceListItem.kt @@ -24,13 +24,6 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.rounded.BluetoothSearching -import androidx.compose.material.icons.rounded.Add -import androidx.compose.material.icons.rounded.Bluetooth -import androidx.compose.material.icons.rounded.BluetoothConnected -import androidx.compose.material.icons.rounded.Usb -import androidx.compose.material.icons.rounded.Wifi import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.Icon import androidx.compose.material3.ListItem @@ -58,6 +51,13 @@ import org.meshtastic.core.resources.network import org.meshtastic.core.resources.serial import org.meshtastic.core.ui.component.NodeChip import org.meshtastic.core.ui.component.Rssi +import org.meshtastic.core.ui.icon.Add +import org.meshtastic.core.ui.icon.Bluetooth +import org.meshtastic.core.ui.icon.BluetoothConnected +import org.meshtastic.core.ui.icon.BluetoothSearching +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Usb +import org.meshtastic.core.ui.icon.Wifi import org.meshtastic.feature.connections.model.DeviceListEntry private const val RSSI_UPDATE_RATE_MS = 2000L @@ -91,16 +91,16 @@ fun DeviceListItem( when (device) { is DeviceListEntry.Ble -> if (connectionState.isConnected()) { - Icons.Rounded.BluetoothConnected + MeshtasticIcons.BluetoothConnected } else if (connectionState.isConnecting()) { - Icons.AutoMirrored.Rounded.BluetoothSearching + MeshtasticIcons.BluetoothSearching } else { - Icons.Rounded.Bluetooth + MeshtasticIcons.Bluetooth } - is DeviceListEntry.Usb -> Icons.Rounded.Usb - is DeviceListEntry.Tcp -> Icons.Rounded.Wifi - is DeviceListEntry.Mock -> Icons.Rounded.Add + is DeviceListEntry.Usb -> MeshtasticIcons.Usb + is DeviceListEntry.Tcp -> MeshtasticIcons.Wifi + is DeviceListEntry.Mock -> MeshtasticIcons.Add } val contentDescription = diff --git a/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/NetworkDevices.kt b/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/NetworkDevices.kt index b775b715e..3ff51db1e 100644 --- a/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/NetworkDevices.kt +++ b/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/NetworkDevices.kt @@ -23,9 +23,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.foundation.text.input.TextFieldLineLimits import androidx.compose.foundation.text.input.rememberTextFieldState -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Add -import androidx.compose.material.icons.rounded.Router import androidx.compose.material3.Button import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.FloatingActionButton @@ -59,6 +56,9 @@ import org.meshtastic.core.resources.discovered_network_devices import org.meshtastic.core.resources.ip_port import org.meshtastic.core.resources.no_network_devices_found import org.meshtastic.core.resources.recent_network_devices +import org.meshtastic.core.ui.icon.Add +import org.meshtastic.core.ui.icon.HardwareModel +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.feature.connections.ScannerViewModel import org.meshtastic.feature.connections.model.DeviceListEntry @@ -97,11 +97,11 @@ fun NetworkDevices( if (discoveredNetworkDevices.isEmpty() && recentNetworkDevices.isEmpty()) { EmptyStateContent( text = stringResource(Res.string.no_network_devices_found), - imageVector = Icons.Rounded.Router, + imageVector = MeshtasticIcons.HardwareModel, modifier = Modifier.padding(vertical = 32.dp), ) { Button(onClick = { showAddDialog = true }) { - Icon(Icons.Rounded.Add, contentDescription = null) + Icon(MeshtasticIcons.Add, contentDescription = null) Text(stringResource(Res.string.add_network_device)) } } @@ -127,7 +127,7 @@ fun NetworkDevices( Row(modifier = Modifier.padding(top = 8.dp)) { FloatingActionButton(onClick = { showAddDialog = true }) { - Icon(Icons.Rounded.Add, contentDescription = stringResource(Res.string.add_network_device)) + Icon(MeshtasticIcons.Add, contentDescription = stringResource(Res.string.add_network_device)) } } } diff --git a/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/UsbDevices.kt b/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/UsbDevices.kt index 4a10d18bf..ef1183c3f 100644 --- a/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/UsbDevices.kt +++ b/feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/UsbDevices.kt @@ -17,8 +17,6 @@ package org.meshtastic.feature.connections.ui.components import androidx.compose.foundation.layout.padding -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.UsbOff import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp @@ -27,6 +25,8 @@ import org.meshtastic.core.model.ConnectionState import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.no_usb_devices_found import org.meshtastic.core.resources.usb +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.UsbOff import org.meshtastic.feature.connections.ScannerViewModel import org.meshtastic.feature.connections.model.DeviceListEntry @@ -40,7 +40,7 @@ fun UsbDevices( if (usbDevices.isEmpty()) { EmptyStateContent( text = stringResource(Res.string.no_usb_devices_found), - imageVector = Icons.Rounded.UsbOff, + imageVector = MeshtasticIcons.UsbOff, modifier = Modifier.padding(vertical = 32.dp), ) } else { diff --git a/feature/firmware/src/commonMain/kotlin/org/meshtastic/feature/firmware/FirmwareUpdateScreen.kt b/feature/firmware/src/commonMain/kotlin/org/meshtastic/feature/firmware/FirmwareUpdateScreen.kt index da7528d9b..0a051fa9c 100644 --- a/feature/firmware/src/commonMain/kotlin/org/meshtastic/feature/firmware/FirmwareUpdateScreen.kt +++ b/feature/firmware/src/commonMain/kotlin/org/meshtastic/feature/firmware/FirmwareUpdateScreen.kt @@ -34,8 +34,6 @@ import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material3.Button import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults @@ -127,6 +125,7 @@ import org.meshtastic.core.resources.learn_more import org.meshtastic.core.resources.okay import org.meshtastic.core.resources.save import org.meshtastic.core.ui.component.MeshtasticDialog +import org.meshtastic.core.ui.icon.ArrowBack import org.meshtastic.core.ui.icon.Bluetooth import org.meshtastic.core.ui.icon.CheckCircle import org.meshtastic.core.ui.icon.CloudDownload @@ -233,7 +232,7 @@ private fun FirmwareUpdateScaffold( title = { Text(stringResource(Res.string.firmware_update_title)) }, navigationIcon = { IconButton(onClick = { onNavigateUp() }) { - Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = stringResource(Res.string.back)) + Icon(MeshtasticIcons.ArrowBack, contentDescription = stringResource(Res.string.back)) } }, ) diff --git a/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/BluetoothScreen.kt b/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/BluetoothScreen.kt index 849c8ce11..4b5cdf8ff 100644 --- a/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/BluetoothScreen.kt +++ b/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/BluetoothScreen.kt @@ -19,11 +19,7 @@ package org.meshtastic.feature.intro import android.content.Intent import android.net.Uri import android.provider.Settings -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.outlined.Bluetooth -import androidx.compose.material.icons.outlined.SettingsInputAntenna import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember import androidx.compose.ui.platform.LocalContext import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.bluetooth_feature_config @@ -35,6 +31,9 @@ import org.meshtastic.core.resources.configure_bluetooth_permissions import org.meshtastic.core.resources.next import org.meshtastic.core.resources.permission_missing_31 import org.meshtastic.core.resources.settings +import org.meshtastic.core.ui.icon.Antenna +import org.meshtastic.core.ui.icon.Bluetooth +import org.meshtastic.core.ui.icon.MeshtasticIcons /** * Screen for configuring Bluetooth permissions during the app introduction. It explains why Bluetooth permissions are @@ -55,20 +54,19 @@ internal fun BluetoothScreen(showNextButton: Boolean, onSkip: () -> Unit, onConf tag = SETTINGS_TAG, ) - val features = remember { + val features = listOf( FeatureUIData( - icon = Icons.Outlined.Bluetooth, + icon = MeshtasticIcons.Bluetooth, titleRes = Res.string.bluetooth_feature_discovery, subtitleRes = Res.string.bluetooth_feature_discovery_description, ), FeatureUIData( - icon = Icons.Outlined.SettingsInputAntenna, + icon = MeshtasticIcons.Antenna, titleRes = Res.string.bluetooth_feature_config, subtitleRes = Res.string.bluetooth_feature_config_description, ), ) - } PermissionScreenLayout( headlineRes = Res.string.bluetooth_permission, diff --git a/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/LocationScreen.kt b/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/LocationScreen.kt index 3d34178d4..0dc70d15d 100644 --- a/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/LocationScreen.kt +++ b/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/LocationScreen.kt @@ -19,11 +19,7 @@ package org.meshtastic.feature.intro import android.content.Intent import android.net.Uri import android.provider.Settings -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.outlined.LocationOn -import androidx.compose.material.icons.outlined.Router import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember import androidx.compose.ui.platform.LocalContext import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.configure_location_permissions @@ -39,6 +35,9 @@ import org.meshtastic.core.resources.phone_location_description import org.meshtastic.core.resources.settings import org.meshtastic.core.resources.share_location import org.meshtastic.core.resources.share_location_description +import org.meshtastic.core.ui.icon.HardwareModel +import org.meshtastic.core.ui.icon.LocationOn +import org.meshtastic.core.ui.icon.MeshtasticIcons /** * Screen for configuring location permissions during the app introduction. It explains why location permissions are @@ -59,30 +58,29 @@ internal fun LocationScreen(showNextButton: Boolean, onSkip: () -> Unit, onConfi tag = SETTINGS_TAG, ) - val features = remember { + val features = listOf( FeatureUIData( - icon = Icons.Outlined.LocationOn, + icon = MeshtasticIcons.LocationOn, titleRes = Res.string.share_location, subtitleRes = Res.string.share_location_description, ), FeatureUIData( - icon = Icons.Outlined.Router, + icon = MeshtasticIcons.HardwareModel, titleRes = Res.string.distance_measurements, subtitleRes = Res.string.distance_measurements_description, ), FeatureUIData( - icon = Icons.Outlined.Router, // Consider a different icon if appropriate + icon = MeshtasticIcons.HardwareModel, // Consider a different icon if appropriate titleRes = Res.string.distance_filters, subtitleRes = Res.string.distance_filters_description, ), FeatureUIData( - icon = Icons.Outlined.LocationOn, // Consider a different icon if appropriate + icon = MeshtasticIcons.LocationOn, // Consider a different icon if appropriate titleRes = Res.string.mesh_map_location, subtitleRes = Res.string.mesh_map_location_description, ), ) - } PermissionScreenLayout( headlineRes = Res.string.phone_location, diff --git a/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/NotificationsScreen.kt b/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/NotificationsScreen.kt index 41a45f4e1..6cb632197 100644 --- a/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/NotificationsScreen.kt +++ b/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/NotificationsScreen.kt @@ -19,12 +19,7 @@ package org.meshtastic.feature.intro import android.content.Intent import android.net.Uri import android.provider.Settings -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.Message -import androidx.compose.material.icons.outlined.BatteryAlert -import androidx.compose.material.icons.outlined.SpeakerPhone import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember import androidx.compose.ui.platform.LocalContext import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.app_notifications @@ -38,6 +33,10 @@ import org.meshtastic.core.resources.notifications_for_channel_and_direct_messag import org.meshtastic.core.resources.notifications_for_low_battery_alerts import org.meshtastic.core.resources.notifications_for_newly_discovered_nodes import org.meshtastic.core.resources.settings +import org.meshtastic.core.ui.icon.BatteryAlert +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Message +import org.meshtastic.core.ui.icon.Speaker /** * Screen for configuring notification permissions during the app introduction. It explains why notification permissions @@ -58,25 +57,24 @@ internal fun NotificationsScreen(showNextButton: Boolean, onSkip: () -> Unit, on tag = SETTINGS_TAG, ) - val features = remember { + val features = listOf( FeatureUIData( - icon = Icons.AutoMirrored.Outlined.Message, + icon = MeshtasticIcons.Message, titleRes = Res.string.incoming_messages, subtitleRes = Res.string.notifications_for_channel_and_direct_messages, ), FeatureUIData( - icon = Icons.Outlined.SpeakerPhone, + icon = MeshtasticIcons.Speaker, titleRes = Res.string.new_nodes, subtitleRes = Res.string.notifications_for_newly_discovered_nodes, ), FeatureUIData( - icon = Icons.Outlined.BatteryAlert, + icon = MeshtasticIcons.BatteryAlert, titleRes = Res.string.low_battery, subtitleRes = Res.string.notifications_for_low_battery_alerts, ), ) - } PermissionScreenLayout( headlineRes = Res.string.app_notifications, diff --git a/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/WelcomeScreen.kt b/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/WelcomeScreen.kt index b9943974f..e5a7f6597 100644 --- a/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/WelcomeScreen.kt +++ b/feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/WelcomeScreen.kt @@ -23,15 +23,10 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.outlined.Hub -import androidx.compose.material.icons.outlined.NearMe -import androidx.compose.material.icons.outlined.SettingsInputAntenna import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.font.FontWeight @@ -49,6 +44,10 @@ import org.meshtastic.core.resources.meshtastic import org.meshtastic.core.resources.share_your_location_in_real_time import org.meshtastic.core.resources.stay_connected_anywhere import org.meshtastic.core.resources.track_and_share_locations +import org.meshtastic.core.ui.icon.Antenna +import org.meshtastic.core.ui.icon.MeshHub +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.NearMe import org.meshtastic.core.ui.util.LocalAnalyticsIntroProvider /** @@ -59,25 +58,24 @@ import org.meshtastic.core.ui.util.LocalAnalyticsIntroProvider @Composable internal fun WelcomeScreen(onGetStarted: () -> Unit) { val analyticsIntro = LocalAnalyticsIntroProvider.current - val features = remember { + val features = listOf( FeatureUIData( - icon = Icons.Outlined.SettingsInputAntenna, + icon = MeshtasticIcons.Antenna, titleRes = Res.string.stay_connected_anywhere, subtitleRes = Res.string.communicate_off_the_grid, ), FeatureUIData( - icon = Icons.Outlined.Hub, + icon = MeshtasticIcons.MeshHub, titleRes = Res.string.create_your_own_networks, subtitleRes = Res.string.easily_set_up_private_mesh_networks, ), FeatureUIData( - icon = Icons.Outlined.NearMe, + icon = MeshtasticIcons.NearMe, titleRes = Res.string.track_and_share_locations, subtitleRes = Res.string.share_your_location_in_real_time, ), ) - } Scaffold( bottomBar = { diff --git a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/Message.kt b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/Message.kt index 7be0b4027..d598f056b 100644 --- a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/Message.kt +++ b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/Message.kt @@ -35,8 +35,6 @@ import androidx.compose.foundation.text.input.TextFieldState import androidx.compose.foundation.text.input.clearText import androidx.compose.foundation.text.input.rememberTextFieldState import androidx.compose.foundation.text.input.setTextAndPlaceCursorAtEnd -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.Send import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -76,6 +74,8 @@ import org.meshtastic.core.resources.type_a_message import org.meshtastic.core.resources.unknown_channel import org.meshtastic.core.ui.component.SharedContactDialog import org.meshtastic.core.ui.component.smartScrollToIndex +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Send import org.meshtastic.core.ui.theme.AppTheme import org.meshtastic.core.ui.util.createClipEntry import org.meshtastic.feature.messaging.component.ActionModeTopBar @@ -483,10 +483,7 @@ private fun MessageInput( // cursor position and multi-byte characters, likely outside simple inputTransformation. trailingIcon = { IconButton(onClick = { if (canSend) onSendMessage() }, enabled = canSend) { - Icon( - imageVector = Icons.AutoMirrored.Default.Send, - contentDescription = stringResource(Res.string.send), - ) + Icon(imageVector = MeshtasticIcons.Send, contentDescription = stringResource(Res.string.send)) } }, ) diff --git a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/QuickChat.kt b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/QuickChat.kt index 02278d15b..4652664a3 100644 --- a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/QuickChat.kt +++ b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/QuickChat.kt @@ -31,11 +31,6 @@ import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Add -import androidx.compose.material.icons.rounded.DragHandle -import androidx.compose.material.icons.rounded.Edit -import androidx.compose.material.icons.rounded.FastForward import androidx.compose.material3.Card import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon @@ -80,6 +75,11 @@ import org.meshtastic.core.ui.component.MeshtasticDialog import org.meshtastic.core.ui.component.dragContainer import org.meshtastic.core.ui.component.dragDropItemsIndexed import org.meshtastic.core.ui.component.rememberDragDropState +import org.meshtastic.core.ui.icon.Add +import org.meshtastic.core.ui.icon.DragHandle +import org.meshtastic.core.ui.icon.Edit +import org.meshtastic.core.ui.icon.FastForward +import org.meshtastic.core.ui.icon.MeshtasticIcons @Composable fun QuickChatScreen(modifier: Modifier = Modifier, viewModel: QuickChatViewModel, onNavigateUp: () -> Unit) { @@ -135,7 +135,7 @@ fun QuickChatScreen(modifier: Modifier = Modifier, viewModel: QuickChatViewModel onClick = { showActionDialog = QuickChatAction(position = actions.size) }, modifier = Modifier.align(Alignment.BottomEnd).padding(16.dp), ) { - Icon(imageVector = Icons.Rounded.Add, contentDescription = stringResource(Res.string.add)) + Icon(imageVector = MeshtasticIcons.Add, contentDescription = stringResource(Res.string.add)) } } } @@ -215,9 +215,9 @@ internal fun EditQuickChatDialog( val (text, icon) = if (isInstant) { - Res.string.quick_chat_instant to Icons.Rounded.FastForward + Res.string.quick_chat_instant to MeshtasticIcons.FastForward } else { - Res.string.quick_chat_append to Icons.Rounded.Add + Res.string.quick_chat_append to MeshtasticIcons.Add } Row(verticalAlignment = Alignment.CenterVertically) { @@ -302,7 +302,7 @@ internal fun QuickChatItem( leadingContent = { if (action.mode == QuickChatAction.Mode.Instant) { Icon( - imageVector = Icons.Rounded.FastForward, + imageVector = MeshtasticIcons.FastForward, contentDescription = stringResource(Res.string.quick_chat_instant), ) } @@ -313,12 +313,12 @@ internal fun QuickChatItem( Row(verticalAlignment = Alignment.CenterVertically) { IconButton(onClick = { onEdit(action) }, modifier = Modifier.size(48.dp)) { Icon( - imageVector = Icons.Rounded.Edit, + imageVector = MeshtasticIcons.Edit, contentDescription = stringResource(Res.string.quick_chat_edit), ) } Icon( - imageVector = Icons.Rounded.DragHandle, + imageVector = MeshtasticIcons.DragHandle, contentDescription = stringResource(Res.string.quick_chat), ) } diff --git a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageActions.kt b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageActions.kt index b3ea63ca1..badac0f37 100644 --- a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageActions.kt +++ b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageActions.kt @@ -20,17 +20,6 @@ import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.Crossfade import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.wrapContentSize -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.Reply -import androidx.compose.material.icons.rounded.AddReaction -import androidx.compose.material.icons.twotone.AddLink -import androidx.compose.material.icons.twotone.Cloud -import androidx.compose.material.icons.twotone.CloudDone -import androidx.compose.material.icons.twotone.CloudOff -import androidx.compose.material.icons.twotone.CloudUpload -import androidx.compose.material.icons.twotone.HowToReg -import androidx.compose.material.icons.twotone.Link -import androidx.compose.material.icons.twotone.Warning import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.runtime.Composable @@ -46,6 +35,17 @@ import org.meshtastic.core.resources.message_delivery_status import org.meshtastic.core.resources.react import org.meshtastic.core.resources.reply import org.meshtastic.core.ui.emoji.EmojiPickerDialog +import org.meshtastic.core.ui.icon.Acknowledged +import org.meshtastic.core.ui.icon.AddLink +import org.meshtastic.core.ui.icon.AddReaction +import org.meshtastic.core.ui.icon.CloudUpload +import org.meshtastic.core.ui.icon.LinkIcon +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.MessageEnroute +import org.meshtastic.core.ui.icon.MessageError +import org.meshtastic.core.ui.icon.MqttDelivered +import org.meshtastic.core.ui.icon.Reply +import org.meshtastic.core.ui.icon.Warning @Composable internal fun ReactionButton(onSendReaction: (String) -> Unit = {}) { @@ -60,16 +60,14 @@ internal fun ReactionButton(onSendReaction: (String) -> Unit = {}) { ) } IconButton(onClick = { showEmojiPickerDialog = true }) { - Icon(imageVector = Icons.Rounded.AddReaction, contentDescription = stringResource(Res.string.react)) + Icon(imageVector = MeshtasticIcons.AddReaction, contentDescription = stringResource(Res.string.react)) } } @Composable private fun ReplyButton(onClick: () -> Unit = {}) = IconButton( onClick = onClick, - content = { - Icon(imageVector = Icons.AutoMirrored.Filled.Reply, contentDescription = stringResource(Res.string.reply)) - }, + content = { Icon(imageVector = MeshtasticIcons.Reply, contentDescription = stringResource(Res.string.reply)) }, ) @Composable @@ -80,14 +78,14 @@ internal fun MessageStatusButton(onStatusClick: () -> Unit = {}, status: Message Icon( imageVector = when (currentStatus) { - MessageStatus.RECEIVED -> Icons.TwoTone.HowToReg - MessageStatus.QUEUED -> Icons.TwoTone.CloudUpload - MessageStatus.DELIVERED -> Icons.TwoTone.CloudDone - MessageStatus.SFPP_ROUTING -> Icons.TwoTone.AddLink - MessageStatus.SFPP_CONFIRMED -> Icons.TwoTone.Link - MessageStatus.ENROUTE -> Icons.TwoTone.Cloud - MessageStatus.ERROR -> Icons.TwoTone.CloudOff - else -> Icons.TwoTone.Warning + MessageStatus.RECEIVED -> MeshtasticIcons.Acknowledged + MessageStatus.QUEUED -> MeshtasticIcons.CloudUpload + MessageStatus.DELIVERED -> MeshtasticIcons.MqttDelivered + MessageStatus.SFPP_ROUTING -> MeshtasticIcons.AddLink + MessageStatus.SFPP_CONFIRMED -> MeshtasticIcons.LinkIcon + MessageStatus.ENROUTE -> MeshtasticIcons.MessageEnroute + MessageStatus.ERROR -> MeshtasticIcons.MessageError + else -> MeshtasticIcons.Warning }, contentDescription = stringResource(Res.string.message_delivery_status), ) diff --git a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageActionsBottomSheet.kt b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageActionsBottomSheet.kt index b89a88984..380b913a5 100644 --- a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageActionsBottomSheet.kt +++ b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageActionsBottomSheet.kt @@ -26,12 +26,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.CircleShape -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.rounded.Reply -import androidx.compose.material.icons.rounded.AddReaction -import androidx.compose.material.icons.rounded.ContentCopy -import androidx.compose.material.icons.rounded.Delete -import androidx.compose.material.icons.rounded.SelectAll import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.IconButton @@ -55,6 +49,12 @@ import org.meshtastic.core.resources.message_delivery_status import org.meshtastic.core.resources.more_reactions import org.meshtastic.core.resources.reply import org.meshtastic.core.resources.select +import org.meshtastic.core.ui.icon.AddReaction +import org.meshtastic.core.ui.icon.Copy +import org.meshtastic.core.ui.icon.Delete +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Reply +import org.meshtastic.core.ui.icon.SelectAll @Composable fun MessageActionsContent( @@ -90,27 +90,27 @@ fun MessageActionsContent( ListItem( headlineContent = { Text(stringResource(Res.string.reply)) }, - leadingContent = { - Icon(Icons.AutoMirrored.Rounded.Reply, contentDescription = stringResource(Res.string.reply)) - }, + leadingContent = { Icon(MeshtasticIcons.Reply, contentDescription = stringResource(Res.string.reply)) }, modifier = Modifier.clickable(onClick = onReply), ) ListItem( headlineContent = { Text(stringResource(Res.string.copy)) }, - leadingContent = { Icon(Icons.Rounded.ContentCopy, contentDescription = stringResource(Res.string.copy)) }, + leadingContent = { Icon(MeshtasticIcons.Copy, contentDescription = stringResource(Res.string.copy)) }, modifier = Modifier.clickable(onClick = onCopy), ) ListItem( headlineContent = { Text(stringResource(Res.string.select)) }, - leadingContent = { Icon(Icons.Rounded.SelectAll, contentDescription = stringResource(Res.string.select)) }, + leadingContent = { + Icon(MeshtasticIcons.SelectAll, contentDescription = stringResource(Res.string.select)) + }, modifier = Modifier.clickable(onClick = onSelect), ) ListItem( headlineContent = { Text(stringResource(Res.string.delete)) }, - leadingContent = { Icon(Icons.Rounded.Delete, contentDescription = stringResource(Res.string.delete)) }, + leadingContent = { Icon(MeshtasticIcons.Delete, contentDescription = stringResource(Res.string.delete)) }, modifier = Modifier.clickable(onClick = onDelete), ) } @@ -143,7 +143,7 @@ private fun QuickEmojiRow(quickEmojis: List, onReact: (String) -> Unit, modifier = Modifier.size(40.dp).background(MaterialTheme.colorScheme.surfaceVariant, CircleShape), ) { Icon( - Icons.Rounded.AddReaction, + MeshtasticIcons.AddReaction, contentDescription = stringResource(Res.string.more_reactions), modifier = Modifier.size(20.dp), tint = MaterialTheme.colorScheme.onSurfaceVariant, diff --git a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageItem.kt b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageItem.kt index 261fb0948..586b91dd6 100644 --- a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageItem.kt +++ b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageItem.kt @@ -29,8 +29,6 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.FormatQuote import androidx.compose.material3.CardDefaults import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon @@ -71,7 +69,8 @@ import org.meshtastic.core.ui.component.Rssi import org.meshtastic.core.ui.component.Snr import org.meshtastic.core.ui.component.TransportIcon import org.meshtastic.core.ui.emoji.EmojiPickerDialog -import org.meshtastic.core.ui.icon.Hops +import org.meshtastic.core.ui.icon.FormatQuote +import org.meshtastic.core.ui.icon.HopCount import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.theme.MessageItemColors import org.meshtastic.core.ui.util.createClipEntry @@ -279,7 +278,7 @@ fun MessageItem( horizontalArrangement = Arrangement.spacedBy(2.dp), ) { Icon( - imageVector = MeshtasticIcons.Hops, + imageVector = MeshtasticIcons.HopCount, contentDescription = null, modifier = Modifier.size(14.dp), tint = cardColors.contentColor.copy(alpha = 0.7f), @@ -388,7 +387,7 @@ private fun OriginalMessageSnippet( horizontalArrangement = Arrangement.spacedBy(4.dp), ) { Icon( - Icons.Rounded.FormatQuote, + MeshtasticIcons.FormatQuote, contentDescription = stringResource(Res.string.reply), modifier = Modifier.size(16.dp), ) diff --git a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageScreenComponents.kt b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageScreenComponents.kt index 456df7eb2..dc502ef4f 100644 --- a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageScreenComponents.kt +++ b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageScreenComponents.kt @@ -32,23 +32,6 @@ import androidx.compose.foundation.lazy.LazyListState import androidx.compose.foundation.lazy.LazyRow import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.ArrowBack -import androidx.compose.material.icons.automirrored.filled.Reply -import androidx.compose.material.icons.automirrored.filled.Send -import androidx.compose.material.icons.automirrored.rounded.SpeakerNotes -import androidx.compose.material.icons.filled.Close -import androidx.compose.material.icons.rounded.ArrowDownward -import androidx.compose.material.icons.rounded.ChatBubbleOutline -import androidx.compose.material.icons.rounded.ContentCopy -import androidx.compose.material.icons.rounded.Delete -import androidx.compose.material.icons.rounded.FilterList -import androidx.compose.material.icons.rounded.FilterListOff -import androidx.compose.material.icons.rounded.MoreVert -import androidx.compose.material.icons.rounded.SelectAll -import androidx.compose.material.icons.rounded.SpeakerNotesOff -import androidx.compose.material.icons.rounded.Visibility -import androidx.compose.material.icons.rounded.VisibilityOff import androidx.compose.material3.Badge import androidx.compose.material3.BadgedBox import androidx.compose.material3.Button @@ -112,8 +95,24 @@ import org.meshtastic.core.ui.component.EmptyDetailPlaceholder import org.meshtastic.core.ui.component.MeshtasticTextDialog import org.meshtastic.core.ui.component.NodeKeyStatusIcon import org.meshtastic.core.ui.component.SecurityIcon +import org.meshtastic.core.ui.icon.ArrowBack +import org.meshtastic.core.ui.icon.ArrowDownward +import org.meshtastic.core.ui.icon.ChatBubbleOutline +import org.meshtastic.core.ui.icon.Close import org.meshtastic.core.ui.icon.Conversations +import org.meshtastic.core.ui.icon.Copy +import org.meshtastic.core.ui.icon.Delete +import org.meshtastic.core.ui.icon.FilterList +import org.meshtastic.core.ui.icon.FilterListOff import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.More +import org.meshtastic.core.ui.icon.Muted +import org.meshtastic.core.ui.icon.Reply +import org.meshtastic.core.ui.icon.SelectAll +import org.meshtastic.core.ui.icon.Send +import org.meshtastic.core.ui.icon.Unmuted +import org.meshtastic.core.ui.icon.Visibility +import org.meshtastic.core.ui.icon.VisibilityOff import org.meshtastic.feature.messaging.DeliveryInfo import org.meshtastic.proto.ChannelSet @@ -136,13 +135,13 @@ fun BoxScope.ScrollToBottomFab(coroutineScope: CoroutineScope, listState: LazyLi if (unreadCount > 0) { BadgedBox(badge = { Badge { Text(unreadCount.toString()) } }) { Icon( - imageVector = Icons.Rounded.ArrowDownward, + imageVector = MeshtasticIcons.ArrowDownward, contentDescription = stringResource(Res.string.scroll_to_bottom), ) } } else { Icon( - imageVector = Icons.Rounded.ArrowDownward, + imageVector = MeshtasticIcons.ArrowDownward, contentDescription = stringResource(Res.string.scroll_to_bottom), ) } @@ -178,7 +177,7 @@ fun ReplySnippet(originalMessage: Message?, onClearReply: () -> Unit, ourNode: N horizontalArrangement = Arrangement.spacedBy(4.dp), ) { Icon( - imageVector = Icons.AutoMirrored.Default.Reply, + imageVector = MeshtasticIcons.Reply, contentDescription = stringResource(Res.string.reply), tint = MaterialTheme.colorScheme.onSurfaceVariant, ) @@ -194,7 +193,7 @@ fun ReplySnippet(originalMessage: Message?, onClearReply: () -> Unit, ourNode: N overflow = TextOverflow.Ellipsis, ) IconButton(onClick = onClearReply) { - Icon(Icons.Filled.Close, contentDescription = stringResource(Res.string.cancel_reply)) + Icon(MeshtasticIcons.Close, contentDescription = stringResource(Res.string.cancel_reply)) } } } @@ -253,20 +252,23 @@ fun ActionModeTopBar(selectedCount: Int, onAction: (MessageMenuAction) -> Unit) navigationIcon = { IconButton(onClick = { onAction(MessageMenuAction.Dismiss) }) { Icon( - imageVector = Icons.AutoMirrored.Filled.ArrowBack, + imageVector = MeshtasticIcons.ArrowBack, contentDescription = stringResource(Res.string.clear_selection), ) } }, actions = { IconButton(onClick = { onAction(MessageMenuAction.ClipboardCopy) }) { - Icon(imageVector = Icons.Rounded.ContentCopy, contentDescription = stringResource(Res.string.copy)) + Icon(imageVector = MeshtasticIcons.Copy, contentDescription = stringResource(Res.string.copy)) } IconButton(onClick = { onAction(MessageMenuAction.Delete) }) { - Icon(imageVector = Icons.Rounded.Delete, contentDescription = stringResource(Res.string.delete)) + Icon(imageVector = MeshtasticIcons.Delete, contentDescription = stringResource(Res.string.delete)) } IconButton(onClick = { onAction(MessageMenuAction.SelectAll) }) { - Icon(imageVector = Icons.Rounded.SelectAll, contentDescription = stringResource(Res.string.select_all)) + Icon( + imageVector = MeshtasticIcons.SelectAll, + contentDescription = stringResource(Res.string.select_all), + ) } }, ) @@ -316,7 +318,7 @@ fun MessageTopBar( navigationIcon = { IconButton(onClick = onNavigateBack) { Icon( - imageVector = Icons.AutoMirrored.Filled.ArrowBack, + imageVector = MeshtasticIcons.ArrowBack, contentDescription = stringResource(Res.string.navigate_back), ) } @@ -356,7 +358,7 @@ private fun MessageTopBarActions( var expanded by remember { mutableStateOf(false) } Box { IconButton(onClick = { expanded = true }, enabled = true) { - Icon(imageVector = Icons.Rounded.MoreVert, contentDescription = stringResource(Res.string.overflow_menu)) + Icon(imageVector = MeshtasticIcons.More, contentDescription = stringResource(Res.string.overflow_menu)) } OverFlowMenu( expanded = expanded, @@ -409,8 +411,7 @@ private fun QuickChatToggleMenuItem(showQuickChat: Boolean, onDismiss: () -> Uni }, leadingIcon = { Icon( - imageVector = - if (showQuickChat) Icons.Rounded.SpeakerNotesOff else Icons.AutoMirrored.Rounded.SpeakerNotes, + imageVector = if (showQuickChat) MeshtasticIcons.Muted else MeshtasticIcons.Unmuted, contentDescription = title, ) }, @@ -426,7 +427,7 @@ private fun QuickChatOptionsMenuItem(onDismiss: () -> Unit, onNavigate: () -> Un onDismiss() onNavigate() }, - leadingIcon = { Icon(imageVector = Icons.Rounded.ChatBubbleOutline, contentDescription = title) }, + leadingIcon = { Icon(imageVector = MeshtasticIcons.ChatBubbleOutline, contentDescription = title) }, ) } @@ -441,7 +442,7 @@ private fun FilteredMessagesMenuItem(showFiltered: Boolean, count: Int, onDismis }, leadingIcon = { Icon( - imageVector = if (showFiltered) Icons.Rounded.VisibilityOff else Icons.Rounded.Visibility, + imageVector = if (showFiltered) MeshtasticIcons.VisibilityOff else MeshtasticIcons.Visibility, contentDescription = title, ) }, @@ -462,7 +463,7 @@ private fun FilterToggleMenuItem(filteringDisabled: Boolean, onDismiss: () -> Un }, leadingIcon = { Icon( - imageVector = if (filteringDisabled) Icons.Rounded.FilterList else Icons.Rounded.FilterListOff, + imageVector = if (filteringDisabled) MeshtasticIcons.FilterList else MeshtasticIcons.FilterListOff, contentDescription = title, ) }, @@ -676,7 +677,7 @@ fun MessageInput( }, trailingIcon = { IconButton(onClick = { if (canSend) onSendMessage() }, enabled = canSend) { - Icon(imageVector = Icons.AutoMirrored.Filled.Send, contentDescription = stringResource(Res.string.send)) + Icon(imageVector = MeshtasticIcons.Send, contentDescription = stringResource(Res.string.send)) } }, ) diff --git a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageStatusIcon.kt b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageStatusIcon.kt index 329164f42..501a3f7dc 100644 --- a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageStatusIcon.kt +++ b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/MessageStatusIcon.kt @@ -24,11 +24,11 @@ import org.meshtastic.core.model.MessageStatus import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.message_delivery_status import org.meshtastic.core.ui.icon.Acknowledged -import org.meshtastic.core.ui.icon.CloudDone -import org.meshtastic.core.ui.icon.CloudOffTwoTone -import org.meshtastic.core.ui.icon.CloudSync -import org.meshtastic.core.ui.icon.CloudTwoTone import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.MessageEnroute +import org.meshtastic.core.ui.icon.MessageError +import org.meshtastic.core.ui.icon.MqttDelivered +import org.meshtastic.core.ui.icon.MqttSyncing import org.meshtastic.core.ui.icon.Warning @Composable @@ -36,12 +36,12 @@ fun MessageStatusIcon(status: MessageStatus, modifier: Modifier = Modifier) { val icon = when (status) { MessageStatus.RECEIVED -> MeshtasticIcons.Acknowledged - MessageStatus.QUEUED -> MeshtasticIcons.CloudSync - MessageStatus.DELIVERED -> MeshtasticIcons.CloudDone - MessageStatus.SFPP_ROUTING -> MeshtasticIcons.CloudSync - MessageStatus.SFPP_CONFIRMED -> MeshtasticIcons.CloudDone - MessageStatus.ENROUTE -> MeshtasticIcons.CloudTwoTone - MessageStatus.ERROR -> MeshtasticIcons.CloudOffTwoTone + MessageStatus.QUEUED -> MeshtasticIcons.MqttSyncing + MessageStatus.DELIVERED -> MeshtasticIcons.MqttDelivered + MessageStatus.SFPP_ROUTING -> MeshtasticIcons.MqttSyncing + MessageStatus.SFPP_CONFIRMED -> MeshtasticIcons.MqttDelivered + MessageStatus.ENROUTE -> MeshtasticIcons.MessageEnroute + MessageStatus.ERROR -> MeshtasticIcons.MessageError else -> MeshtasticIcons.Warning } Icon( diff --git a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/Reaction.kt b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/Reaction.kt index 6f7cba05d..6545083bb 100644 --- a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/Reaction.kt +++ b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/component/Reaction.kt @@ -34,8 +34,6 @@ import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.LazyRow import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.CircleShape -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.AddReaction import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -75,7 +73,8 @@ import org.meshtastic.core.ui.component.BottomSheetDialog import org.meshtastic.core.ui.component.Rssi import org.meshtastic.core.ui.component.Snr import org.meshtastic.core.ui.emoji.EmojiPickerDialog -import org.meshtastic.core.ui.icon.Hops +import org.meshtastic.core.ui.icon.AddReaction +import org.meshtastic.core.ui.icon.HopCount import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.feature.messaging.DeliveryInfo @@ -182,7 +181,7 @@ internal fun AddReactionButton(modifier: Modifier = Modifier, onSendReaction: (S border = BorderStroke(1.dp, MaterialTheme.colorScheme.outlineVariant.copy(alpha = 0.2f)), ) { Icon( - imageVector = Icons.Rounded.AddReaction, + imageVector = MeshtasticIcons.AddReaction, contentDescription = stringResource(Res.string.react), modifier = Modifier.padding(6.dp), tint = MaterialTheme.colorScheme.onSurfaceVariant, @@ -305,7 +304,7 @@ internal fun ReactionDialog( horizontalArrangement = Arrangement.spacedBy(2.dp), ) { Icon( - imageVector = MeshtasticIcons.Hops, + imageVector = MeshtasticIcons.HopCount, contentDescription = null, modifier = Modifier.size(14.dp), tint = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.7f), diff --git a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/ui/contact/ContactItem.kt b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/ui/contact/ContactItem.kt index 00f518f0d..f2f897551 100644 --- a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/ui/contact/ContactItem.kt +++ b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/ui/contact/ContactItem.kt @@ -31,8 +31,6 @@ import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.twotone.VolumeOff import androidx.compose.material3.AssistChip import androidx.compose.material3.AssistChipDefaults import androidx.compose.material3.Card @@ -53,6 +51,8 @@ import androidx.compose.ui.unit.dp import org.meshtastic.core.common.util.DateFormatter import org.meshtastic.core.model.Contact import org.meshtastic.core.ui.component.SecurityIcon +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.VolumeOff import org.meshtastic.proto.ChannelSet @Suppress("LongMethod") @@ -175,7 +175,7 @@ private fun ChatMetadata(contact: Contact, modifier: Modifier = Modifier) { AnimatedVisibility(visible = contact.isMuted) { Icon( modifier = Modifier.padding(start = 4.dp).size(20.dp), - imageVector = Icons.AutoMirrored.TwoTone.VolumeOff, + imageVector = MeshtasticIcons.VolumeOff, contentDescription = null, ) } diff --git a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/ui/contact/Contacts.kt b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/ui/contact/Contacts.kt index 6292f9ad9..e522ba0e2 100644 --- a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/ui/contact/Contacts.kt +++ b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/ui/contact/Contacts.kt @@ -102,8 +102,8 @@ import org.meshtastic.core.ui.icon.Delete import org.meshtastic.core.ui.icon.MarkChatRead import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.icon.SelectAll -import org.meshtastic.core.ui.icon.VolumeMuteTwoTone -import org.meshtastic.core.ui.icon.VolumeUpTwoTone +import org.meshtastic.core.ui.icon.VolumeMute +import org.meshtastic.core.ui.icon.VolumeUp import org.meshtastic.core.ui.qr.ScannedQrCodeDialog import org.meshtastic.core.ui.util.rememberShowToastResource import org.meshtastic.proto.ChannelSet @@ -455,9 +455,9 @@ private fun SelectionToolbar( Icon( imageVector = if (isAllMuted) { - MeshtasticIcons.VolumeUpTwoTone + MeshtasticIcons.VolumeUp } else { - MeshtasticIcons.VolumeMuteTwoTone + MeshtasticIcons.VolumeMute }, contentDescription = if (isAllMuted) { diff --git a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/ui/sharing/Share.kt b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/ui/sharing/Share.kt index 7e896a86e..e02513fd5 100644 --- a/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/ui/sharing/Share.kt +++ b/feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/ui/sharing/Share.kt @@ -22,8 +22,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.itemsIndexed -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.Send import androidx.compose.material3.Button import androidx.compose.material3.Icon import androidx.compose.material3.Scaffold @@ -42,6 +40,8 @@ import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.share import org.meshtastic.core.resources.share_to import org.meshtastic.core.ui.component.MainAppBar +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Send import org.meshtastic.feature.messaging.ui.contact.ContactItem import org.meshtastic.feature.messaging.ui.contact.ContactsViewModel @@ -90,10 +90,7 @@ fun ShareScreen(contacts: List, onConfirm: (String) -> Unit, onNavigate modifier = Modifier.fillMaxWidth().padding(24.dp), enabled = selectedContact.isNotEmpty(), ) { - Icon( - imageVector = Icons.AutoMirrored.Default.Send, - contentDescription = stringResource(Res.string.share), - ) + Icon(imageVector = MeshtasticIcons.Send, contentDescription = stringResource(Res.string.share)) } } } diff --git a/feature/node/component/DeviceActions.kt b/feature/node/component/DeviceActions.kt index 103558c7e..7f652cca6 100644 --- a/feature/node/component/DeviceActions.kt +++ b/feature/node/component/DeviceActions.kt @@ -24,15 +24,15 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.Message -import androidx.compose.material.icons.automirrored.filled.VolumeOff -import androidx.compose.material.icons.automirrored.filled.VolumeUp -import androidx.compose.material.icons.automirrored.outlined.VolumeMute -import androidx.compose.material.icons.filled.Star -import androidx.compose.material.icons.filled.StarBorder -import androidx.compose.material.icons.rounded.Delete -import androidx.compose.material.icons.rounded.QrCode2 +import org.meshtastic.core.ui.icon.Delete +import org.meshtastic.core.ui.icon.Favorite +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Message +import org.meshtastic.core.ui.icon.NotFavorite +import org.meshtastic.core.ui.icon.QrCode2 +import org.meshtastic.core.ui.icon.VolumeMute +import org.meshtastic.core.ui.icon.VolumeOff +import org.meshtastic.core.ui.icon.VolumeUp import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.CardDefaults @@ -190,7 +190,7 @@ private fun PrimaryActionsRow( contentColor = MaterialTheme.colorScheme.onPrimaryContainer, ), ) { - Icon(Icons.AutoMirrored.Filled.Message, contentDescription = null) + Icon(MeshtasticIcons.Message, contentDescription = null) Spacer(Modifier.width(8.dp)) Text(stringResource(Res.string.direct_message)) } @@ -201,7 +201,7 @@ private fun PrimaryActionsRow( modifier = if (node.isEffectivelyUnmessageable || isLocal) Modifier.weight(1f) else Modifier, shape = MaterialTheme.shapes.large, ) { - Icon(Icons.Rounded.QrCode2, contentDescription = null) + Icon(MeshtasticIcons.QrCode2, contentDescription = null) if (node.isEffectivelyUnmessageable || isLocal) { Spacer(Modifier.width(8.dp)) Text(stringResource(Res.string.share_contact)) @@ -210,7 +210,7 @@ private fun PrimaryActionsRow( IconToggleButton(checked = node.isFavorite, onCheckedChange = { onFavoriteClick() }) { Icon( - imageVector = if (node.isFavorite) Icons.Rounded.Star else Icons.Rounded.StarBorder, + imageVector = if (node.isFavorite) MeshtasticIcons.Favorite else MeshtasticIcons.NotFavorite, contentDescription = stringResource(Res.string.favorite), tint = if (node.isFavorite) Color.Yellow else LocalContentColor.current, ) @@ -230,9 +230,9 @@ private fun ManagementActions( text = stringResource(Res.string.ignore), leadingIcon = if (node.isIgnored) { - Icons.AutoMirrored.Outlined.VolumeMute + MeshtasticIcons.VolumeMute } else { - Icons.AutoMirrored.Default.VolumeUp + MeshtasticIcons.VolumeUp }, checked = node.isIgnored, onClick = onIgnoreClick, @@ -241,9 +241,9 @@ private fun ManagementActions( SwitchListItem( text = stringResource(if (node.isMuted) Res.string.unmute else Res.string.mute_always), leadingIcon = if (node.isMuted) { - Icons.AutoMirrored.Filled.VolumeOff + MeshtasticIcons.VolumeOff } else { - Icons.AutoMirrored.Default.VolumeUp + MeshtasticIcons.VolumeUp }, checked = node.isMuted, onClick = onMuteClick, @@ -251,7 +251,7 @@ private fun ManagementActions( ListItem( text = stringResource(Res.string.remove), - leadingIcon = Icons.Rounded.Delete, + leadingIcon = MeshtasticIcons.Delete, trailingIcon = null, textColor = MaterialTheme.colorScheme.error, leadingIconTint = MaterialTheme.colorScheme.error, diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/AdministrationSection.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/AdministrationSection.kt index f127076d3..5cd461210 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/AdministrationSection.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/AdministrationSection.kt @@ -17,11 +17,6 @@ package org.meshtastic.feature.node.component import androidx.compose.foundation.layout.Column -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.ForkLeft -import androidx.compose.material.icons.rounded.Icecream -import androidx.compose.material.icons.rounded.Memory -import androidx.compose.material.icons.rounded.Settings import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -43,6 +38,11 @@ import org.meshtastic.core.resources.latest_stable_firmware import org.meshtastic.core.resources.remote_admin import org.meshtastic.core.resources.request_metadata import org.meshtastic.core.ui.component.ListItem +import org.meshtastic.core.ui.icon.ForkLeft +import org.meshtastic.core.ui.icon.Icecream +import org.meshtastic.core.ui.icon.Memory +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Settings import org.meshtastic.core.ui.theme.StatusColors.StatusGreen import org.meshtastic.core.ui.theme.StatusColors.StatusOrange import org.meshtastic.core.ui.theme.StatusColors.StatusRed @@ -63,7 +63,7 @@ fun AdministrationSection( Column { ListItem( text = stringResource(Res.string.request_metadata), - leadingIcon = Icons.Rounded.Memory, + leadingIcon = MeshtasticIcons.Memory, trailingIcon = null, onClick = { onAction(NodeDetailAction.TriggerServiceAction(ServiceAction.GetDeviceMetadata(node.num))) @@ -74,7 +74,7 @@ fun AdministrationSection( ListItem( text = stringResource(Res.string.remote_admin), - leadingIcon = Icons.Rounded.Settings, + leadingIcon = MeshtasticIcons.Settings, enabled = metricsState.isLocal || node.metadata != null, ) { onAction(NodeDetailAction.Navigate(SettingsRoutes.Settings(node.num))) @@ -101,8 +101,8 @@ private fun FirmwareSection( firmwareEdition?.let { edition -> val icon = when (edition) { - FirmwareEdition.VANILLA -> Icons.Rounded.Icecream - else -> Icons.Rounded.ForkLeft + FirmwareEdition.VANILLA -> MeshtasticIcons.Icecream + else -> MeshtasticIcons.ForkLeft } ListItem( @@ -138,7 +138,7 @@ private fun FirmwareVersionItems( ListItem( text = stringResource(Res.string.installed_firmware_version), - leadingIcon = Icons.Rounded.Memory, + leadingIcon = MeshtasticIcons.Memory, supportingText = version.substringBeforeLast("."), copyable = true, leadingIconTint = statusColor, @@ -149,7 +149,7 @@ private fun FirmwareVersionItems( ListItem( text = stringResource(Res.string.latest_stable_firmware), - leadingIcon = Icons.Rounded.Memory, + leadingIcon = MeshtasticIcons.Memory, supportingText = latestStable.id.substringBeforeLast(".").replace("v", ""), copyable = true, leadingIconTint = MaterialTheme.colorScheme.StatusGreen, @@ -161,7 +161,7 @@ private fun FirmwareVersionItems( ListItem( text = stringResource(Res.string.latest_alpha_firmware), - leadingIcon = Icons.Rounded.Memory, + leadingIcon = MeshtasticIcons.Memory, supportingText = latestAlpha.id.substringBeforeLast(".").replace("v", ""), copyable = true, leadingIconTint = MaterialTheme.colorScheme.StatusYellow, diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/ChannelInfo.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/ChannelInfo.kt index cfaa5943a..101e43ff3 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/ChannelInfo.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/ChannelInfo.kt @@ -16,8 +16,6 @@ */ package org.meshtastic.feature.node.component -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Tsunami import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -25,6 +23,8 @@ import androidx.compose.ui.graphics.Color import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.channel_label +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Tsunami @Composable fun ChannelInfo( @@ -34,7 +34,7 @@ fun ChannelInfo( ) { IconInfo( modifier = modifier, - icon = Icons.Rounded.Tsunami, + icon = MeshtasticIcons.Tsunami, contentDescription = stringResource(Res.string.channel_label), text = channel.toString(), contentColor = contentColor, diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/CompassBottomSheet.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/CompassBottomSheet.kt index 7b42dd374..59e99b7b1 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/CompassBottomSheet.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/CompassBottomSheet.kt @@ -25,9 +25,6 @@ import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.ErrorOutline -import androidx.compose.material.icons.rounded.GpsFixed import androidx.compose.material3.Button import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -70,6 +67,9 @@ import org.meshtastic.core.resources.compass_uncertainty_unknown import org.meshtastic.core.resources.elevation_suffix import org.meshtastic.core.resources.exchange_position import org.meshtastic.core.resources.last_position_update +import org.meshtastic.core.ui.icon.ErrorOutline +import org.meshtastic.core.ui.icon.GpsFixed +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.feature.node.compass.CompassUiState import org.meshtastic.feature.node.compass.CompassWarning import kotlin.math.PI @@ -152,7 +152,7 @@ fun CompassSheetContent( ) // Quick way to re-request a fresh fix without leaving the compass sheet Button(onClick = onRequestPosition, modifier = Modifier.fillMaxWidth()) { - Icon(imageVector = Icons.Rounded.GpsFixed, contentDescription = null) + Icon(imageVector = MeshtasticIcons.GpsFixed, contentDescription = null) Spacer(modifier = Modifier.width(8.dp)) Text(text = stringResource(Res.string.exchange_position)) } @@ -189,7 +189,7 @@ private fun WarningList( horizontalArrangement = Arrangement.spacedBy(12.dp), ) { Icon( - imageVector = Icons.Rounded.ErrorOutline, + imageVector = MeshtasticIcons.ErrorOutline, contentDescription = null, tint = MaterialTheme.colorScheme.onErrorContainer, ) @@ -204,13 +204,13 @@ private fun WarningList( if (warnings.contains(CompassWarning.NO_LOCATION_PERMISSION)) { Button(onClick = onRequestPermission, modifier = Modifier.fillMaxWidth()) { - Icon(imageVector = Icons.Rounded.GpsFixed, contentDescription = null) + Icon(imageVector = MeshtasticIcons.GpsFixed, contentDescription = null) Spacer(modifier = Modifier.width(8.dp)) Text(text = stringResource(Res.string.compass_no_location_permission)) } } else if (warnings.contains(CompassWarning.LOCATION_DISABLED)) { Button(onClick = onOpenLocationSettings, modifier = Modifier.fillMaxWidth()) { - Icon(imageVector = Icons.Rounded.GpsFixed, contentDescription = null) + Icon(imageVector = MeshtasticIcons.GpsFixed, contentDescription = null) Spacer(modifier = Modifier.width(8.dp)) Text(text = stringResource(Res.string.compass_location_disabled)) } diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/DeviceActions.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/DeviceActions.kt index db10ed175..26164c77b 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/DeviceActions.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/DeviceActions.kt @@ -23,15 +23,6 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.Message -import androidx.compose.material.icons.automirrored.filled.VolumeOff -import androidx.compose.material.icons.automirrored.filled.VolumeUp -import androidx.compose.material.icons.automirrored.outlined.VolumeMute -import androidx.compose.material.icons.rounded.Delete -import androidx.compose.material.icons.rounded.QrCode2 -import androidx.compose.material.icons.rounded.Star -import androidx.compose.material.icons.rounded.StarBorder import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Icon @@ -57,6 +48,15 @@ import org.meshtastic.core.resources.remove import org.meshtastic.core.resources.share_contact import org.meshtastic.core.ui.component.ListItem import org.meshtastic.core.ui.component.SwitchListItem +import org.meshtastic.core.ui.icon.Delete +import org.meshtastic.core.ui.icon.Favorite +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Message +import org.meshtastic.core.ui.icon.NotFavorite +import org.meshtastic.core.ui.icon.QrCode2 +import org.meshtastic.core.ui.icon.VolumeMute +import org.meshtastic.core.ui.icon.VolumeOff +import org.meshtastic.core.ui.icon.VolumeUp import org.meshtastic.feature.node.model.LogsType import org.meshtastic.feature.node.model.MetricsState import org.meshtastic.feature.node.model.NodeDetailAction @@ -113,7 +113,7 @@ private fun PrimaryActionsRow(node: Node, isLocal: Boolean, onAction: (NodeDetai contentColor = MaterialTheme.colorScheme.onPrimaryContainer, ), ) { - Icon(Icons.AutoMirrored.Filled.Message, contentDescription = null) + Icon(MeshtasticIcons.Message, contentDescription = null) Spacer(Modifier.width(8.dp)) Text(stringResource(Res.string.direct_message)) } @@ -124,7 +124,7 @@ private fun PrimaryActionsRow(node: Node, isLocal: Boolean, onAction: (NodeDetai modifier = if (node.isEffectivelyUnmessageable || isLocal) Modifier.weight(1f) else Modifier, shape = MaterialTheme.shapes.large, ) { - Icon(Icons.Rounded.QrCode2, contentDescription = null) + Icon(MeshtasticIcons.QrCode2, contentDescription = null) if (node.isEffectivelyUnmessageable || isLocal) { Spacer(Modifier.width(8.dp)) Text(stringResource(Res.string.share_contact)) @@ -137,7 +137,7 @@ private fun PrimaryActionsRow(node: Node, isLocal: Boolean, onAction: (NodeDetai onCheckedChange = { onAction(NodeDetailAction.HandleNodeMenuAction(NodeMenuAction.Favorite(node))) }, ) { Icon( - imageVector = if (node.isFavorite) Icons.Rounded.Star else Icons.Rounded.StarBorder, + imageVector = if (node.isFavorite) MeshtasticIcons.Favorite else MeshtasticIcons.NotFavorite, contentDescription = stringResource(Res.string.favorite), tint = if (node.isFavorite) Color.Yellow else LocalContentColor.current, ) @@ -153,9 +153,9 @@ private fun ManagementActions(node: Node, onAction: (NodeDetailAction) -> Unit) text = stringResource(Res.string.ignore), leadingIcon = if (node.isIgnored) { - Icons.AutoMirrored.Outlined.VolumeMute + MeshtasticIcons.VolumeMute } else { - Icons.AutoMirrored.Default.VolumeUp + MeshtasticIcons.VolumeUp }, checked = node.isIgnored, onClick = { onAction(NodeDetailAction.HandleNodeMenuAction(NodeMenuAction.Ignore(node))) }, @@ -166,9 +166,9 @@ private fun ManagementActions(node: Node, onAction: (NodeDetailAction) -> Unit) text = stringResource(Res.string.mute_notifications), leadingIcon = if (node.isMuted) { - Icons.AutoMirrored.Filled.VolumeOff + MeshtasticIcons.VolumeOff } else { - Icons.AutoMirrored.Default.VolumeUp + MeshtasticIcons.VolumeUp }, checked = node.isMuted, onClick = { onAction(NodeDetailAction.HandleNodeMenuAction(NodeMenuAction.Mute(node))) }, @@ -177,7 +177,7 @@ private fun ManagementActions(node: Node, onAction: (NodeDetailAction) -> Unit) ListItem( text = stringResource(Res.string.remove), - leadingIcon = Icons.Rounded.Delete, + leadingIcon = MeshtasticIcons.Delete, trailingIcon = null, textColor = MaterialTheme.colorScheme.error, leadingIconTint = MaterialTheme.colorScheme.error, diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/DeviceDetailsSection.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/DeviceDetailsSection.kt index b73f9f476..cd834d1a5 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/DeviceDetailsSection.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/DeviceDetailsSection.kt @@ -27,9 +27,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.text.selection.SelectionContainer -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Router -import androidx.compose.material.icons.twotone.Verified import androidx.compose.material3.MaterialTheme.colorScheme import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment @@ -51,6 +48,9 @@ import org.meshtastic.core.resources.img_hw_unknown import org.meshtastic.core.resources.supported import org.meshtastic.core.resources.supported_by_community import org.meshtastic.core.ui.component.ListItem +import org.meshtastic.core.ui.icon.HardwareModel +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Verified import org.meshtastic.core.ui.theme.StatusColors.StatusGreen import org.meshtastic.core.ui.theme.StatusColors.StatusRed import org.meshtastic.feature.node.model.MetricsState @@ -78,7 +78,7 @@ fun DeviceDetailsSection(state: MetricsState, modifier: Modifier = Modifier) { ?: deviceHardware.displayName ListItem( text = stringResource(Res.string.hardware), - leadingIcon = Icons.Rounded.Router, + leadingIcon = MeshtasticIcons.HardwareModel, supportingText = deviceText, copyable = true, trailingIcon = null, @@ -116,7 +116,7 @@ private fun SupportStatusItem(isSupported: Boolean) { }, leadingIcon = if (isSupported) { - Icons.TwoTone.Verified + MeshtasticIcons.Verified } else { org.jetbrains.compose.resources.vectorResource(org.meshtastic.core.resources.Res.drawable.ic_unverified) }, diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/DistanceInfo.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/DistanceInfo.kt index cf42eefe9..f8bf4e1e7 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/DistanceInfo.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/DistanceInfo.kt @@ -16,8 +16,6 @@ */ package org.meshtastic.feature.node.component -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.SocialDistance import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -25,6 +23,8 @@ import androidx.compose.ui.graphics.Color import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.distance +import org.meshtastic.core.ui.icon.Distance +import org.meshtastic.core.ui.icon.MeshtasticIcons @Composable fun DistanceInfo( @@ -34,7 +34,7 @@ fun DistanceInfo( ) { IconInfo( modifier = modifier, - icon = Icons.Rounded.SocialDistance, + icon = MeshtasticIcons.Distance, contentDescription = stringResource(Res.string.distance), label = stringResource(Res.string.distance), text = distance, diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/EnvironmentMetrics.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/EnvironmentMetrics.kt index 1229900c8..aa44a6b7e 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/EnvironmentMetrics.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/EnvironmentMetrics.kt @@ -19,20 +19,7 @@ package org.meshtastic.feature.node.component import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.FlowRow import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.outlined.Navigation -import androidx.compose.material.icons.rounded.Air -import androidx.compose.material.icons.rounded.BlurOn -import androidx.compose.material.icons.rounded.Bolt -import androidx.compose.material.icons.rounded.Height -import androidx.compose.material.icons.rounded.LightMode -import androidx.compose.material.icons.rounded.Power -import androidx.compose.material.icons.rounded.Scale -import androidx.compose.material.icons.rounded.Speed -import androidx.compose.material.icons.rounded.Thermostat -import androidx.compose.material.icons.rounded.WaterDrop import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.common.util.NumberFormatter @@ -62,6 +49,18 @@ import org.meshtastic.core.resources.uv_lux import org.meshtastic.core.resources.voltage import org.meshtastic.core.resources.weight import org.meshtastic.core.resources.wind +import org.meshtastic.core.ui.icon.AirQuality +import org.meshtastic.core.ui.icon.Altitude +import org.meshtastic.core.ui.icon.Humidity +import org.meshtastic.core.ui.icon.LightMode +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Particulate +import org.meshtastic.core.ui.icon.PowerSupply +import org.meshtastic.core.ui.icon.Pressure +import org.meshtastic.core.ui.icon.Temperature +import org.meshtastic.core.ui.icon.Voltage +import org.meshtastic.core.ui.icon.Weight +import org.meshtastic.core.ui.icon.WindDirection import org.meshtastic.feature.node.model.DrawableMetricInfo import org.meshtastic.feature.node.model.VectorMetricInfo import org.meshtastic.proto.Config @@ -73,153 +72,158 @@ internal fun EnvironmentMetrics( displayUnits: Config.DisplayConfig.DisplayUnits, isFahrenheit: Boolean = false, ) { - val vectorMetrics = - remember(node.environmentMetrics, isFahrenheit, displayUnits) { - buildList { - with(node.environmentMetrics) { - temperature?.let { temp -> - if (!temp.isNaN()) { - add( - VectorMetricInfo( - label = Res.string.temperature, - value = temp.toTempString(isFahrenheit), - icon = Icons.Rounded.Thermostat, - ), - ) - } - } - relative_humidity?.let { rh -> - add( - VectorMetricInfo( - Res.string.humidity, - "${NumberFormatter.format(rh, 0)}%", - Icons.Rounded.WaterDrop, - ), - ) - } - barometric_pressure?.let { bp -> - add( - VectorMetricInfo( - Res.string.pressure, - "${NumberFormatter.format(bp, 0)} hPa", - Icons.Rounded.Speed, - ), - ) - } - gas_resistance?.let { gr -> - add( - VectorMetricInfo( - label = Res.string.gas_resistance, - value = "${NumberFormatter.format(gr, 0)} MΩ", - icon = Icons.Rounded.BlurOn, - ), - ) - } - voltage?.let { v -> - add( - VectorMetricInfo( - label = Res.string.voltage, - value = "${NumberFormatter.format(v, 2)}V", - icon = Icons.Rounded.Bolt, - ), - ) - } - current?.let { c -> - add( - VectorMetricInfo( - label = Res.string.current, - value = "${NumberFormatter.format(c, 1)}mA", - icon = Icons.Rounded.Power, - ), - ) - } - iaq?.let { i -> add(VectorMetricInfo(Res.string.iaq, i.toString(), Icons.Rounded.Air)) } - distance?.let { d -> - add( - VectorMetricInfo( - label = Res.string.distance, - value = d.toSmallDistanceString(displayUnits), - icon = Icons.Rounded.Height, - ), - ) - } - lux?.let { l -> - add( - VectorMetricInfo( - label = Res.string.lux, - value = "${NumberFormatter.format(l, 0)} lx", - icon = Icons.Rounded.LightMode, - ), - ) - } - uv_lux?.let { uvl -> - add( - VectorMetricInfo( - label = Res.string.uv_lux, - value = "${NumberFormatter.format(uvl, 0)} lx", - icon = Icons.Rounded.LightMode, - ), - ) - } - wind_speed?.let { ws -> - @Suppress("MagicNumber") - val normalizedBearing = ((wind_direction ?: 0) + 180) % 360 - add( - VectorMetricInfo( - label = Res.string.wind, - value = ws.toSpeedString(displayUnits), - icon = Icons.Outlined.Navigation, - rotateIcon = normalizedBearing.toFloat(), - ), - ) - } - weight?.let { w -> - add( - VectorMetricInfo( - label = Res.string.weight, - value = "${NumberFormatter.format(w, 2)} kg", - icon = Icons.Rounded.Scale, - ), - ) - } - if (temperature != null && relative_humidity != null) { - val dewPoint = UnitConversions.calculateDewPoint(temperature!!, relative_humidity!!) - if (!dewPoint.isNaN()) { - add( - DrawableMetricInfo( - label = Res.string.dew_point, - value = dewPoint.toTempString(isFahrenheit), - icon = Res.drawable.ic_dew_point, - ), - ) - } - } - soil_temperature?.let { st -> - if (!st.isNaN()) { - add( - DrawableMetricInfo( - label = Res.string.soil_temperature, - value = st.toTempString(isFahrenheit), - icon = Res.drawable.ic_soil_temperature, - ), - ) - } - } - soil_moisture?.let { sm -> - add(DrawableMetricInfo(Res.string.soil_moisture, "$sm%", Res.drawable.ic_soil_moisture)) - } - radiation?.let { r -> - add( - DrawableMetricInfo( - label = Res.string.radiation, - value = "${NumberFormatter.format(r, 1)} µR/h", - icon = Res.drawable.ic_radioactive, - ), - ) - } + val vectorMetrics = buildList { + with(node.environmentMetrics) { + temperature?.let { temp -> + if (!temp.isNaN()) { + add( + VectorMetricInfo( + label = Res.string.temperature, + value = temp.toTempString(isFahrenheit), + icon = MeshtasticIcons.Temperature, + ), + ) } } + relative_humidity?.let { rh -> + add( + VectorMetricInfo( + label = Res.string.humidity, + value = "${NumberFormatter.format(rh, 0)}%", + icon = MeshtasticIcons.Humidity, + ), + ) + } + barometric_pressure?.let { bp -> + add( + VectorMetricInfo( + label = Res.string.pressure, + value = "${NumberFormatter.format(bp, 0)} hPa", + icon = MeshtasticIcons.Pressure, + ), + ) + } + gas_resistance?.let { gr -> + add( + VectorMetricInfo( + label = Res.string.gas_resistance, + value = "${NumberFormatter.format(gr, 0)} MΩ", + icon = MeshtasticIcons.Particulate, + ), + ) + } + voltage?.let { v -> + add( + VectorMetricInfo( + label = Res.string.voltage, + value = "${NumberFormatter.format(v, 2)}V", + icon = MeshtasticIcons.Voltage, + ), + ) + } + current?.let { c -> + add( + VectorMetricInfo( + label = Res.string.current, + value = "${NumberFormatter.format(c, 1)}mA", + icon = MeshtasticIcons.PowerSupply, + ), + ) + } + iaq?.let { i -> + add(VectorMetricInfo(label = Res.string.iaq, value = i.toString(), icon = MeshtasticIcons.AirQuality)) + } + distance?.let { d -> + add( + VectorMetricInfo( + label = Res.string.distance, + value = d.toSmallDistanceString(displayUnits), + icon = MeshtasticIcons.Altitude, + ), + ) + } + lux?.let { l -> + add( + VectorMetricInfo( + label = Res.string.lux, + value = "${NumberFormatter.format(l, 0)} lx", + icon = MeshtasticIcons.LightMode, + ), + ) + } + uv_lux?.let { uvl -> + add( + VectorMetricInfo( + label = Res.string.uv_lux, + value = "${NumberFormatter.format(uvl, 0)} lx", + icon = MeshtasticIcons.LightMode, + ), + ) + } + wind_speed?.let { ws -> + @Suppress("MagicNumber") + val normalizedBearing = ((wind_direction ?: 0) + 180) % 360 + add( + VectorMetricInfo( + label = Res.string.wind, + value = ws.toSpeedString(displayUnits), + icon = MeshtasticIcons.WindDirection, + rotateIcon = normalizedBearing.toFloat(), + ), + ) + } + weight?.let { w -> + add( + VectorMetricInfo( + label = Res.string.weight, + value = "${NumberFormatter.format(w, 2)} kg", + icon = MeshtasticIcons.Weight, + ), + ) + } + if (temperature != null && relative_humidity != null) { + val dewPoint = UnitConversions.calculateDewPoint(temperature!!, relative_humidity!!) + if (!dewPoint.isNaN()) { + add( + DrawableMetricInfo( + label = Res.string.dew_point, + value = dewPoint.toTempString(isFahrenheit), + icon = Res.drawable.ic_dew_point, + ), + ) + } + } + soil_temperature?.let { st -> + if (!st.isNaN()) { + add( + DrawableMetricInfo( + label = Res.string.soil_temperature, + value = st.toTempString(isFahrenheit), + icon = Res.drawable.ic_soil_temperature, + ), + ) + } + } + soil_moisture?.let { sm -> + add( + DrawableMetricInfo( + label = Res.string.soil_moisture, + value = "$sm%", + icon = Res.drawable.ic_soil_moisture, + ), + ) + } + radiation?.let { r -> + add( + DrawableMetricInfo( + label = Res.string.radiation, + value = "${NumberFormatter.format(r, 1)} µR/h", + icon = Res.drawable.ic_radioactive, + ), + ) + } } + } FlowRow( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceEvenly, diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/FirmwareReleaseSheetContent.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/FirmwareReleaseSheetContent.kt index 788e041cd..faf5d8721 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/FirmwareReleaseSheetContent.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/FirmwareReleaseSheetContent.kt @@ -25,9 +25,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Download -import androidx.compose.material.icons.rounded.Link import androidx.compose.material3.Button import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -41,6 +38,9 @@ import org.meshtastic.core.database.entity.FirmwareRelease import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.download import org.meshtastic.core.resources.view_release +import org.meshtastic.core.ui.icon.Download +import org.meshtastic.core.ui.icon.LinkIcon +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.util.rememberOpenUrl @Composable @@ -56,12 +56,15 @@ fun FirmwareReleaseSheetContent(firmwareRelease: FirmwareRelease, modifier: Modi Markdown(modifier = Modifier.padding(8.dp), content = firmwareRelease.releaseNotes) Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp)) { Button(onClick = { openUrl(firmwareRelease.pageUrl) }, modifier = Modifier.weight(1f)) { - Icon(imageVector = Icons.Rounded.Link, contentDescription = stringResource(Res.string.view_release)) + Icon( + imageVector = MeshtasticIcons.LinkIcon, + contentDescription = stringResource(Res.string.view_release), + ) Spacer(modifier = Modifier.width(8.dp)) Text(text = stringResource(Res.string.view_release)) } Button(onClick = { openUrl(firmwareRelease.zipUrl) }, modifier = Modifier.weight(1f)) { - Icon(imageVector = Icons.Rounded.Download, contentDescription = stringResource(Res.string.download)) + Icon(imageVector = MeshtasticIcons.Download, contentDescription = stringResource(Res.string.download)) Spacer(modifier = Modifier.width(8.dp)) Text(text = stringResource(Res.string.download)) } diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/HopsInfo.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/HopsInfo.kt index a145eedff..fbfe04450 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/HopsInfo.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/HopsInfo.kt @@ -16,8 +16,6 @@ */ package org.meshtastic.feature.node.component -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.CrueltyFree import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -25,12 +23,14 @@ import androidx.compose.ui.graphics.Color import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.hops_away +import org.meshtastic.core.ui.icon.HopCount +import org.meshtastic.core.ui.icon.MeshtasticIcons @Composable fun HopsInfo(hops: Int, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface) { IconInfo( modifier = modifier, - icon = Icons.Rounded.CrueltyFree, + icon = MeshtasticIcons.HopCount, contentDescription = stringResource(Res.string.hops_away), label = stringResource(Res.string.hops_away), text = hops.toString(), diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/LinkedCoordinatesItem.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/LinkedCoordinatesItem.kt index 38a5e30b0..ba1584577 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/LinkedCoordinatesItem.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/LinkedCoordinatesItem.kt @@ -17,9 +17,6 @@ package org.meshtastic.feature.node.component import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.rounded.KeyboardArrowRight -import androidx.compose.material.icons.rounded.LocationOn import androidx.compose.runtime.Composable import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Modifier @@ -42,6 +39,9 @@ import org.meshtastic.core.resources.elevation_suffix import org.meshtastic.core.resources.last_position_update import org.meshtastic.core.ui.component.BasicListItem import org.meshtastic.core.ui.component.icon +import org.meshtastic.core.ui.icon.KeyboardArrowRight +import org.meshtastic.core.ui.icon.LocationOn +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.util.createClipEntry import org.meshtastic.core.ui.util.formatAgo import org.meshtastic.core.ui.util.rememberOpenMap @@ -80,9 +80,9 @@ fun LinkedCoordinatesItem( ) }, text = stringResource(Res.string.last_position_update), - leadingIcon = Icons.Rounded.LocationOn, + leadingIcon = MeshtasticIcons.LocationOn, supportingText = "$ago • $coordinates$elevationText", - trailingContent = Icons.AutoMirrored.Rounded.KeyboardArrowRight.icon(), + trailingContent = MeshtasticIcons.KeyboardArrowRight.icon(), onClick = { openMap(node.latitude, node.longitude, node.user.long_name) }, onLongClick = { coroutineScope.launch { clipboard.setClipEntry(createClipEntry(coordinates, copyLabel)) } }, ) diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeContextMenu.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeContextMenu.kt index 7531991d6..1e6ed33b4 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeContextMenu.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeContextMenu.kt @@ -16,14 +16,6 @@ */ package org.meshtastic.feature.node.component -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.VolumeOff -import androidx.compose.material.icons.automirrored.filled.VolumeUp -import androidx.compose.material.icons.filled.DoDisturbOn -import androidx.compose.material.icons.outlined.DoDisturbOn -import androidx.compose.material.icons.rounded.DeleteOutline -import androidx.compose.material.icons.rounded.Star -import androidx.compose.material.icons.rounded.StarBorder import androidx.compose.material3.DropdownMenu import androidx.compose.material3.DropdownMenuItem import androidx.compose.material3.Icon @@ -42,6 +34,13 @@ import org.meshtastic.core.resources.remove import org.meshtastic.core.resources.remove_favorite import org.meshtastic.core.resources.remove_ignored import org.meshtastic.core.resources.unmute +import org.meshtastic.core.ui.icon.DeleteNode +import org.meshtastic.core.ui.icon.DoDisturb +import org.meshtastic.core.ui.icon.Favorite +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.NotFavorite +import org.meshtastic.core.ui.icon.VolumeOff +import org.meshtastic.core.ui.icon.VolumeUp import org.meshtastic.core.ui.theme.StatusColors.StatusRed /** @@ -80,7 +79,7 @@ private fun FavoriteMenuItem(node: Node, onFavorite: () -> Unit, onDismiss: () - enabled = !node.isIgnored, leadingIcon = { Icon( - imageVector = if (isFavorite) Icons.Rounded.Star else Icons.Rounded.StarBorder, + imageVector = if (isFavorite) MeshtasticIcons.Favorite else MeshtasticIcons.NotFavorite, contentDescription = null, ) }, @@ -98,7 +97,7 @@ private fun IgnoreMenuItem(node: Node, onIgnore: () -> Unit, onDismiss: () -> Un }, leadingIcon = { Icon( - imageVector = if (isIgnored) Icons.Filled.DoDisturbOn else Icons.Outlined.DoDisturbOn, + imageVector = if (isIgnored) MeshtasticIcons.DoDisturb else MeshtasticIcons.DoDisturb, contentDescription = null, tint = MaterialTheme.colorScheme.StatusRed, ) @@ -122,7 +121,7 @@ private fun MuteMenuItem(node: Node, onMute: () -> Unit, onDismiss: () -> Unit) }, leadingIcon = { Icon( - imageVector = if (isMuted) Icons.AutoMirrored.Filled.VolumeOff else Icons.AutoMirrored.Filled.VolumeUp, + imageVector = if (isMuted) MeshtasticIcons.VolumeOff else MeshtasticIcons.VolumeUp, contentDescription = null, ) }, @@ -140,7 +139,7 @@ private fun RemoveMenuItem(node: Node, onRemove: () -> Unit, onDismiss: () -> Un enabled = !node.isIgnored, leadingIcon = { Icon( - imageVector = Icons.Rounded.DeleteOutline, + imageVector = MeshtasticIcons.DeleteNode, contentDescription = null, tint = if (node.isIgnored) LocalContentColor.current else MaterialTheme.colorScheme.StatusRed, ) diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeDetailsSection.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeDetailsSection.kt index 925e4ab5d..51f131bda 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeDetailsSection.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeDetailsSection.kt @@ -29,9 +29,6 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.rounded.Notes -import androidx.compose.material.icons.rounded.Numbers import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface @@ -78,14 +75,17 @@ import org.meshtastic.core.resources.uptime import org.meshtastic.core.resources.user_id import org.meshtastic.core.resources.via_mqtt import org.meshtastic.core.ui.icon.ArrowCircleUp -import org.meshtastic.core.ui.icon.ChannelUtilization -import org.meshtastic.core.ui.icon.Cloud +import org.meshtastic.core.ui.icon.DeviceNumbers import org.meshtastic.core.ui.icon.History -import org.meshtastic.core.ui.icon.Hops +import org.meshtastic.core.ui.icon.HopCount import org.meshtastic.core.ui.icon.KeyOff import org.meshtastic.core.ui.icon.Lock import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.MqttConnected +import org.meshtastic.core.ui.icon.Notes import org.meshtastic.core.ui.icon.Person +import org.meshtastic.core.ui.icon.Rssi +import org.meshtastic.core.ui.icon.Snr import org.meshtastic.core.ui.icon.Verified import org.meshtastic.core.ui.icon.role import org.meshtastic.core.ui.util.createClipEntry @@ -189,7 +189,7 @@ private fun StatusMessageRow(status: String) { InfoItem( label = stringResource(Res.string.status_message), value = status, - icon = Icons.AutoMirrored.Rounded.Notes, + icon = MeshtasticIcons.Notes, modifier = Modifier.fillMaxWidth(), ) } @@ -200,13 +200,13 @@ private fun NodeIdentificationRow(node: Node) { InfoItem( label = stringResource(Res.string.node_id), value = DataPacket.nodeNumToDefaultId(node.num), - icon = Icons.Rounded.Numbers, + icon = MeshtasticIcons.DeviceNumbers, modifier = Modifier.weight(1f), ) InfoItem( label = stringResource(Res.string.node_number), value = node.num.toUInt().toString(), - icon = Icons.Rounded.Numbers, + icon = MeshtasticIcons.DeviceNumbers, modifier = Modifier.weight(1f), ) } @@ -225,7 +225,7 @@ private fun HearsAndHopsRow(node: Node) { InfoItem( label = stringResource(Res.string.hops_away), value = node.hopsAway.toString(), - icon = MeshtasticIcons.Hops, + icon = MeshtasticIcons.HopCount, modifier = Modifier.weight(1f), ) } else { @@ -264,7 +264,7 @@ private fun SignalRow(node: Node) { InfoItem( label = stringResource(Res.string.snr), value = formatString("%.1f dB", node.snr), - icon = MeshtasticIcons.ChannelUtilization, + icon = MeshtasticIcons.Snr, modifier = Modifier.weight(1f), ) } else { @@ -274,7 +274,7 @@ private fun SignalRow(node: Node) { InfoItem( label = stringResource(Res.string.rssi), value = formatString("%d dBm", node.rssi), - icon = MeshtasticIcons.ChannelUtilization, + icon = MeshtasticIcons.Rssi, modifier = Modifier.weight(1f), ) } else { @@ -290,7 +290,7 @@ private fun MqttAndVerificationRow(node: Node) { InfoItem( label = stringResource(Res.string.via_mqtt), value = "Yes", - icon = MeshtasticIcons.Cloud, + icon = MeshtasticIcons.MqttConnected, modifier = Modifier.weight(1f), ) } else { diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeFilterTextField.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeFilterTextField.kt index f40acd33b..18ffc09ec 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeFilterTextField.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeFilterTextField.kt @@ -29,10 +29,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.Sort -import androidx.compose.material.icons.rounded.Clear -import androidx.compose.material.icons.rounded.Search import androidx.compose.material3.Checkbox import androidx.compose.material3.DropdownMenu import androidx.compose.material3.DropdownMenuItem @@ -72,6 +68,10 @@ import org.meshtastic.core.resources.node_filter_show_ignored import org.meshtastic.core.resources.node_filter_title import org.meshtastic.core.resources.node_sort_button import org.meshtastic.core.resources.node_sort_title +import org.meshtastic.core.ui.icon.Clear +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Search +import org.meshtastic.core.ui.icon.Sort @Suppress("LongParameterList") @Composable @@ -173,13 +173,13 @@ private fun NodeFilterTextField(filterText: String, onTextChange: (String) -> Un ) }, leadingIcon = { - Icon(Icons.Rounded.Search, contentDescription = stringResource(Res.string.node_filter_placeholder)) + Icon(MeshtasticIcons.Search, contentDescription = stringResource(Res.string.node_filter_placeholder)) }, onValueChange = onTextChange, trailingIcon = { if (filterText.isNotEmpty() || isFocused) { Icon( - Icons.Rounded.Clear, + MeshtasticIcons.Clear, contentDescription = stringResource(Res.string.desc_node_filter_clear), modifier = Modifier.clickable { @@ -208,7 +208,7 @@ private fun NodeSortButton( IconButton(onClick = { expanded = true }) { Icon( - imageVector = Icons.AutoMirrored.Filled.Sort, + imageVector = MeshtasticIcons.Sort, contentDescription = stringResource(Res.string.node_sort_button), modifier = Modifier.heightIn(max = 48.dp), tint = MaterialTheme.colorScheme.onSurface, diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeItem.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeItem.kt index a96501f6d..cbf99e9ca 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeItem.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeItem.kt @@ -29,8 +29,6 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.rounded.Notes import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi @@ -48,6 +46,7 @@ import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.common.util.formatString import org.meshtastic.core.model.ConnectionState import org.meshtastic.core.model.Node @@ -90,6 +89,7 @@ import org.meshtastic.core.ui.component.determineSignalQuality import org.meshtastic.core.ui.icon.AirUtilization import org.meshtastic.core.ui.icon.ChannelUtilization import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Notes import org.meshtastic.proto.Config private const val ACTIVE_ALPHA = 0.5f @@ -178,7 +178,7 @@ fun NodeItem( verticalAlignment = Alignment.CenterVertically, ) { Icon( - imageVector = Icons.AutoMirrored.Rounded.Notes, + imageVector = MeshtasticIcons.Notes, contentDescription = null, modifier = Modifier.size(16.dp), tint = contentColor.copy(alpha = 0.7f), @@ -284,7 +284,7 @@ private fun NodeSignalRow(thatNode: Node, isThisNode: Boolean, contentColor: Col if (thatNode.snr < 100f && thatNode.rssi < 0) { val quality = determineSignalQuality(thatNode.snr, thatNode.rssi) IconInfo( - icon = quality.imageVector, + icon = vectorResource(quality.icon), contentDescription = stringResource(Res.string.signal_quality), contentColor = quality.color.invoke(), text = stringResource(quality.nameRes), diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeStatusIcons.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeStatusIcons.kt index 7c4e23d4f..007c12c96 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeStatusIcons.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeStatusIcons.kt @@ -46,12 +46,12 @@ import org.meshtastic.core.resources.favorite import org.meshtastic.core.resources.mute_always import org.meshtastic.core.resources.unmessageable import org.meshtastic.core.resources.unmonitored_or_infrastructure -import org.meshtastic.core.ui.icon.CloudDone -import org.meshtastic.core.ui.icon.CloudOffTwoTone -import org.meshtastic.core.ui.icon.CloudSync -import org.meshtastic.core.ui.icon.CloudTwoTone +import org.meshtastic.core.ui.icon.DeviceSleep +import org.meshtastic.core.ui.icon.Disconnected import org.meshtastic.core.ui.icon.Favorite import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.MqttDelivered +import org.meshtastic.core.ui.icon.MqttSyncing import org.meshtastic.core.ui.icon.Unmessageable import org.meshtastic.core.ui.icon.VolumeOff import org.meshtastic.core.ui.theme.StatusColors.StatusGreen @@ -135,7 +135,7 @@ private fun ThisNodeStatusBadge(connectionState: ConnectionState) { @Composable private fun ConnectedStatusIcon() { Icon( - imageVector = MeshtasticIcons.CloudDone, + imageVector = MeshtasticIcons.MqttDelivered, contentDescription = stringResource(Res.string.connected), modifier = Modifier.size(24.dp), tint = MaterialTheme.colorScheme.StatusGreen, @@ -145,7 +145,7 @@ private fun ConnectedStatusIcon() { @Composable private fun ConnectingStatusIcon() { Icon( - imageVector = MeshtasticIcons.CloudSync, + imageVector = MeshtasticIcons.MqttSyncing, contentDescription = stringResource(Res.string.connecting), modifier = Modifier.size(24.dp), tint = MaterialTheme.colorScheme.StatusOrange, @@ -155,7 +155,7 @@ private fun ConnectingStatusIcon() { @Composable private fun DisconnectedStatusIcon() { Icon( - imageVector = MeshtasticIcons.CloudOffTwoTone, + imageVector = MeshtasticIcons.Disconnected, contentDescription = stringResource(Res.string.disconnected), modifier = Modifier.size(24.dp), tint = MaterialTheme.colorScheme.StatusRed, @@ -165,7 +165,7 @@ private fun DisconnectedStatusIcon() { @Composable private fun DeviceSleepStatusIcon() { Icon( - imageVector = MeshtasticIcons.CloudTwoTone, + imageVector = MeshtasticIcons.DeviceSleep, contentDescription = stringResource(Res.string.device_sleeping), modifier = Modifier.size(24.dp), tint = MaterialTheme.colorScheme.StatusYellow, diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NotesSection.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NotesSection.kt index d8b99c9c7..f9d7f640a 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NotesSection.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NotesSection.kt @@ -23,8 +23,6 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Save import androidx.compose.material3.CardDefaults import androidx.compose.material3.ElevatedCard import androidx.compose.material3.Icon @@ -48,6 +46,8 @@ import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.add_a_note import org.meshtastic.core.resources.notes import org.meshtastic.core.resources.save +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Save @Composable fun NotesSection(node: Node, onSaveNotes: (Int, String) -> Unit, modifier: Modifier = Modifier) { @@ -86,7 +86,10 @@ fun NotesSection(node: Node, onSaveNotes: (Int, String) -> Unit, modifier: Modif }, enabled = edited, ) { - Icon(imageVector = Icons.Rounded.Save, contentDescription = stringResource(Res.string.save)) + Icon( + imageVector = MeshtasticIcons.Save, + contentDescription = stringResource(Res.string.save), + ) } }, keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done), diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/PositionSection.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/PositionSection.kt index 57c7980df..c687c620e 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/PositionSection.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/PositionSection.kt @@ -28,10 +28,6 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Explore -import androidx.compose.material.icons.rounded.LocationOn -import androidx.compose.material.icons.rounded.SocialDistance import androidx.compose.material3.AssistChip import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults @@ -46,12 +42,17 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.model.Node import org.meshtastic.core.model.util.toDistanceString import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.exchange_position import org.meshtastic.core.resources.open_compass import org.meshtastic.core.resources.position +import org.meshtastic.core.ui.icon.Compass +import org.meshtastic.core.ui.icon.Distance +import org.meshtastic.core.ui.icon.LocationOn +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.util.LocalInlineMapProvider import org.meshtastic.feature.node.model.LogsType import org.meshtastic.feature.node.model.MetricsState @@ -106,7 +107,7 @@ fun PositionSection( AssistChip( onClick = { onAction(NodeDetailAction.Navigate(LogsType.NODE_MAP.routeFactory(node.num))) }, label = { Text(stringResource(LogsType.NODE_MAP.titleRes)) }, - leadingIcon = { Icon(LogsType.NODE_MAP.icon, null, Modifier.size(18.dp)) }, + leadingIcon = { Icon(vectorResource(LogsType.NODE_MAP.icon), null, Modifier.size(18.dp)) }, ) } @@ -116,7 +117,7 @@ fun PositionSection( onAction(NodeDetailAction.Navigate(LogsType.POSITIONS.routeFactory(node.num))) }, label = { Text(stringResource(LogsType.POSITIONS.titleRes)) }, - leadingIcon = { Icon(LogsType.POSITIONS.icon, null, Modifier.size(18.dp)) }, + leadingIcon = { Icon(vectorResource(LogsType.POSITIONS.icon), null, Modifier.size(18.dp)) }, ) } } @@ -141,7 +142,7 @@ private fun PositionMap(node: Node, distance: String?) { modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), verticalAlignment = Alignment.CenterVertically, ) { - Icon(Icons.Rounded.SocialDistance, null, Modifier.size(16.dp)) + Icon(MeshtasticIcons.Distance, null, Modifier.size(16.dp)) Spacer(Modifier.width(6.dp)) Text(distance, style = MaterialTheme.typography.labelLarge) } @@ -176,7 +177,7 @@ private fun PositionActionButtons( contentColor = MaterialTheme.colorScheme.onPrimaryContainer, ), ) { - Icon(Icons.Rounded.LocationOn, null, Modifier.size(18.dp)) + Icon(MeshtasticIcons.LocationOn, null, Modifier.size(18.dp)) Spacer(Modifier.width(6.dp)) Text( text = stringResource(Res.string.exchange_position), @@ -193,7 +194,7 @@ private fun PositionActionButtons( modifier = if (isLocal) Modifier.fillMaxWidth() else Modifier.weight(COMPASS_BUTTON_WEIGHT), shape = MaterialTheme.shapes.large, ) { - Icon(Icons.Rounded.Explore, null, Modifier.size(18.dp)) + Icon(MeshtasticIcons.Compass, null, Modifier.size(18.dp)) Spacer(Modifier.width(6.dp)) Text( text = stringResource(Res.string.open_compass), diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/PowerMetrics.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/PowerMetrics.kt index 154803e81..aba8fa75c 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/PowerMetrics.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/PowerMetrics.kt @@ -19,11 +19,7 @@ package org.meshtastic.feature.node.component import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.FlowRow import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Bolt -import androidx.compose.material.icons.rounded.Power import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.common.util.NumberFormatter @@ -32,6 +28,9 @@ import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.channel_1 import org.meshtastic.core.resources.channel_2 import org.meshtastic.core.resources.channel_3 +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.PowerSupply +import org.meshtastic.core.ui.icon.Voltage import org.meshtastic.feature.node.model.VectorMetricInfo /** @@ -44,61 +43,58 @@ import org.meshtastic.feature.node.model.VectorMetricInfo @Composable @Suppress("LongMethod", "CyclomaticComplexMethod") internal fun PowerMetrics(node: Node) { - val metrics = - remember(node.powerMetrics) { - buildList { - with(node.powerMetrics) { - if ((ch1_voltage ?: 0f) != 0f) { - add( - VectorMetricInfo( - Res.string.channel_1, - "${NumberFormatter.format(ch1_voltage ?: 0f, 2)}V", - Icons.Rounded.Bolt, - ), - ) - add( - VectorMetricInfo( - Res.string.channel_1, - "${NumberFormatter.format(ch1_current ?: 0f, 1)}mA", - Icons.Rounded.Power, - ), - ) - } - if ((ch2_voltage ?: 0f) != 0f) { - add( - VectorMetricInfo( - Res.string.channel_2, - "${NumberFormatter.format(ch2_voltage ?: 0f, 2)}V", - Icons.Rounded.Bolt, - ), - ) - add( - VectorMetricInfo( - Res.string.channel_2, - "${NumberFormatter.format(ch2_current ?: 0f, 1)}mA", - Icons.Rounded.Power, - ), - ) - } - if ((ch3_voltage ?: 0f) != 0f) { - add( - VectorMetricInfo( - Res.string.channel_3, - "${NumberFormatter.format(ch3_voltage ?: 0f, 2)}V", - Icons.Rounded.Bolt, - ), - ) - add( - VectorMetricInfo( - Res.string.channel_3, - "${NumberFormatter.format(ch3_current ?: 0f, 1)}mA", - Icons.Rounded.Power, - ), - ) - } - } + val metrics = buildList { + with(node.powerMetrics) { + if ((ch1_voltage ?: 0f) != 0f) { + add( + VectorMetricInfo( + Res.string.channel_1, + "${NumberFormatter.format(ch1_voltage ?: 0f, 2)}V", + MeshtasticIcons.Voltage, + ), + ) + add( + VectorMetricInfo( + Res.string.channel_1, + "${NumberFormatter.format(ch1_current ?: 0f, 1)}mA", + MeshtasticIcons.PowerSupply, + ), + ) + } + if ((ch2_voltage ?: 0f) != 0f) { + add( + VectorMetricInfo( + Res.string.channel_2, + "${NumberFormatter.format(ch2_voltage ?: 0f, 2)}V", + MeshtasticIcons.Voltage, + ), + ) + add( + VectorMetricInfo( + Res.string.channel_2, + "${NumberFormatter.format(ch2_current ?: 0f, 1)}mA", + MeshtasticIcons.PowerSupply, + ), + ) + } + if ((ch3_voltage ?: 0f) != 0f) { + add( + VectorMetricInfo( + Res.string.channel_3, + "${NumberFormatter.format(ch3_voltage ?: 0f, 2)}V", + MeshtasticIcons.Voltage, + ), + ) + add( + VectorMetricInfo( + Res.string.channel_3, + "${NumberFormatter.format(ch3_current ?: 0f, 1)}mA", + MeshtasticIcons.PowerSupply, + ), + ) } } + } FlowRow( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceEvenly, diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/SatelliteCountInfo.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/SatelliteCountInfo.kt index 20ee89fc7..eac0a7207 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/SatelliteCountInfo.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/SatelliteCountInfo.kt @@ -16,8 +16,6 @@ */ package org.meshtastic.feature.node.component -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.twotone.SatelliteAlt import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -25,6 +23,8 @@ import androidx.compose.ui.graphics.Color import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.sats +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Satellites @Composable fun SatelliteCountInfo( @@ -34,7 +34,7 @@ fun SatelliteCountInfo( ) { IconInfo( modifier = modifier, - icon = Icons.TwoTone.SatelliteAlt, + icon = MeshtasticIcons.Satellites, contentDescription = stringResource(Res.string.sats), label = stringResource(Res.string.sats), text = "$satCount", diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/TelemetricActionsSection.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/TelemetricActionsSection.kt index 7178e4340..f3825817d 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/TelemetricActionsSection.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/TelemetricActionsSection.kt @@ -41,31 +41,32 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp +import org.jetbrains.compose.resources.DrawableResource import org.jetbrains.compose.resources.StringResource import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.model.Node import org.meshtastic.core.model.TelemetryType import org.meshtastic.core.resources.Res +import org.meshtastic.core.resources.ic_air +import org.meshtastic.core.resources.ic_person +import org.meshtastic.core.resources.ic_thermostat import org.meshtastic.core.resources.logs import org.meshtastic.core.resources.request_air_quality_metrics import org.meshtastic.core.resources.request_telemetry import org.meshtastic.core.resources.telemetry import org.meshtastic.core.resources.userinfo -import org.meshtastic.core.ui.icon.AirQuality import org.meshtastic.core.ui.icon.MeshtasticIcons -import org.meshtastic.core.ui.icon.Person import org.meshtastic.core.ui.icon.Refresh -import org.meshtastic.core.ui.icon.Temperature import org.meshtastic.feature.node.model.LogsType import org.meshtastic.feature.node.model.MetricsState import org.meshtastic.feature.node.model.NodeDetailAction private data class TelemetricFeature( val titleRes: StringResource, - val icon: ImageVector, + val icon: DrawableResource, val requestAction: ((Node) -> NodeMenuAction)?, val logsType: LogsType? = null, val isVisible: (Node) -> Boolean = { true }, @@ -118,7 +119,7 @@ private fun rememberTelemetricFeatures( listOf( TelemetricFeature( titleRes = Res.string.userinfo, - icon = MeshtasticIcons.Person, + icon = Res.drawable.ic_person, requestAction = { NodeMenuAction.RequestUserInfo(it) }, isVisible = { !isLocal }, ), @@ -154,7 +155,7 @@ private fun rememberTelemetricFeatures( ), TelemetricFeature( titleRes = LogsType.ENVIRONMENT.titleRes, - icon = MeshtasticIcons.Temperature, + icon = Res.drawable.ic_thermostat, requestAction = { NodeMenuAction.RequestTelemetry(it, TelemetryType.ENVIRONMENT) }, logsType = LogsType.ENVIRONMENT, content = { EnvironmentMetrics(it, metricsState.displayUnits, metricsState.isFahrenheit) }, @@ -162,7 +163,7 @@ private fun rememberTelemetricFeatures( ), TelemetricFeature( titleRes = Res.string.request_air_quality_metrics, - icon = MeshtasticIcons.AirQuality, + icon = Res.drawable.ic_air, requestAction = { NodeMenuAction.RequestTelemetry(it, TelemetryType.AIR_QUALITY) }, ), TelemetricFeature( @@ -201,7 +202,11 @@ private fun FeatureRow(node: Node, feature: TelemetricFeature, hasLogs: Boolean, ListItem( colors = ListItemDefaults.colors(containerColor = Color.Transparent), leadingContent = { - Icon(imageVector = feature.icon, contentDescription = null, tint = MaterialTheme.colorScheme.primary) + Icon( + imageVector = vectorResource(feature.icon), + contentDescription = null, + tint = MaterialTheme.colorScheme.primary, + ) }, headlineContent = { Text( @@ -229,7 +234,7 @@ private fun FeatureRow(node: Node, feature: TelemetricFeature, hasLogs: Boolean, }, ) { Icon( - imageVector = feature.logsType?.icon ?: feature.icon, + imageVector = vectorResource(feature.logsType?.icon ?: feature.icon), modifier = Modifier.size(24.dp), contentDescription = logsDescription, tint = MaterialTheme.colorScheme.primary, diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/TelemetryInfo.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/TelemetryInfo.kt index 46178dcce..1e49530b4 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/TelemetryInfo.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/TelemetryInfo.kt @@ -18,16 +18,6 @@ package org.meshtastic.feature.node.component -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Air -import androidx.compose.material.icons.rounded.ElectricBolt -import androidx.compose.material.icons.rounded.Fingerprint -import androidx.compose.material.icons.rounded.Grass -import androidx.compose.material.icons.rounded.People -import androidx.compose.material.icons.rounded.Router -import androidx.compose.material.icons.rounded.Thermostat -import androidx.compose.material.icons.rounded.WaterDrop -import androidx.compose.material.icons.rounded.Work import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -45,6 +35,16 @@ import org.meshtastic.core.resources.role import org.meshtastic.core.resources.soil_moisture import org.meshtastic.core.resources.soil_temperature import org.meshtastic.core.resources.temperature +import org.meshtastic.core.ui.icon.AirQuality +import org.meshtastic.core.ui.icon.ElectricPower +import org.meshtastic.core.ui.icon.HardwareModel +import org.meshtastic.core.ui.icon.Humidity +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.NodeId +import org.meshtastic.core.ui.icon.PeopleCount +import org.meshtastic.core.ui.icon.Role +import org.meshtastic.core.ui.icon.SoilMoisture +import org.meshtastic.core.ui.icon.Temperature @Composable fun TemperatureInfo( @@ -54,7 +54,7 @@ fun TemperatureInfo( ) { IconInfo( modifier = modifier, - icon = Icons.Rounded.Thermostat, + icon = MeshtasticIcons.Temperature, contentDescription = stringResource(Res.string.env_metrics_log), label = stringResource(Res.string.temperature), text = temp, @@ -70,7 +70,7 @@ fun HumidityInfo( ) { IconInfo( modifier = modifier, - icon = Icons.Rounded.WaterDrop, + icon = MeshtasticIcons.Humidity, contentDescription = stringResource(Res.string.env_metrics_log), label = stringResource(Res.string.humidity), text = humidity, @@ -86,7 +86,7 @@ fun SoilTemperatureInfo( ) { IconInfo( modifier = modifier, - icon = Icons.Rounded.Grass, + icon = MeshtasticIcons.SoilMoisture, contentDescription = stringResource(Res.string.env_metrics_log), label = stringResource(Res.string.soil_temperature), text = temp, @@ -102,7 +102,7 @@ fun SoilMoistureInfo( ) { IconInfo( modifier = modifier, - icon = Icons.Rounded.Grass, + icon = MeshtasticIcons.SoilMoisture, contentDescription = stringResource(Res.string.env_metrics_log), label = stringResource(Res.string.soil_moisture), text = moisture, @@ -118,7 +118,7 @@ fun PaxcountInfo( ) { IconInfo( modifier = modifier, - icon = Icons.Rounded.People, + icon = MeshtasticIcons.PeopleCount, contentDescription = stringResource(Res.string.pax_metrics_log), label = stringResource(Res.string.pax), text = pax, @@ -134,7 +134,7 @@ fun AirQualityInfo( ) { IconInfo( modifier = modifier, - icon = Icons.Rounded.Air, + icon = MeshtasticIcons.AirQuality, contentDescription = stringResource(Res.string.env_metrics_log), label = stringResource(Res.string.iaq), text = iaq, @@ -151,7 +151,7 @@ fun PowerInfo( ) { IconInfo( modifier = modifier, - icon = Icons.Rounded.ElectricBolt, + icon = MeshtasticIcons.ElectricPower, contentDescription = stringResource(Res.string.env_metrics_log), label = label, text = value, @@ -167,7 +167,7 @@ fun HardwareInfo( ) { IconInfo( modifier = modifier, - icon = Icons.Rounded.Router, + icon = MeshtasticIcons.HardwareModel, contentDescription = stringResource(Res.string.hardware_model), text = hwModel, style = MaterialTheme.typography.labelSmall, @@ -179,7 +179,7 @@ fun HardwareInfo( fun RoleInfo(role: String, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface) { IconInfo( modifier = modifier, - icon = Icons.Rounded.Work, + icon = MeshtasticIcons.Role, contentDescription = stringResource(Res.string.role), text = role, style = MaterialTheme.typography.labelSmall, @@ -191,7 +191,7 @@ fun RoleInfo(role: String, modifier: Modifier = Modifier, contentColor: Color = fun NodeIdInfo(id: String, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface) { IconInfo( modifier = modifier, - icon = Icons.Rounded.Fingerprint, + icon = MeshtasticIcons.NodeId, contentDescription = stringResource(Res.string.node_id), text = id, style = MaterialTheme.typography.labelSmall, diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/BaseMetricChart.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/BaseMetricChart.kt index e0e90d252..cf3fd8d3a 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/BaseMetricChart.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/BaseMetricChart.kt @@ -29,10 +29,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyListState import androidx.compose.foundation.lazy.rememberLazyListState -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.rounded.List -import androidx.compose.material.icons.rounded.BarChart -import androidx.compose.material.icons.rounded.Info import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -80,6 +76,9 @@ import org.meshtastic.core.resources.logs import org.meshtastic.core.resources.max import org.meshtastic.core.resources.min import org.meshtastic.core.ui.component.MainAppBar +import org.meshtastic.core.ui.icon.BarChart +import org.meshtastic.core.ui.icon.Info +import org.meshtastic.core.ui.icon.List import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.icon.Refresh @@ -260,9 +259,9 @@ fun BaseMetricScreen( Icon( imageVector = if (isChartExpanded) { - Icons.AutoMirrored.Rounded.List + MeshtasticIcons.List } else { - Icons.Rounded.BarChart + MeshtasticIcons.BarChart }, contentDescription = stringResource( @@ -272,7 +271,10 @@ fun BaseMetricScreen( } if (infoData.isNotEmpty()) { IconButton(onClick = { displayInfoDialog = true }) { - Icon(imageVector = Icons.Rounded.Info, contentDescription = stringResource(Res.string.info)) + Icon( + imageVector = MeshtasticIcons.Info, + contentDescription = stringResource(Res.string.info), + ) } } if (telemetryType != null) { diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/CommonCharts.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/CommonCharts.kt index 495fee2c7..628c7e2e8 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/CommonCharts.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/CommonCharts.kt @@ -33,8 +33,6 @@ import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Info import androidx.compose.material3.AlertDialog import androidx.compose.material3.FilterChip import androidx.compose.material3.Icon @@ -63,6 +61,8 @@ import org.meshtastic.core.resources.close import org.meshtastic.core.resources.info import org.meshtastic.core.resources.rssi import org.meshtastic.core.resources.snr +import org.meshtastic.core.ui.icon.Info +import org.meshtastic.core.ui.icon.MeshtasticIcons import kotlin.time.Duration.Companion.days object CommonCharts { @@ -196,7 +196,7 @@ fun Legend( @Composable fun LegendInfoDialog(infoData: List, onDismiss: () -> Unit) { AlertDialog( - icon = { Icon(imageVector = Icons.Rounded.Info, contentDescription = null) }, + icon = { Icon(imageVector = MeshtasticIcons.Info, contentDescription = null) }, title = { Text( text = stringResource(Res.string.info), diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/PaxMetrics.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/PaxMetrics.kt index ed445947c..595167a7e 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/PaxMetrics.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/PaxMetrics.kt @@ -67,7 +67,7 @@ import org.meshtastic.core.resources.uptime import org.meshtastic.core.resources.wifi_devices import org.meshtastic.core.ui.component.IconInfo import org.meshtastic.core.ui.icon.MeshtasticIcons -import org.meshtastic.core.ui.icon.Paxcount +import org.meshtastic.core.ui.icon.PeopleCount import org.meshtastic.core.ui.theme.GraphColors.Orange import org.meshtastic.core.ui.theme.GraphColors.Purple import org.meshtastic.proto.Paxcount as ProtoPaxcount @@ -242,7 +242,7 @@ fun PaxcountInfo( ) { IconInfo( modifier = modifier, - icon = MeshtasticIcons.Paxcount, + icon = MeshtasticIcons.PeopleCount, contentDescription = stringResource(Res.string.pax_metrics_log), text = pax, contentColor = contentColor, diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/model/LogsType.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/model/LogsType.kt index 930a7b826..b4db1b358 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/model/LogsType.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/model/LogsType.kt @@ -16,16 +16,7 @@ */ package org.meshtastic.feature.node.model -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.ChargingStation -import androidx.compose.material.icons.rounded.Groups -import androidx.compose.material.icons.rounded.LocationOn -import androidx.compose.material.icons.rounded.Map -import androidx.compose.material.icons.rounded.Memory -import androidx.compose.material.icons.rounded.Power -import androidx.compose.material.icons.rounded.SignalCellularAlt -import androidx.compose.material.icons.rounded.Thermostat -import androidx.compose.ui.graphics.vector.ImageVector +import org.jetbrains.compose.resources.DrawableResource import org.jetbrains.compose.resources.StringResource import org.meshtastic.core.navigation.NodeDetailRoutes import org.meshtastic.core.navigation.Route @@ -33,6 +24,16 @@ import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.device_metrics_log import org.meshtastic.core.resources.env_metrics_log import org.meshtastic.core.resources.host_metrics_log +import org.meshtastic.core.resources.ic_charging_station +import org.meshtastic.core.resources.ic_groups +import org.meshtastic.core.resources.ic_location_on +import org.meshtastic.core.resources.ic_map +import org.meshtastic.core.resources.ic_memory +import org.meshtastic.core.resources.ic_people +import org.meshtastic.core.resources.ic_power +import org.meshtastic.core.resources.ic_route +import org.meshtastic.core.resources.ic_signal_cellular_alt +import org.meshtastic.core.resources.ic_thermostat import org.meshtastic.core.resources.neighbor_info import org.meshtastic.core.resources.node_map import org.meshtastic.core.resources.pax_metrics_log @@ -40,19 +41,16 @@ import org.meshtastic.core.resources.position_log import org.meshtastic.core.resources.power_metrics_log import org.meshtastic.core.resources.signal_quality import org.meshtastic.core.resources.traceroute_log -import org.meshtastic.core.ui.icon.MeshtasticIcons -import org.meshtastic.core.ui.icon.Paxcount -import org.meshtastic.core.ui.icon.Route -enum class LogsType(val titleRes: StringResource, val icon: ImageVector, val routeFactory: (Int) -> Route) { - DEVICE(Res.string.device_metrics_log, Icons.Rounded.ChargingStation, { NodeDetailRoutes.DeviceMetrics(it) }), - NODE_MAP(Res.string.node_map, Icons.Rounded.Map, { NodeDetailRoutes.NodeMap(it) }), - POSITIONS(Res.string.position_log, Icons.Rounded.LocationOn, { NodeDetailRoutes.PositionLog(it) }), - ENVIRONMENT(Res.string.env_metrics_log, Icons.Rounded.Thermostat, { NodeDetailRoutes.EnvironmentMetrics(it) }), - SIGNAL(Res.string.signal_quality, Icons.Rounded.SignalCellularAlt, { NodeDetailRoutes.SignalMetrics(it) }), - POWER(Res.string.power_metrics_log, Icons.Rounded.Power, { NodeDetailRoutes.PowerMetrics(it) }), - TRACEROUTE(Res.string.traceroute_log, MeshtasticIcons.Route, { NodeDetailRoutes.TracerouteLog(it) }), - NEIGHBOR_INFO(Res.string.neighbor_info, Icons.Rounded.Groups, { NodeDetailRoutes.NeighborInfoLog(it) }), - HOST(Res.string.host_metrics_log, Icons.Rounded.Memory, { NodeDetailRoutes.HostMetricsLog(it) }), - PAX(Res.string.pax_metrics_log, MeshtasticIcons.Paxcount, { NodeDetailRoutes.PaxMetrics(it) }), +enum class LogsType(val titleRes: StringResource, val icon: DrawableResource, val routeFactory: (Int) -> Route) { + DEVICE(Res.string.device_metrics_log, Res.drawable.ic_charging_station, { NodeDetailRoutes.DeviceMetrics(it) }), + NODE_MAP(Res.string.node_map, Res.drawable.ic_map, { NodeDetailRoutes.NodeMap(it) }), + POSITIONS(Res.string.position_log, Res.drawable.ic_location_on, { NodeDetailRoutes.PositionLog(it) }), + ENVIRONMENT(Res.string.env_metrics_log, Res.drawable.ic_thermostat, { NodeDetailRoutes.EnvironmentMetrics(it) }), + SIGNAL(Res.string.signal_quality, Res.drawable.ic_signal_cellular_alt, { NodeDetailRoutes.SignalMetrics(it) }), + POWER(Res.string.power_metrics_log, Res.drawable.ic_power, { NodeDetailRoutes.PowerMetrics(it) }), + TRACEROUTE(Res.string.traceroute_log, Res.drawable.ic_route, { NodeDetailRoutes.TracerouteLog(it) }), + NEIGHBOR_INFO(Res.string.neighbor_info, Res.drawable.ic_groups, { NodeDetailRoutes.NeighborInfoLog(it) }), + HOST(Res.string.host_metrics_log, Res.drawable.ic_memory, { NodeDetailRoutes.HostMetricsLog(it) }), + PAX(Res.string.pax_metrics_log, Res.drawable.ic_people, { NodeDetailRoutes.PaxMetrics(it) }), } diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/navigation/NodesNavigation.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/navigation/NodesNavigation.kt index 8f2dacf25..abfc38905 100644 --- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/navigation/NodesNavigation.kt +++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/navigation/NodesNavigation.kt @@ -16,25 +16,15 @@ */ package org.meshtastic.feature.node.navigation -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.CellTower -import androidx.compose.material.icons.rounded.Groups -import androidx.compose.material.icons.rounded.LightMode -import androidx.compose.material.icons.rounded.LocationOn -import androidx.compose.material.icons.rounded.Memory -import androidx.compose.material.icons.rounded.People -import androidx.compose.material.icons.rounded.PermScanWifi -import androidx.compose.material.icons.rounded.Power -import androidx.compose.material.icons.rounded.Router import androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi import androidx.compose.material3.adaptive.navigation3.ListDetailSceneStrategy import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.vector.ImageVector import androidx.navigation3.runtime.EntryProviderScope import androidx.navigation3.runtime.NavBackStack import androidx.navigation3.runtime.NavKey import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableSharedFlow +import org.jetbrains.compose.resources.DrawableResource import org.jetbrains.compose.resources.StringResource import org.koin.compose.viewmodel.koinViewModel import org.koin.core.parameter.parametersOf @@ -46,6 +36,15 @@ import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.device import org.meshtastic.core.resources.environment import org.meshtastic.core.resources.host +import org.meshtastic.core.resources.ic_cell_tower +import org.meshtastic.core.resources.ic_groups +import org.meshtastic.core.resources.ic_light_mode +import org.meshtastic.core.resources.ic_location_on +import org.meshtastic.core.resources.ic_memory +import org.meshtastic.core.resources.ic_people +import org.meshtastic.core.resources.ic_perm_scan_wifi +import org.meshtastic.core.resources.ic_power +import org.meshtastic.core.resources.ic_router import org.meshtastic.core.resources.neighbor_info import org.meshtastic.core.resources.pax import org.meshtastic.core.resources.position_log @@ -196,61 +195,61 @@ private inline fun EntryProviderScope.addNodeDetailS enum class NodeDetailRoute( val title: StringResource, val routeClass: KClass, - val icon: ImageVector?, + val icon: DrawableResource? = null, val screenComposable: @Composable (metricsViewModel: MetricsViewModel, onNavigateUp: () -> Unit) -> Unit, ) { DEVICE( Res.string.device, NodeDetailRoutes.DeviceMetrics::class, - Icons.Rounded.Router, + Res.drawable.ic_router, { metricsVM, onNavigateUp -> DeviceMetricsScreen(metricsVM, onNavigateUp) }, ), POSITION_LOG( Res.string.position_log, NodeDetailRoutes.PositionLog::class, - Icons.Rounded.LocationOn, + Res.drawable.ic_location_on, { metricsVM, onNavigateUp -> PositionLogScreen(metricsVM, onNavigateUp) }, ), ENVIRONMENT( Res.string.environment, NodeDetailRoutes.EnvironmentMetrics::class, - Icons.Rounded.LightMode, + Res.drawable.ic_light_mode, { metricsVM, onNavigateUp -> EnvironmentMetricsScreen(metricsVM, onNavigateUp) }, ), SIGNAL( Res.string.signal, NodeDetailRoutes.SignalMetrics::class, - Icons.Rounded.CellTower, + Res.drawable.ic_cell_tower, { metricsVM, onNavigateUp -> SignalMetricsScreen(metricsVM, onNavigateUp) }, ), TRACEROUTE( Res.string.traceroute, NodeDetailRoutes.TracerouteLog::class, - Icons.Rounded.PermScanWifi, + Res.drawable.ic_perm_scan_wifi, { metricsVM, onNavigateUp -> TracerouteLogScreen(viewModel = metricsVM, onNavigateUp = onNavigateUp) }, ), NEIGHBOR_INFO( Res.string.neighbor_info, NodeDetailRoutes.NeighborInfoLog::class, - Icons.Rounded.Groups, + Res.drawable.ic_groups, { metricsVM, onNavigateUp -> NeighborInfoLogScreen(viewModel = metricsVM, onNavigateUp = onNavigateUp) }, ), POWER( Res.string.power, NodeDetailRoutes.PowerMetrics::class, - Icons.Rounded.Power, + Res.drawable.ic_power, { metricsVM, onNavigateUp -> PowerMetricsScreen(metricsVM, onNavigateUp) }, ), HOST( Res.string.host, NodeDetailRoutes.HostMetricsLog::class, - Icons.Rounded.Memory, - { metricsVM, onNavigateUp -> HostMetricsLogScreen(viewModel = metricsVM, onNavigateUp = onNavigateUp) }, + Res.drawable.ic_memory, + { metricsVM, onNavigateUp -> HostMetricsLogScreen(metricsVM, onNavigateUp) }, ), PAX( Res.string.pax, NodeDetailRoutes.PaxMetrics::class, - Icons.Rounded.People, + Res.drawable.ic_people, { metricsVM, onNavigateUp -> PaxMetricsScreen(metricsVM, onNavigateUp) }, ), } diff --git a/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/SettingsScreen.kt b/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/SettingsScreen.kt index 6cc890098..ac5efad04 100644 --- a/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/SettingsScreen.kt +++ b/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/SettingsScreen.kt @@ -25,8 +25,6 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.padding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Wifi import androidx.compose.material3.Scaffold import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -55,6 +53,8 @@ import org.meshtastic.core.resources.wifi_devices import org.meshtastic.core.ui.component.ListItem import org.meshtastic.core.ui.component.MainAppBar import org.meshtastic.core.ui.component.MeshtasticDialog +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Wifi import org.meshtastic.feature.settings.component.AppInfoSection import org.meshtastic.feature.settings.component.AppearanceSection import org.meshtastic.feature.settings.component.ExpressiveSection @@ -232,7 +232,7 @@ fun SettingsScreen( ) ExpressiveSection(title = stringResource(Res.string.wifi_devices)) { - ListItem(text = stringResource(Res.string.wifi_devices), leadingIcon = Icons.Rounded.Wifi) { + ListItem(text = stringResource(Res.string.wifi_devices), leadingIcon = MeshtasticIcons.Wifi) { onNavigate(WifiProvisionRoutes.WifiProvision()) } } diff --git a/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/AppInfoSection.kt b/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/AppInfoSection.kt index cf953651f..f418212cf 100644 --- a/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/AppInfoSection.kt +++ b/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/AppInfoSection.kt @@ -21,13 +21,6 @@ import android.net.Uri import android.provider.Settings import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.result.contract.ActivityResultContracts -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.rounded.KeyboardArrowRight -import androidx.compose.material.icons.rounded.AppSettingsAlt -import androidx.compose.material.icons.rounded.Info -import androidx.compose.material.icons.rounded.Memory -import androidx.compose.material.icons.rounded.Notifications -import androidx.compose.material.icons.rounded.WavingHand import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue @@ -50,6 +43,13 @@ import org.meshtastic.core.resources.modules_already_unlocked import org.meshtastic.core.resources.modules_unlocked import org.meshtastic.core.resources.system_settings import org.meshtastic.core.ui.component.ListItem +import org.meshtastic.core.ui.icon.AppSettingsAlt +import org.meshtastic.core.ui.icon.Info +import org.meshtastic.core.ui.icon.KeyboardArrowRight +import org.meshtastic.core.ui.icon.Memory +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Notifications +import org.meshtastic.core.ui.icon.WavingHand import org.meshtastic.core.ui.theme.AppTheme import org.meshtastic.core.ui.util.showToast import kotlin.time.Duration.Companion.seconds @@ -70,7 +70,7 @@ fun AppInfoSection( ExpressiveSection(title = stringResource(Res.string.info)) { ListItem( text = stringResource(Res.string.intro_show), - leadingIcon = Icons.Rounded.WavingHand, + leadingIcon = MeshtasticIcons.WavingHand, trailingIcon = null, ) { onShowAppIntro() @@ -78,7 +78,7 @@ fun AppInfoSection( ListItem( text = stringResource(Res.string.app_notifications), - leadingIcon = Icons.Rounded.Notifications, + leadingIcon = MeshtasticIcons.Notifications, trailingIcon = null, ) { val intent = @@ -90,7 +90,7 @@ fun AppInfoSection( ListItem( text = stringResource(Res.string.system_settings), - leadingIcon = Icons.Rounded.AppSettingsAlt, + leadingIcon = MeshtasticIcons.AppSettingsAlt, trailingIcon = null, ) { val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS) @@ -100,8 +100,8 @@ fun AppInfoSection( ListItem( text = stringResource(Res.string.acknowledgements), - leadingIcon = Icons.Rounded.Info, - trailingIcon = Icons.AutoMirrored.Rounded.KeyboardArrowRight, + leadingIcon = MeshtasticIcons.Info, + trailingIcon = MeshtasticIcons.KeyboardArrowRight, ) { onNavigateToAbout() } @@ -137,7 +137,7 @@ private fun AppVersionButton( ListItem( text = stringResource(Res.string.app_version), - leadingIcon = Icons.Rounded.Memory, + leadingIcon = MeshtasticIcons.Memory, supportingText = appVersionName, trailingIcon = null, ) { diff --git a/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/AppearanceSection.kt b/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/AppearanceSection.kt index 48807d8fa..8dbc5507b 100644 --- a/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/AppearanceSection.kt +++ b/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/AppearanceSection.kt @@ -21,10 +21,6 @@ import android.os.Build import android.provider.Settings import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.result.contract.ActivityResultContracts -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.rounded.KeyboardArrowRight -import androidx.compose.material.icons.rounded.FormatPaint -import androidx.compose.material.icons.rounded.Language import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.tooling.preview.Preview @@ -35,6 +31,10 @@ import org.meshtastic.core.resources.app_settings import org.meshtastic.core.resources.preferences_language import org.meshtastic.core.resources.theme import org.meshtastic.core.ui.component.ListItem +import org.meshtastic.core.ui.icon.FormatPaint +import org.meshtastic.core.ui.icon.KeyboardArrowRight +import org.meshtastic.core.ui.icon.Language +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.theme.AppTheme /** Section for app appearance settings like language and theme. */ @@ -51,8 +51,8 @@ fun AppearanceSection(onShowLanguagePicker: () -> Unit, onShowThemePicker: () -> ExpressiveSection(title = stringResource(Res.string.app_settings)) { ListItem( text = stringResource(Res.string.preferences_language), - leadingIcon = Icons.Rounded.Language, - trailingIcon = if (useInAppLangPicker) null else Icons.AutoMirrored.Rounded.KeyboardArrowRight, + leadingIcon = MeshtasticIcons.Language, + trailingIcon = if (useInAppLangPicker) null else MeshtasticIcons.KeyboardArrowRight, ) { if (useInAppLangPicker) { onShowLanguagePicker() @@ -69,7 +69,7 @@ fun AppearanceSection(onShowLanguagePicker: () -> Unit, onShowThemePicker: () -> ListItem( text = stringResource(Res.string.theme), - leadingIcon = Icons.Rounded.FormatPaint, + leadingIcon = MeshtasticIcons.FormatPaint, trailingIcon = null, ) { onShowThemePicker() diff --git a/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/PersistenceSection.kt b/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/PersistenceSection.kt index c22235bd2..cc0ea3710 100644 --- a/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/PersistenceSection.kt +++ b/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/PersistenceSection.kt @@ -20,8 +20,6 @@ import android.content.Intent import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.result.contract.ActivityResultContracts import androidx.appcompat.app.AppCompatActivity.RESULT_OK -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Output import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.tooling.preview.Preview @@ -38,6 +36,8 @@ import org.meshtastic.core.resources.export_data_csv import org.meshtastic.core.resources.save_rangetest import org.meshtastic.core.ui.component.DropDownPreference import org.meshtastic.core.ui.component.ListItem +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Output import org.meshtastic.core.ui.theme.AppTheme import java.text.SimpleDateFormat import java.util.Locale @@ -81,7 +81,7 @@ fun PersistenceSection( ListItem( text = stringResource(Res.string.save_rangetest), - leadingIcon = Icons.Rounded.Output, + leadingIcon = MeshtasticIcons.Output, trailingIcon = null, ) { val intent = @@ -95,7 +95,7 @@ fun PersistenceSection( ListItem( text = stringResource(Res.string.export_data_csv), - leadingIcon = Icons.Rounded.Output, + leadingIcon = MeshtasticIcons.Output, trailingIcon = null, ) { val intent = diff --git a/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/PrivacySection.kt b/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/PrivacySection.kt index cecdc27b8..d7910f2ea 100644 --- a/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/PrivacySection.kt +++ b/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/component/PrivacySection.kt @@ -17,9 +17,6 @@ package org.meshtastic.feature.settings.component import android.Manifest -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.BugReport -import androidx.compose.material.icons.rounded.LocationOn import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.platform.LocalContext @@ -34,6 +31,9 @@ import org.meshtastic.core.resources.app_settings import org.meshtastic.core.resources.location_disabled import org.meshtastic.core.resources.provide_location_to_mesh import org.meshtastic.core.ui.component.SwitchListItem +import org.meshtastic.core.ui.icon.BugReport +import org.meshtastic.core.ui.icon.LocationOn +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.core.ui.theme.AppTheme import org.meshtastic.core.ui.util.showToast @@ -77,14 +77,14 @@ fun PrivacySection( SwitchListItem( text = stringResource(Res.string.analytics_okay), checked = analyticsEnabled, - leadingIcon = Icons.Default.BugReport, + leadingIcon = MeshtasticIcons.BugReport, onClick = onToggleAnalytics, ) } SwitchListItem( text = stringResource(Res.string.provide_location_to_mesh), - leadingIcon = Icons.Rounded.LocationOn, + leadingIcon = MeshtasticIcons.LocationOn, enabled = !isGpsDisabled, checked = provideLocation, onClick = { onToggleLocation(!provideLocation) }, diff --git a/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/radio/component/ExternalNotificationConfigScreen.android.kt b/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/radio/component/ExternalNotificationConfigScreen.android.kt index 611837422..fe5e381f6 100644 --- a/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/radio/component/ExternalNotificationConfigScreen.android.kt +++ b/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/radio/component/ExternalNotificationConfigScreen.android.kt @@ -21,9 +21,6 @@ import android.widget.Toast import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.result.contract.ActivityResultContracts import androidx.compose.foundation.layout.Row -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.FolderOpen -import androidx.compose.material.icons.filled.PlayArrow import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.runtime.Composable @@ -33,6 +30,9 @@ import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.import_label import org.meshtastic.core.resources.play +import org.meshtastic.core.ui.icon.FolderOpen +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.PlayArrow import java.io.File private const val MAX_RINGTONE_SIZE = 230 @@ -67,7 +67,7 @@ actual fun RingtoneTrailingIcon(ringtoneInput: String, onRingtoneImported: (Stri Row { IconButton(onClick = { launcher.launch("*/*") }, enabled = enabled) { - Icon(Icons.Default.FolderOpen, contentDescription = stringResource(Res.string.import_label)) + Icon(MeshtasticIcons.FolderOpen, contentDescription = stringResource(Res.string.import_label)) } IconButton( @@ -89,7 +89,7 @@ actual fun RingtoneTrailingIcon(ringtoneInput: String, onRingtoneImported: (Stri }, enabled = enabled, ) { - Icon(Icons.Default.PlayArrow, contentDescription = stringResource(Res.string.play)) + Icon(MeshtasticIcons.PlayArrow, contentDescription = stringResource(Res.string.play)) } } } diff --git a/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/radio/component/SecurityConfigScreen.android.kt b/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/radio/component/SecurityConfigScreen.android.kt index 82ad76554..96e6890b2 100644 --- a/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/radio/component/SecurityConfigScreen.android.kt +++ b/feature/settings/src/androidMain/kotlin/org/meshtastic/feature/settings/radio/component/SecurityConfigScreen.android.kt @@ -21,8 +21,6 @@ import android.content.Intent import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.result.contract.ActivityResultContracts import androidx.compose.foundation.layout.padding -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.twotone.Warning import androidx.compose.material3.HorizontalDivider import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -39,6 +37,8 @@ import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.export_keys import org.meshtastic.core.resources.export_keys_confirmation import org.meshtastic.core.ui.component.MeshtasticResourceDialog +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Warning import org.meshtastic.feature.settings.radio.RadioConfigViewModel import org.meshtastic.proto.Config @@ -81,7 +81,7 @@ actual fun ExportSecurityConfigButton( modifier = Modifier.padding(horizontal = 8.dp), title = stringResource(Res.string.export_keys), enabled = enabled, - icon = Icons.TwoTone.Warning, + icon = MeshtasticIcons.Warning, onClick = { showEditSecurityConfigDialog = true }, ) } diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/AdministrationScreen.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/AdministrationScreen.kt index d63620ff7..d19387a2e 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/AdministrationScreen.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/AdministrationScreen.kt @@ -39,6 +39,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.model.Node import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.administration @@ -135,7 +136,7 @@ private fun AdminRouteItems( ListItem( enabled = enabled, text = stringResource(route.title), - leadingIcon = route.icon, + leadingIcon = vectorResource(route.icon), leadingIconTint = MaterialTheme.colorScheme.error, textColor = MaterialTheme.colorScheme.error, trailingIcon = null, diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/DeviceConfigurationScreen.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/DeviceConfigurationScreen.kt index 0c3ec91f7..1b522abb6 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/DeviceConfigurationScreen.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/DeviceConfigurationScreen.kt @@ -28,6 +28,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.navigation.Route import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.device_configuration @@ -71,7 +72,7 @@ fun DeviceConfigurationScreen(viewModel: RadioConfigViewModel, onBack: () -> Uni ConfigRoute.deviceConfigRoutes(state.metadata).forEach { ListItem( text = stringResource(it.title), - leadingIcon = it.icon, + leadingIcon = it.icon?.let { res -> vectorResource(res) }, enabled = state.connected && !state.responseState.isWaiting(), ) { onNavigate(it.route) diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/ModuleConfigurationScreen.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/ModuleConfigurationScreen.kt index faf2f792e..7e59bba93 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/ModuleConfigurationScreen.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/ModuleConfigurationScreen.kt @@ -29,6 +29,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.navigation.Route import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.module_settings @@ -86,7 +87,7 @@ fun ModuleConfigurationScreen( modules.forEach { ListItem( text = stringResource(it.title), - leadingIcon = it.icon, + leadingIcon = it.icon?.let { res -> vectorResource(res) }, enabled = state.connected && !state.responseState.isWaiting(), ) { onNavigate(it.route) diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/component/HomoglyphSetting.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/component/HomoglyphSetting.kt index 6184323fa..76b3932ad 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/component/HomoglyphSetting.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/component/HomoglyphSetting.kt @@ -16,20 +16,20 @@ */ package org.meshtastic.feature.settings.component -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Abc import androidx.compose.runtime.Composable import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.use_homoglyph_characters_encoding import org.meshtastic.core.ui.component.SwitchListItem +import org.meshtastic.core.ui.icon.Abc +import org.meshtastic.core.ui.icon.MeshtasticIcons @Composable fun HomoglyphSetting(homoglyphEncodingEnabled: Boolean, onToggle: () -> Unit) { SwitchListItem( text = stringResource(Res.string.use_homoglyph_characters_encoding), checked = homoglyphEncodingEnabled, - leadingIcon = Icons.Default.Abc, + leadingIcon = MeshtasticIcons.Abc, onClick = onToggle, ) } diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/component/NotificationSection.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/component/NotificationSection.kt index 96e848a12..ef628d09d 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/component/NotificationSection.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/component/NotificationSection.kt @@ -16,10 +16,6 @@ */ package org.meshtastic.feature.settings.component -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.rounded.Message -import androidx.compose.material.icons.rounded.BatteryAlert -import androidx.compose.material.icons.rounded.PersonAdd import androidx.compose.runtime.Composable import org.jetbrains.compose.resources.stringResource import org.meshtastic.core.resources.Res @@ -28,6 +24,10 @@ import org.meshtastic.core.resources.meshtastic_low_battery_notifications import org.meshtastic.core.resources.meshtastic_messages_notifications import org.meshtastic.core.resources.meshtastic_new_nodes_notifications import org.meshtastic.core.ui.component.SwitchListItem +import org.meshtastic.core.ui.icon.BatteryAlert +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Message +import org.meshtastic.core.ui.icon.PersonAdd /** * Notification settings section with in-app toggles. Primarily used on platforms without system notification channels. @@ -44,19 +44,19 @@ fun NotificationSection( ExpressiveSection(title = stringResource(Res.string.app_notifications)) { SwitchListItem( text = stringResource(Res.string.meshtastic_messages_notifications), - leadingIcon = Icons.AutoMirrored.Rounded.Message, + leadingIcon = MeshtasticIcons.Message, checked = messagesEnabled, onClick = { onToggleMessages(!messagesEnabled) }, ) SwitchListItem( text = stringResource(Res.string.meshtastic_new_nodes_notifications), - leadingIcon = Icons.Rounded.PersonAdd, + leadingIcon = MeshtasticIcons.PersonAdd, checked = nodeEventsEnabled, onClick = { onToggleNodeEvents(!nodeEventsEnabled) }, ) SwitchListItem( text = stringResource(Res.string.meshtastic_low_battery_notifications), - leadingIcon = Icons.Rounded.BatteryAlert, + leadingIcon = MeshtasticIcons.BatteryAlert, checked = lowBatteryEnabled, onClick = { onToggleLowBattery(!lowBatteryEnabled) }, ) diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/debugging/Debug.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/debugging/Debug.kt index 1316ebb49..3fab5b624 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/debugging/Debug.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/debugging/Debug.kt @@ -30,9 +30,6 @@ import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.text.selection.SelectionContainer -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Delete -import androidx.compose.material.icons.rounded.Settings import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults import androidx.compose.material3.ColorScheme @@ -85,6 +82,9 @@ import org.meshtastic.core.ui.component.CopyIconButton import org.meshtastic.core.ui.component.DropDownPreference import org.meshtastic.core.ui.component.MainAppBar import org.meshtastic.core.ui.component.SwitchPreference +import org.meshtastic.core.ui.icon.Delete +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Settings import org.meshtastic.core.ui.theme.AnnotationColor import org.meshtastic.feature.settings.debugging.DebugViewModel.UiMeshLog import kotlin.time.Instant.Companion.fromEpochMilliseconds @@ -139,7 +139,7 @@ fun DebugScreen(onNavigateUp: () -> Unit, viewModel: DebugViewModel) { onNavigateUp = onNavigateUp, actions = { IconButton(onClick = { showSettings = !showSettings }) { - Icon(imageVector = Icons.Rounded.Settings, contentDescription = null) + Icon(imageVector = MeshtasticIcons.Settings, contentDescription = null) } DebugMenuActions(deleteLogs = { viewModel.requestDeleteAllLogs() }) }, @@ -165,15 +165,16 @@ fun DebugScreen(onNavigateUp: () -> Unit, viewModel: DebugViewModel) { filterMode = filterMode, onFilterModeChange = { filterMode = it }, onExportLogs = { - val format = LocalDateTime.Format { - year() - monthNumber() - day() - char('_') - hour() - minute() - second() - } + val format = + LocalDateTime.Format { + year() + monthNumber() + day() + char('_') + hour() + minute() + second() + } val timestamp = fromEpochMilliseconds(nowMillis).toLocalDateTime(TimeZone.UTC).format(format) val fileName = "meshtastic_debug_$timestamp.txt" @@ -388,7 +389,7 @@ private fun rememberAnnotatedLogMessage(log: UiMeshLog, searchText: String): Ann @Composable fun DebugMenuActions(deleteLogs: () -> Unit, modifier: Modifier = Modifier) { IconButton(onClick = deleteLogs, modifier = modifier.padding(4.dp)) { - Icon(imageVector = Icons.Rounded.Delete, contentDescription = stringResource(Res.string.debug_clear)) + Icon(imageVector = MeshtasticIcons.Delete, contentDescription = stringResource(Res.string.debug_clear)) } } diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/debugging/DebugFilters.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/debugging/DebugFilters.kt index 2429f0abd..ce00ae376 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/debugging/DebugFilters.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/debugging/DebugFilters.kt @@ -28,13 +28,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Clear -import androidx.compose.material.icons.filled.Done -import androidx.compose.material.icons.rounded.Add -import androidx.compose.material.icons.rounded.Clear -import androidx.compose.material.icons.twotone.FilterAlt -import androidx.compose.material.icons.twotone.FilterAltOff import androidx.compose.material3.DropdownMenu import androidx.compose.material3.FilterChip import androidx.compose.material3.Icon @@ -66,6 +59,12 @@ import org.meshtastic.core.resources.debug_filter_preset_title import org.meshtastic.core.resources.debug_filters import org.meshtastic.core.resources.match_all import org.meshtastic.core.resources.match_any +import org.meshtastic.core.ui.icon.Add +import org.meshtastic.core.ui.icon.Clear +import org.meshtastic.core.ui.icon.Done +import org.meshtastic.core.ui.icon.FilterAlt +import org.meshtastic.core.ui.icon.FilterAltOff +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.feature.settings.debugging.DebugViewModel.UiMeshLog @Composable @@ -104,7 +103,7 @@ fun DebugCustomFilterInput( }, enabled = customFilterText.isNotBlank(), ) { - Icon(imageVector = Icons.Rounded.Add, contentDescription = stringResource(Res.string.debug_filter_add)) + Icon(imageVector = MeshtasticIcons.Add, contentDescription = stringResource(Res.string.debug_filter_add)) } } } @@ -117,13 +116,14 @@ fun DebugPresetFilters( onFilterTextsChange: (List) -> Unit, modifier: Modifier = Modifier, ) { - val availableFilters = presetFilters.filter { filter -> - logs.any { log -> - log.logMessage.contains(filter, ignoreCase = true) || - log.messageType.contains(filter, ignoreCase = true) || - log.formattedReceivedDate.contains(filter, ignoreCase = true) + val availableFilters = + presetFilters.filter { filter -> + logs.any { log -> + log.logMessage.contains(filter, ignoreCase = true) || + log.messageType.contains(filter, ignoreCase = true) || + log.formattedReceivedDate.contains(filter, ignoreCase = true) + } } - } Column(modifier = modifier) { Text( text = stringResource(Res.string.debug_filter_preset_title), @@ -151,7 +151,7 @@ fun DebugPresetFilters( leadingIcon = { if (filter in filterTexts) { Icon( - imageVector = Icons.Filled.Done, + imageVector = MeshtasticIcons.Done, contentDescription = stringResource(Res.string.debug_filter_included), ) } @@ -188,9 +188,9 @@ fun DebugFilterBar( Icon( imageVector = if (filterTexts.isNotEmpty()) { - Icons.TwoTone.FilterAlt + MeshtasticIcons.FilterAlt } else { - Icons.TwoTone.FilterAltOff + MeshtasticIcons.FilterAltOff }, contentDescription = stringResource(Res.string.debug_filters), ) @@ -266,7 +266,7 @@ fun DebugActiveFilters( } IconButton(onClick = { onFilterTextsChange(emptyList()) }) { Icon( - imageVector = Icons.Rounded.Clear, + imageVector = MeshtasticIcons.Clear, contentDescription = stringResource(Res.string.debug_filter_clear), ) } @@ -281,8 +281,8 @@ fun DebugActiveFilters( selected = true, onClick = { onFilterTextsChange(filterTexts - filter) }, label = { Text(filter) }, - leadingIcon = { Icon(imageVector = Icons.TwoTone.FilterAlt, contentDescription = null) }, - trailingIcon = { Icon(imageVector = Icons.Filled.Clear, contentDescription = null) }, + leadingIcon = { Icon(imageVector = MeshtasticIcons.FilterAlt, contentDescription = null) }, + trailingIcon = { Icon(imageVector = MeshtasticIcons.Clear, contentDescription = null) }, ) } } diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/debugging/DebugSearch.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/debugging/DebugSearch.kt index 9bb261efa..bbd2c7273 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/debugging/DebugSearch.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/debugging/DebugSearch.kt @@ -27,11 +27,6 @@ import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.outlined.FileDownload -import androidx.compose.material.icons.rounded.Clear -import androidx.compose.material.icons.rounded.KeyboardArrowDown -import androidx.compose.material.icons.rounded.KeyboardArrowUp import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -55,6 +50,11 @@ import org.meshtastic.core.resources.debug_logs_export import org.meshtastic.core.resources.debug_search_clear import org.meshtastic.core.resources.debug_search_next import org.meshtastic.core.resources.debug_search_prev +import org.meshtastic.core.ui.icon.Clear +import org.meshtastic.core.ui.icon.FileDownload +import org.meshtastic.core.ui.icon.KeyboardArrowDown +import org.meshtastic.core.ui.icon.KeyboardArrowUp +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.feature.settings.debugging.DebugViewModel.UiMeshLog import org.meshtastic.feature.settings.debugging.LogSearchManager.SearchState @@ -77,14 +77,14 @@ fun DebugSearchNavigation( ) IconButton(onClick = onPreviousMatch, enabled = searchState.hasMatches, modifier = Modifier.size(32.dp)) { Icon( - imageVector = Icons.Rounded.KeyboardArrowUp, + imageVector = MeshtasticIcons.KeyboardArrowUp, contentDescription = stringResource(Res.string.debug_search_prev), modifier = Modifier.size(16.dp), ) } IconButton(onClick = onNextMatch, enabled = searchState.hasMatches, modifier = Modifier.size(32.dp)) { Icon( - imageVector = Icons.Rounded.KeyboardArrowDown, + imageVector = MeshtasticIcons.KeyboardArrowDown, contentDescription = stringResource(Res.string.debug_search_next), modifier = Modifier.size(16.dp), ) @@ -130,7 +130,7 @@ fun DebugSearchBar( if (searchState.searchText.isNotEmpty()) { IconButton(onClick = onClearSearch, modifier = Modifier.size(32.dp)) { Icon( - imageVector = Icons.Rounded.Clear, + imageVector = MeshtasticIcons.Clear, contentDescription = stringResource(Res.string.debug_search_clear), modifier = Modifier.size(16.dp), ) @@ -186,7 +186,7 @@ fun DebugSearchState( onExportLogs?.let { onExport -> IconButton(onClick = onExport, modifier = Modifier) { Icon( - imageVector = Icons.Outlined.FileDownload, + imageVector = MeshtasticIcons.FileDownload, contentDescription = stringResource(Res.string.debug_logs_export), modifier = Modifier.size(24.dp), ) diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/filter/FilterSettingsScreen.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/filter/FilterSettingsScreen.kt index 0a6b4d814..ab36a1f51 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/filter/FilterSettingsScreen.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/filter/FilterSettingsScreen.kt @@ -25,9 +25,6 @@ import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Add -import androidx.compose.material.icons.rounded.Delete import androidx.compose.material3.Card import androidx.compose.material3.Icon import androidx.compose.material3.IconButton @@ -60,6 +57,9 @@ import org.meshtastic.core.resources.filter_whole_word import org.meshtastic.core.resources.filter_words import org.meshtastic.core.resources.filter_words_summary import org.meshtastic.core.ui.component.MainAppBar +import org.meshtastic.core.ui.icon.Add +import org.meshtastic.core.ui.icon.Delete +import org.meshtastic.core.ui.icon.MeshtasticIcons @Composable fun FilterSettingsScreen(viewModel: FilterSettingsViewModel, onBack: () -> Unit) { @@ -155,7 +155,7 @@ private fun FilterWordsInputCard(newWord: String, onNewWordChange: (String) -> U keyboardActions = KeyboardActions(onDone = { onAddWord() }), ) IconButton(onClick = onAddWord) { - Icon(Icons.Rounded.Add, contentDescription = stringResource(Res.string.add)) + Icon(MeshtasticIcons.Add, contentDescription = stringResource(Res.string.add)) } } } @@ -183,7 +183,7 @@ private fun FilterWordItem(word: String, onRemove: () -> Unit) { ) } IconButton(onClick = onRemove) { - Icon(Icons.Rounded.Delete, contentDescription = stringResource(Res.string.delete)) + Icon(MeshtasticIcons.Delete, contentDescription = stringResource(Res.string.delete)) } } } diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/navigation/ConfigRoute.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/navigation/ConfigRoute.kt index 9c6bb2cc8..e065de627 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/navigation/ConfigRoute.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/navigation/ConfigRoute.kt @@ -16,18 +16,7 @@ */ package org.meshtastic.feature.settings.navigation -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.List -import androidx.compose.material.icons.filled.Bluetooth -import androidx.compose.material.icons.filled.CellTower -import androidx.compose.material.icons.filled.DisplaySettings -import androidx.compose.material.icons.filled.LocationOn -import androidx.compose.material.icons.filled.Person -import androidx.compose.material.icons.filled.Power -import androidx.compose.material.icons.filled.Router -import androidx.compose.material.icons.filled.Security -import androidx.compose.material.icons.filled.Wifi -import androidx.compose.ui.graphics.vector.ImageVector +import org.jetbrains.compose.resources.DrawableResource import org.jetbrains.compose.resources.StringResource import org.meshtastic.core.navigation.Route import org.meshtastic.core.navigation.SettingsRoutes @@ -36,6 +25,16 @@ import org.meshtastic.core.resources.bluetooth import org.meshtastic.core.resources.channels import org.meshtastic.core.resources.device import org.meshtastic.core.resources.display +import org.meshtastic.core.resources.ic_bluetooth +import org.meshtastic.core.resources.ic_cell_tower +import org.meshtastic.core.resources.ic_display_settings +import org.meshtastic.core.resources.ic_list +import org.meshtastic.core.resources.ic_location_on +import org.meshtastic.core.resources.ic_person +import org.meshtastic.core.resources.ic_power +import org.meshtastic.core.resources.ic_router +import org.meshtastic.core.resources.ic_security +import org.meshtastic.core.resources.ic_wifi import org.meshtastic.core.resources.lora import org.meshtastic.core.resources.network import org.meshtastic.core.resources.position @@ -45,40 +44,50 @@ import org.meshtastic.core.resources.user import org.meshtastic.proto.AdminMessage import org.meshtastic.proto.DeviceMetadata -enum class ConfigRoute(val title: StringResource, val route: Route, val icon: ImageVector?, val type: Int = 0) { - USER(Res.string.user, SettingsRoutes.User, Icons.Default.Person, 0), - CHANNELS(Res.string.channels, SettingsRoutes.ChannelConfig, Icons.AutoMirrored.Default.List, 0), - DEVICE(Res.string.device, SettingsRoutes.Device, Icons.Default.Router, AdminMessage.ConfigType.DEVICE_CONFIG.value), +enum class ConfigRoute( + val title: StringResource, + val route: Route, + val icon: DrawableResource? = null, + val type: Int = 0, +) { + USER(Res.string.user, SettingsRoutes.User, Res.drawable.ic_person, 0), + CHANNELS(Res.string.channels, SettingsRoutes.ChannelConfig, Res.drawable.ic_list, 0), + DEVICE( + Res.string.device, + SettingsRoutes.Device, + Res.drawable.ic_router, + AdminMessage.ConfigType.DEVICE_CONFIG.value, + ), POSITION( Res.string.position, SettingsRoutes.Position, - Icons.Default.LocationOn, + Res.drawable.ic_location_on, AdminMessage.ConfigType.POSITION_CONFIG.value, ), - POWER(Res.string.power, SettingsRoutes.Power, Icons.Default.Power, AdminMessage.ConfigType.POWER_CONFIG.value), + POWER(Res.string.power, SettingsRoutes.Power, Res.drawable.ic_power, AdminMessage.ConfigType.POWER_CONFIG.value), NETWORK( Res.string.network, SettingsRoutes.Network, - Icons.Default.Wifi, + Res.drawable.ic_wifi, AdminMessage.ConfigType.NETWORK_CONFIG.value, ), DISPLAY( Res.string.display, SettingsRoutes.Display, - Icons.Default.DisplaySettings, + Res.drawable.ic_display_settings, AdminMessage.ConfigType.DISPLAY_CONFIG.value, ), - LORA(Res.string.lora, SettingsRoutes.LoRa, Icons.Default.CellTower, AdminMessage.ConfigType.LORA_CONFIG.value), + LORA(Res.string.lora, SettingsRoutes.LoRa, Res.drawable.ic_cell_tower, AdminMessage.ConfigType.LORA_CONFIG.value), BLUETOOTH( Res.string.bluetooth, SettingsRoutes.Bluetooth, - Icons.Default.Bluetooth, + Res.drawable.ic_bluetooth, AdminMessage.ConfigType.BLUETOOTH_CONFIG.value, ), SECURITY( Res.string.security, SettingsRoutes.Security, - Icons.Default.Security, + Res.drawable.ic_security, AdminMessage.ConfigType.SECURITY_CONFIG.value, ), ; diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/navigation/ModuleRoute.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/navigation/ModuleRoute.kt index fd7eae24c..350ca77cc 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/navigation/ModuleRoute.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/navigation/ModuleRoute.kt @@ -16,21 +16,7 @@ */ package org.meshtastic.feature.settings.navigation -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.Forward -import androidx.compose.material.icons.automirrored.filled.Message -import androidx.compose.material.icons.automirrored.filled.VolumeUp -import androidx.compose.material.icons.rounded.Cloud -import androidx.compose.material.icons.rounded.DataUsage -import androidx.compose.material.icons.rounded.LightMode -import androidx.compose.material.icons.rounded.Notifications -import androidx.compose.material.icons.rounded.People -import androidx.compose.material.icons.rounded.PermScanWifi -import androidx.compose.material.icons.rounded.Sensors -import androidx.compose.material.icons.rounded.SettingsRemote -import androidx.compose.material.icons.rounded.Speed -import androidx.compose.material.icons.rounded.Usb -import androidx.compose.ui.graphics.vector.ImageVector +import org.jetbrains.compose.resources.DrawableResource import org.jetbrains.compose.resources.StringResource import org.meshtastic.core.model.Capabilities import org.meshtastic.core.navigation.Route @@ -41,6 +27,20 @@ import org.meshtastic.core.resources.audio import org.meshtastic.core.resources.canned_message import org.meshtastic.core.resources.detection_sensor import org.meshtastic.core.resources.external_notification +import org.meshtastic.core.resources.ic_alt_route +import org.meshtastic.core.resources.ic_cloud +import org.meshtastic.core.resources.ic_data_usage +import org.meshtastic.core.resources.ic_light_mode +import org.meshtastic.core.resources.ic_message +import org.meshtastic.core.resources.ic_notifications +import org.meshtastic.core.resources.ic_people +import org.meshtastic.core.resources.ic_perm_scan_wifi +import org.meshtastic.core.resources.ic_sensors +import org.meshtastic.core.resources.ic_settings_remote +import org.meshtastic.core.resources.ic_speed +import org.meshtastic.core.resources.ic_terminal +import org.meshtastic.core.resources.ic_usb +import org.meshtastic.core.resources.ic_volume_up import org.meshtastic.core.resources.mqtt import org.meshtastic.core.resources.neighbor_info import org.meshtastic.core.resources.paxcounter @@ -59,102 +59,102 @@ import org.meshtastic.proto.DeviceMetadata enum class ModuleRoute( val title: StringResource, val route: Route, - val icon: ImageVector?, + val icon: DrawableResource? = null, val type: Int = 0, val isSupported: (Capabilities) -> Boolean = { true }, val isApplicable: (Config.DeviceConfig.Role?) -> Boolean = { true }, ) { - MQTT(Res.string.mqtt, SettingsRoutes.MQTT, Icons.Rounded.Cloud, AdminMessage.ModuleConfigType.MQTT_CONFIG.value), + MQTT(Res.string.mqtt, SettingsRoutes.MQTT, Res.drawable.ic_cloud, AdminMessage.ModuleConfigType.MQTT_CONFIG.value), SERIAL( Res.string.serial, SettingsRoutes.Serial, - Icons.Rounded.Usb, + Res.drawable.ic_usb, AdminMessage.ModuleConfigType.SERIAL_CONFIG.value, ), EXT_NOTIFICATION( Res.string.external_notification, SettingsRoutes.ExtNotification, - Icons.Rounded.Notifications, + Res.drawable.ic_notifications, AdminMessage.ModuleConfigType.EXTNOTIF_CONFIG.value, ), STORE_FORWARD( Res.string.store_forward, SettingsRoutes.StoreForward, - Icons.AutoMirrored.Default.Forward, + Res.drawable.ic_terminal, AdminMessage.ModuleConfigType.STOREFORWARD_CONFIG.value, ), RANGE_TEST( Res.string.range_test, SettingsRoutes.RangeTest, - Icons.Rounded.Speed, + Res.drawable.ic_speed, AdminMessage.ModuleConfigType.RANGETEST_CONFIG.value, ), TELEMETRY( Res.string.telemetry, SettingsRoutes.Telemetry, - Icons.Rounded.DataUsage, + Res.drawable.ic_data_usage, AdminMessage.ModuleConfigType.TELEMETRY_CONFIG.value, ), CANNED_MESSAGE( Res.string.canned_message, SettingsRoutes.CannedMessage, - Icons.AutoMirrored.Default.Message, + Res.drawable.ic_message, AdminMessage.ModuleConfigType.CANNEDMSG_CONFIG.value, ), AUDIO( Res.string.audio, SettingsRoutes.Audio, - Icons.AutoMirrored.Default.VolumeUp, + Res.drawable.ic_volume_up, AdminMessage.ModuleConfigType.AUDIO_CONFIG.value, ), REMOTE_HARDWARE( Res.string.remote_hardware, SettingsRoutes.RemoteHardware, - Icons.Rounded.SettingsRemote, + Res.drawable.ic_settings_remote, AdminMessage.ModuleConfigType.REMOTEHARDWARE_CONFIG.value, ), NEIGHBOR_INFO( Res.string.neighbor_info, SettingsRoutes.NeighborInfo, - Icons.Rounded.People, + Res.drawable.ic_people, AdminMessage.ModuleConfigType.NEIGHBORINFO_CONFIG.value, ), AMBIENT_LIGHTING( Res.string.ambient_lighting, SettingsRoutes.AmbientLighting, - Icons.Rounded.LightMode, + Res.drawable.ic_light_mode, AdminMessage.ModuleConfigType.AMBIENTLIGHTING_CONFIG.value, ), DETECTION_SENSOR( Res.string.detection_sensor, SettingsRoutes.DetectionSensor, - Icons.Rounded.Sensors, + Res.drawable.ic_sensors, AdminMessage.ModuleConfigType.DETECTIONSENSOR_CONFIG.value, ), PAXCOUNTER( Res.string.paxcounter, SettingsRoutes.Paxcounter, - Icons.Rounded.PermScanWifi, + Res.drawable.ic_perm_scan_wifi, AdminMessage.ModuleConfigType.PAXCOUNTER_CONFIG.value, ), STATUS_MESSAGE( Res.string.status_message, SettingsRoutes.StatusMessage, - Icons.AutoMirrored.Default.Message, + Res.drawable.ic_message, AdminMessage.ModuleConfigType.STATUSMESSAGE_CONFIG.value, isSupported = { it.supportsStatusMessage }, ), TRAFFIC_MANAGEMENT( Res.string.traffic_management, SettingsRoutes.TrafficManagement, - Icons.Rounded.Speed, + Res.drawable.ic_alt_route, AdminMessage.ModuleConfigType.TRAFFICMANAGEMENT_CONFIG.value, isSupported = { it.supportsTrafficManagementConfig }, ), TAK( Res.string.tak, SettingsRoutes.TAK, - Icons.Rounded.People, + Res.drawable.ic_people, AdminMessage.ModuleConfigType.TAK_CONFIG.value, isSupported = { it.supportsTakConfig }, isApplicable = { it == Config.DeviceConfig.Role.TAK || it == Config.DeviceConfig.Role.TAK_TRACKER }, diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/RadioConfig.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/RadioConfig.kt index 0ff5326fc..4fb2fa41a 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/RadioConfig.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/RadioConfig.kt @@ -19,28 +19,15 @@ package org.meshtastic.feature.settings.radio import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.padding -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.rounded.KeyboardArrowRight -import androidx.compose.material.icons.rounded.AdminPanelSettings -import androidx.compose.material.icons.rounded.AppSettingsAlt -import androidx.compose.material.icons.rounded.BugReport -import androidx.compose.material.icons.rounded.CleaningServices -import androidx.compose.material.icons.rounded.Download -import androidx.compose.material.icons.rounded.PowerSettingsNew -import androidx.compose.material.icons.rounded.RestartAlt -import androidx.compose.material.icons.rounded.Restore -import androidx.compose.material.icons.rounded.Settings -import androidx.compose.material.icons.rounded.Storage -import androidx.compose.material.icons.rounded.SystemUpdate -import androidx.compose.material.icons.rounded.Upload import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.unit.dp +import org.jetbrains.compose.resources.DrawableResource import org.jetbrains.compose.resources.StringResource import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.navigation.FirmwareRoutes import org.meshtastic.core.navigation.Route import org.meshtastic.core.navigation.SettingsRoutes @@ -54,6 +41,10 @@ import org.meshtastic.core.resources.device_configuration import org.meshtastic.core.resources.export_configuration import org.meshtastic.core.resources.factory_reset import org.meshtastic.core.resources.firmware_update_title +import org.meshtastic.core.resources.ic_power_settings_new +import org.meshtastic.core.resources.ic_restart_alt +import org.meshtastic.core.resources.ic_restore +import org.meshtastic.core.resources.ic_storage import org.meshtastic.core.resources.import_configuration import org.meshtastic.core.resources.message_device_managed import org.meshtastic.core.resources.module_settings @@ -62,6 +53,16 @@ import org.meshtastic.core.resources.radio_configuration import org.meshtastic.core.resources.reboot import org.meshtastic.core.resources.shutdown import org.meshtastic.core.ui.component.ListItem +import org.meshtastic.core.ui.icon.AdminPanelSettings +import org.meshtastic.core.ui.icon.AppSettingsAlt +import org.meshtastic.core.ui.icon.BugReport +import org.meshtastic.core.ui.icon.CleaningServices +import org.meshtastic.core.ui.icon.Download +import org.meshtastic.core.ui.icon.KeyboardArrowRight +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Settings +import org.meshtastic.core.ui.icon.SystemUpdate +import org.meshtastic.core.ui.icon.Upload import org.meshtastic.feature.settings.component.ExpressiveSection import org.meshtastic.feature.settings.navigation.ConfigRoute @@ -101,7 +102,13 @@ private fun RadioConfigSection(isManaged: Boolean, enabled: Boolean, onRouteClic ManagedMessage() } ConfigRoute.radioConfigRoutes.forEach { - ListItem(text = stringResource(it.title), leadingIcon = it.icon, enabled = enabled) { onRouteClick(it) } + ListItem( + text = stringResource(it.title), + leadingIcon = it.icon?.let { res -> vectorResource(res) }, + enabled = enabled, + ) { + onRouteClick(it) + } } } } @@ -114,8 +121,8 @@ private fun DeviceConfigSection(isManaged: Boolean, enabled: Boolean, onNavigate } ListItem( text = stringResource(Res.string.device_configuration), - leadingIcon = Icons.Rounded.AppSettingsAlt, - trailingIcon = Icons.AutoMirrored.Rounded.KeyboardArrowRight, + leadingIcon = MeshtasticIcons.AppSettingsAlt, + trailingIcon = MeshtasticIcons.KeyboardArrowRight, enabled = enabled, ) { onNavigate(SettingsRoutes.DeviceConfiguration) @@ -131,8 +138,8 @@ private fun ModuleSettingsSection(isManaged: Boolean, enabled: Boolean, onNaviga } ListItem( text = stringResource(Res.string.module_settings), - leadingIcon = Icons.Rounded.Settings, - trailingIcon = Icons.AutoMirrored.Rounded.KeyboardArrowRight, + leadingIcon = MeshtasticIcons.Settings, + trailingIcon = MeshtasticIcons.KeyboardArrowRight, enabled = enabled, ) { onNavigate(SettingsRoutes.ModuleConfiguration) @@ -149,13 +156,13 @@ private fun BackupRestoreSection(isManaged: Boolean, enabled: Boolean, onImport: ListItem( text = stringResource(Res.string.import_configuration), - leadingIcon = Icons.Rounded.Download, + leadingIcon = MeshtasticIcons.Download, enabled = enabled, onClick = onImport, ) ListItem( text = stringResource(Res.string.export_configuration), - leadingIcon = Icons.Rounded.Upload, + leadingIcon = MeshtasticIcons.Upload, enabled = enabled, onClick = onExport, ) @@ -167,8 +174,8 @@ private fun AdministrationSection(enabled: Boolean, onNavigate: (Route) -> Unit) ExpressiveSection(title = stringResource(Res.string.administration)) { ListItem( text = stringResource(Res.string.administration), - leadingIcon = Icons.Rounded.AdminPanelSettings, - trailingIcon = Icons.AutoMirrored.Rounded.KeyboardArrowRight, + leadingIcon = MeshtasticIcons.AdminPanelSettings, + trailingIcon = MeshtasticIcons.KeyboardArrowRight, leadingIconTint = MaterialTheme.colorScheme.error, textColor = MaterialTheme.colorScheme.error, trailingIconTint = MaterialTheme.colorScheme.error, @@ -189,7 +196,7 @@ private fun AdvancedSection(isManaged: Boolean, isOtaCapable: Boolean, enabled: if (isOtaCapable) { ListItem( text = stringResource(Res.string.firmware_update_title), - leadingIcon = Icons.Rounded.SystemUpdate, + leadingIcon = MeshtasticIcons.SystemUpdate, enabled = enabled, onClick = { onNavigate(FirmwareRoutes.FirmwareUpdate) }, ) @@ -197,25 +204,25 @@ private fun AdvancedSection(isManaged: Boolean, isOtaCapable: Boolean, enabled: ListItem( text = stringResource(Res.string.clean_node_database_title), - leadingIcon = Icons.Rounded.CleaningServices, + leadingIcon = MeshtasticIcons.CleaningServices, enabled = enabled, onClick = { onNavigate(SettingsRoutes.CleanNodeDb) }, ) ListItem( text = stringResource(Res.string.debug_panel), - leadingIcon = Icons.Rounded.BugReport, + leadingIcon = MeshtasticIcons.BugReport, enabled = enabled, onClick = { onNavigate(SettingsRoutes.DebugPanel) }, ) } } -enum class AdminRoute(val icon: ImageVector, val title: StringResource) { - REBOOT(Icons.Rounded.RestartAlt, Res.string.reboot), - SHUTDOWN(Icons.Rounded.PowerSettingsNew, Res.string.shutdown), - FACTORY_RESET(Icons.Rounded.Restore, Res.string.factory_reset), - NODEDB_RESET(Icons.Rounded.Storage, Res.string.nodedb_reset), +enum class AdminRoute(val icon: DrawableResource, val title: StringResource) { + REBOOT(Res.drawable.ic_restart_alt, Res.string.reboot), + SHUTDOWN(Res.drawable.ic_power_settings_new, Res.string.shutdown), + FACTORY_RESET(Res.drawable.ic_restore, Res.string.factory_reset), + NODEDB_RESET(Res.drawable.ic_storage, Res.string.nodedb_reset), } @Composable diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/ChannelConfigScreen.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/ChannelConfigScreen.kt index b50a8e312..650898747 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/ChannelConfigScreen.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/ChannelConfigScreen.kt @@ -29,8 +29,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.rememberLazyListState -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.twotone.Add import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon import androidx.compose.material3.Scaffold @@ -64,6 +62,8 @@ import org.meshtastic.core.ui.component.PreferenceFooter import org.meshtastic.core.ui.component.dragContainer import org.meshtastic.core.ui.component.dragDropItemsIndexed import org.meshtastic.core.ui.component.rememberDragDropState +import org.meshtastic.core.ui.icon.Add +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.feature.settings.radio.RadioConfigViewModel import org.meshtastic.feature.settings.radio.ResponseState import org.meshtastic.feature.settings.radio.channel.component.ChannelCard @@ -182,7 +182,7 @@ private fun ChannelConfigScreen( }, modifier = Modifier.padding(16.dp), ) { - Icon(Icons.TwoTone.Add, stringResource(Res.string.add)) + Icon(MeshtasticIcons.Add, stringResource(Res.string.add)) } } }, diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/ChannelScreen.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/ChannelScreen.kt index 55ca713fe..0a943a70b 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/ChannelScreen.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/ChannelScreen.kt @@ -30,9 +30,6 @@ import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.ChevronRight -import androidx.compose.material.icons.twotone.QrCodeScanner import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Icon @@ -88,6 +85,9 @@ import org.meshtastic.core.ui.component.MainAppBar import org.meshtastic.core.ui.component.MeshtasticDialog import org.meshtastic.core.ui.component.PreferenceFooter import org.meshtastic.core.ui.component.QrDialog +import org.meshtastic.core.ui.icon.ChevronRight +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.QrCode import org.meshtastic.core.ui.qr.ScannedQrCodeDialog import org.meshtastic.core.ui.util.rememberQrCodePainter import org.meshtastic.core.ui.util.rememberShowToastResource @@ -353,7 +353,7 @@ private fun ChannelListView( second = { Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { Button(onClick = onClickShare, modifier = Modifier.padding(16.dp), enabled = enabled) { - Icon(imageVector = Icons.TwoTone.QrCodeScanner, contentDescription = null) + Icon(imageVector = MeshtasticIcons.QrCode, contentDescription = null) Spacer(modifier = Modifier.width(8.dp)) Text(text = stringResource(Res.string.generate_qr_code)) } @@ -378,7 +378,7 @@ private fun ModemPresetInfo(modemPresetName: String, onClick: () -> Unit) { } Spacer(modifier = Modifier.width(16.dp)) Icon( - imageVector = Icons.Rounded.ChevronRight, + imageVector = MeshtasticIcons.ChevronRight, contentDescription = stringResource(Res.string.navigate_into_label), modifier = Modifier.padding(end = 16.dp), ) diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/component/ChannelCard.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/component/ChannelCard.kt index 71dd10fe2..b01809291 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/component/ChannelCard.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/component/ChannelCard.kt @@ -20,18 +20,19 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.wrapContentSize -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.twotone.Close import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.delete import org.meshtastic.core.ui.component.ChannelItem import org.meshtastic.core.ui.component.SecurityIcon +import org.meshtastic.core.ui.icon.Close +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.proto.ChannelSettings import org.meshtastic.proto.Config @@ -48,21 +49,21 @@ internal fun ChannelCard( ) = ChannelItem(index = index, title = title, enabled = enabled, onClick = onEditClick) { if (sharesLocation) { Icon( - imageVector = ChannelIcons.LOCATION.icon, + imageVector = vectorResource(ChannelIcons.LOCATION.icon), contentDescription = stringResource(ChannelIcons.LOCATION.descriptionResId), modifier = Modifier.wrapContentSize().padding(horizontal = 5.dp), ) } if (channelSettings.uplink_enabled) { Icon( - imageVector = ChannelIcons.UPLINK.icon, + imageVector = vectorResource(ChannelIcons.UPLINK.icon), contentDescription = stringResource(ChannelIcons.UPLINK.descriptionResId), modifier = Modifier.wrapContentSize().padding(horizontal = 5.dp), ) } if (channelSettings.downlink_enabled) { Icon( - imageVector = ChannelIcons.DOWNLINK.icon, + imageVector = vectorResource(ChannelIcons.DOWNLINK.icon), contentDescription = stringResource(ChannelIcons.DOWNLINK.descriptionResId), modifier = Modifier.wrapContentSize().padding(horizontal = 5.dp), ) @@ -71,7 +72,7 @@ internal fun ChannelCard( Spacer(modifier = Modifier.width(10.dp)) IconButton(onClick = { onDeleteClick() }) { Icon( - imageVector = Icons.TwoTone.Close, + imageVector = MeshtasticIcons.Close, contentDescription = stringResource(Res.string.delete), modifier = Modifier.wrapContentSize(), ) diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/component/ChannelLegend.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/component/ChannelLegend.kt index dd51cd82d..99085ec1b 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/component/ChannelLegend.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/channel/component/ChannelLegend.kt @@ -24,11 +24,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.CloudDownload -import androidx.compose.material.icons.filled.CloudUpload -import androidx.compose.material.icons.filled.Info -import androidx.compose.material.icons.filled.LocationOn import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -36,15 +31,19 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.unit.dp +import org.jetbrains.compose.resources.DrawableResource import org.jetbrains.compose.resources.StringResource import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource import org.meshtastic.core.model.Capabilities import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.channel_features import org.meshtastic.core.resources.downlink_enabled import org.meshtastic.core.resources.downlink_feature_description +import org.meshtastic.core.resources.ic_cloud_download +import org.meshtastic.core.resources.ic_cloud_upload +import org.meshtastic.core.resources.ic_location_on import org.meshtastic.core.resources.icon_meanings import org.meshtastic.core.resources.info import org.meshtastic.core.resources.location_sharing @@ -59,6 +58,8 @@ import org.meshtastic.core.resources.security_icon_help_dismiss import org.meshtastic.core.resources.uplink_enabled import org.meshtastic.core.resources.uplink_feature_description import org.meshtastic.core.ui.component.MeshtasticDialog +import org.meshtastic.core.ui.icon.Info +import org.meshtastic.core.ui.icon.MeshtasticIcons @Composable internal fun ChannelLegend(onClick: () -> Unit) { @@ -67,7 +68,7 @@ internal fun ChannelLegend(onClick: () -> Unit) { horizontalArrangement = Arrangement.SpaceEvenly, ) { Row { - Icon(imageVector = Icons.Filled.Info, contentDescription = stringResource(Res.string.info)) + Icon(imageVector = MeshtasticIcons.Info, contentDescription = stringResource(Res.string.info)) Text( text = stringResource(Res.string.primary), color = MaterialTheme.colorScheme.primary, @@ -83,22 +84,22 @@ internal fun ChannelLegend(onClick: () -> Unit) { } internal enum class ChannelIcons( - val icon: ImageVector, + val icon: DrawableResource, val descriptionResId: StringResource, val additionalInfoResId: StringResource, ) { LOCATION( - icon = Icons.Filled.LocationOn, + icon = Res.drawable.ic_location_on, descriptionResId = Res.string.location_sharing, additionalInfoResId = Res.string.periodic_position_broadcast, ), UPLINK( - icon = Icons.Filled.CloudUpload, + icon = Res.drawable.ic_cloud_upload, descriptionResId = Res.string.uplink_enabled, additionalInfoResId = Res.string.uplink_feature_description, ), DOWNLINK( - icon = Icons.Filled.CloudDownload, + icon = Res.drawable.ic_cloud_download, descriptionResId = Res.string.downlink_enabled, additionalInfoResId = Res.string.downlink_feature_description, ), @@ -157,7 +158,7 @@ private fun IconDefinitions() { Text(text = stringResource(Res.string.icon_meanings), style = MaterialTheme.typography.titleLarge) ChannelIcons.entries.forEach { icon -> Row(verticalAlignment = Alignment.CenterVertically) { - Icon(imageVector = icon.icon, contentDescription = stringResource(icon.descriptionResId)) + Icon(imageVector = vectorResource(icon.icon), contentDescription = stringResource(icon.descriptionResId)) Column(modifier = Modifier.padding(start = 16.dp)) { Text(text = stringResource(icon.descriptionResId), style = MaterialTheme.typography.titleMedium) Text(text = stringResource(icon.additionalInfoResId), style = MaterialTheme.typography.bodyMedium) diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/DeviceConfigScreen.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/DeviceConfigScreen.kt index ee2dc19fb..472d4279e 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/DeviceConfigScreen.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/DeviceConfigScreen.kt @@ -25,9 +25,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Clear -import androidx.compose.material.icons.rounded.PhoneAndroid import androidx.compose.material3.AlertDialog import androidx.compose.material3.CardDefaults import androidx.compose.material3.Checkbox @@ -109,7 +106,9 @@ import org.meshtastic.core.ui.component.EditTextPreference import org.meshtastic.core.ui.component.InsetDivider import org.meshtastic.core.ui.component.SwitchPreference import org.meshtastic.core.ui.component.TitledCard +import org.meshtastic.core.ui.icon.Clear import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.PhoneAndroid import org.meshtastic.core.ui.icon.role import org.meshtastic.core.ui.util.annotatedStringFromHtml import org.meshtastic.feature.settings.radio.RadioConfigViewModel @@ -270,7 +269,7 @@ fun DeviceConfigScreenCommon(viewModel: RadioConfigViewModel, onBack: () -> Unit onValueChanged = { formState.value = formState.value.copy(tzdef = it) }, trailingIcon = { IconButton(onClick = { formState.value = formState.value.copy(tzdef = "") }) { - Icon(imageVector = Icons.Rounded.Clear, contentDescription = null) + Icon(imageVector = MeshtasticIcons.Clear, contentDescription = null) } }, ) @@ -283,7 +282,7 @@ fun DeviceConfigScreenCommon(viewModel: RadioConfigViewModel, onBack: () -> Unit shape = RectangleShape, onClick = { formState.value = formState.value.copy(tzdef = appTzPosixString) }, ) { - Icon(imageVector = Icons.Rounded.PhoneAndroid, contentDescription = null) + Icon(imageVector = MeshtasticIcons.PhoneAndroid, contentDescription = null) Spacer(modifier = Modifier.width(8.dp)) diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/PacketResponseStateDialog.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/PacketResponseStateDialog.kt index ec8cb798d..18d79e08f 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/PacketResponseStateDialog.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/PacketResponseStateDialog.kt @@ -22,9 +22,6 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.CheckCircle -import androidx.compose.material.icons.filled.Error import androidx.compose.material3.Icon import androidx.compose.material3.LinearProgressIndicator import androidx.compose.material3.MaterialTheme @@ -46,6 +43,9 @@ import org.meshtastic.core.resources.delivery_confirmed import org.meshtastic.core.resources.delivery_confirmed_reboot_warning import org.meshtastic.core.resources.error import org.meshtastic.core.ui.component.MeshtasticDialog +import org.meshtastic.core.ui.icon.Error +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Success import org.meshtastic.feature.settings.radio.ResponseState private const val AUTO_DISMISS_DELAY_MS = 1500L @@ -135,7 +135,7 @@ private fun LoadingContent(state: ResponseState.Loading, onComplete: () -> Unit) @Composable private fun SuccessContent() { Icon( - imageVector = Icons.Filled.CheckCircle, + imageVector = MeshtasticIcons.Success, contentDescription = null, modifier = Modifier.size(84.dp), tint = MaterialTheme.colorScheme.primary, @@ -158,7 +158,7 @@ private fun SuccessContent() { @Composable private fun ErrorContent(state: ResponseState.Error) { Icon( - imageVector = Icons.Filled.Error, + imageVector = MeshtasticIcons.Error, contentDescription = null, modifier = Modifier.size(84.dp), tint = MaterialTheme.colorScheme.error, diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/SecurityConfigScreen.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/SecurityConfigScreen.kt index 94e25df9b..cbc09f1be 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/SecurityConfigScreen.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/SecurityConfigScreen.kt @@ -18,8 +18,6 @@ package org.meshtastic.feature.settings.radio.component import androidx.compose.foundation.layout.padding import androidx.compose.foundation.text.KeyboardActions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.twotone.Warning import androidx.compose.material3.CardDefaults import androidx.compose.material3.HorizontalDivider import androidx.compose.runtime.Composable @@ -63,6 +61,8 @@ import org.meshtastic.core.ui.component.EditListPreference import org.meshtastic.core.ui.component.MeshtasticResourceDialog import org.meshtastic.core.ui.component.SwitchPreference import org.meshtastic.core.ui.component.TitledCard +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Warning import org.meshtastic.feature.settings.radio.RadioConfigViewModel import org.meshtastic.proto.Config import kotlin.random.Random @@ -150,7 +150,7 @@ fun SecurityConfigScreenCommon(viewModel: RadioConfigViewModel, onBack: () -> Un modifier = Modifier.padding(horizontal = 8.dp), title = stringResource(Res.string.regenerate_private_key), enabled = state.connected, - icon = Icons.TwoTone.Warning, + icon = MeshtasticIcons.Warning, onClick = { showKeyGenerationDialog = true }, ) ExportSecurityConfigButton( diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/ShutdownConfirmationDialog.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/ShutdownConfirmationDialog.kt index f99b31055..29c0745ca 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/ShutdownConfirmationDialog.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/ShutdownConfirmationDialog.kt @@ -21,8 +21,6 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Warning import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -39,6 +37,8 @@ import org.meshtastic.core.resources.send import org.meshtastic.core.resources.shutdown_node_name import org.meshtastic.core.resources.shutdown_warning import org.meshtastic.core.ui.component.MeshtasticDialog +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Warning @Composable fun ShutdownConfirmationDialog( @@ -46,14 +46,15 @@ fun ShutdownConfirmationDialog( node: Node?, onDismiss: () -> Unit, isShutdown: Boolean = true, - icon: ImageVector? = Icons.Rounded.Warning, + icon: ImageVector? = null, onConfirm: () -> Unit, ) { val nodeLongName = node?.user?.long_name ?: "Unknown Node" + val resolvedIcon = icon ?: MeshtasticIcons.Warning MeshtasticDialog( onDismiss = onDismiss, - icon = icon, + icon = resolvedIcon, title = title, text = { ShutdownDialogContent(nodeLongName = nodeLongName, isShutdown = isShutdown) }, confirmText = stringResource(Res.string.send), diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/StatusMessageConfigItemList.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/StatusMessageConfigItemList.kt index a81867265..8a9f4d66d 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/StatusMessageConfigItemList.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/StatusMessageConfigItemList.kt @@ -18,8 +18,6 @@ package org.meshtastic.feature.settings.radio.component import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Clear import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.runtime.Composable @@ -38,6 +36,8 @@ import org.meshtastic.core.resources.status_message import org.meshtastic.core.resources.status_message_config import org.meshtastic.core.ui.component.EditTextPreference import org.meshtastic.core.ui.component.TitledCard +import org.meshtastic.core.ui.icon.Clear +import org.meshtastic.core.ui.icon.MeshtasticIcons import org.meshtastic.feature.settings.radio.RadioConfigViewModel @Composable @@ -90,7 +90,7 @@ fun StatusMessageConfigScreen(viewModel: RadioConfigViewModel, onBack: () -> Uni if (formState.value.node_status.isNotEmpty()) { IconButton(onClick = { formState.value = formState.value.copy(node_status = "") }) { Icon( - imageVector = Icons.Default.Clear, + imageVector = MeshtasticIcons.Clear, contentDescription = stringResource(Res.string.clear), ) } diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/TAKConfigItemList.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/TAKConfigItemList.kt index 714513e7d..0e3c9058d 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/TAKConfigItemList.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/TAKConfigItemList.kt @@ -16,8 +16,6 @@ */ package org.meshtastic.feature.settings.radio.component -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Share import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.IconButton @@ -42,6 +40,8 @@ import org.meshtastic.core.takserver.TAKDataPackageGenerator import org.meshtastic.core.ui.component.DropDownPreference import org.meshtastic.core.ui.component.SwitchPreference import org.meshtastic.core.ui.component.TitledCard +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Share import org.meshtastic.feature.settings.radio.RadioConfigViewModel import org.meshtastic.feature.settings.tak.TakPermissionHandler import org.meshtastic.feature.settings.tak.rememberDataPackageExporter @@ -74,7 +74,7 @@ fun TAKConfigScreen(viewModel: RadioConfigViewModel, onBack: () -> Unit) { onBack = onBack, actions = { IconButton(onClick = { exportLauncher("Meshtastic_TAK_Server.zip") }) { - Icon(imageVector = Icons.Default.Share, contentDescription = "Export TAK Data Package") + Icon(imageVector = MeshtasticIcons.Share, contentDescription = "Export TAK Data Package") } }, configState = formState, diff --git a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/WarningDialog.kt b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/WarningDialog.kt index 6a3575a19..bdca0a46d 100644 --- a/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/WarningDialog.kt +++ b/feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/WarningDialog.kt @@ -16,8 +16,6 @@ */ package org.meshtastic.feature.settings.radio.component -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Warning import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector import org.jetbrains.compose.resources.stringResource @@ -25,18 +23,22 @@ import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.cancel import org.meshtastic.core.resources.send import org.meshtastic.core.ui.component.MeshtasticDialog +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Warning @Composable fun WarningDialog( - icon: ImageVector? = Icons.Rounded.Warning, + icon: ImageVector? = null, title: String, text: @Composable () -> Unit = {}, onDismiss: () -> Unit, onConfirm: () -> Unit, ) { + val resolvedIcon = icon ?: MeshtasticIcons.Warning + MeshtasticDialog( onDismiss = onDismiss, - icon = icon, + icon = resolvedIcon, title = title, text = text, confirmText = stringResource(Res.string.send), diff --git a/feature/settings/src/jvmMain/kotlin/org/meshtastic/feature/settings/DesktopSettingsScreen.kt b/feature/settings/src/jvmMain/kotlin/org/meshtastic/feature/settings/DesktopSettingsScreen.kt index b4b0fdee7..21cb3b09f 100644 --- a/feature/settings/src/jvmMain/kotlin/org/meshtastic/feature/settings/DesktopSettingsScreen.kt +++ b/feature/settings/src/jvmMain/kotlin/org/meshtastic/feature/settings/DesktopSettingsScreen.kt @@ -23,13 +23,6 @@ import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.rounded.KeyboardArrowRight -import androidx.compose.material.icons.rounded.FormatPaint -import androidx.compose.material.icons.rounded.Info -import androidx.compose.material.icons.rounded.Language -import androidx.compose.material.icons.rounded.Memory -import androidx.compose.material.icons.rounded.Wifi import androidx.compose.material3.Scaffold import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -66,6 +59,13 @@ import org.meshtastic.core.ui.component.DropDownPreference import org.meshtastic.core.ui.component.ListItem import org.meshtastic.core.ui.component.MainAppBar import org.meshtastic.core.ui.component.MeshtasticDialog +import org.meshtastic.core.ui.icon.FormatPaint +import org.meshtastic.core.ui.icon.Info +import org.meshtastic.core.ui.icon.KeyboardArrowRight +import org.meshtastic.core.ui.icon.Language +import org.meshtastic.core.ui.icon.Memory +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Wifi import org.meshtastic.core.ui.util.rememberShowToastResource import org.meshtastic.feature.settings.component.ExpressiveSection import org.meshtastic.feature.settings.component.HomoglyphSetting @@ -166,7 +166,7 @@ fun DesktopSettingsScreen( ExpressiveSection(title = stringResource(Res.string.app_settings)) { ListItem( text = stringResource(Res.string.theme), - leadingIcon = Icons.Rounded.FormatPaint, + leadingIcon = MeshtasticIcons.FormatPaint, trailingIcon = null, ) { showThemePickerDialog = true @@ -174,7 +174,7 @@ fun DesktopSettingsScreen( ListItem( text = stringResource(Res.string.preferences_language), - leadingIcon = Icons.Rounded.Language, + leadingIcon = MeshtasticIcons.Language, trailingIcon = null, ) { showLanguagePickerDialog = true @@ -201,7 +201,7 @@ fun DesktopSettingsScreen( } ExpressiveSection(title = stringResource(Res.string.wifi_devices)) { - ListItem(text = stringResource(Res.string.wifi_devices), leadingIcon = Icons.Rounded.Wifi) { + ListItem(text = stringResource(Res.string.wifi_devices), leadingIcon = MeshtasticIcons.Wifi) { onNavigate(WifiProvisionRoutes.WifiProvision()) } } @@ -237,8 +237,8 @@ private fun DesktopAppInfoSection( ExpressiveSection(title = stringResource(Res.string.info)) { ListItem( text = stringResource(Res.string.acknowledgements), - leadingIcon = Icons.Rounded.Info, - trailingIcon = Icons.AutoMirrored.Rounded.KeyboardArrowRight, + leadingIcon = MeshtasticIcons.Info, + trailingIcon = MeshtasticIcons.KeyboardArrowRight, ) { onNavigateToAbout() } @@ -274,7 +274,7 @@ private fun DesktopAppVersionButton( ListItem( text = stringResource(Res.string.app_version), - leadingIcon = Icons.Rounded.Memory, + leadingIcon = MeshtasticIcons.Memory, supportingText = appVersionName, trailingIcon = null, ) { diff --git a/feature/wifi-provision/src/commonMain/kotlin/org/meshtastic/feature/wifiprovision/ui/ProvisionStatusCard.kt b/feature/wifi-provision/src/commonMain/kotlin/org/meshtastic/feature/wifiprovision/ui/ProvisionStatusCard.kt index a2ad7cfe9..c2c39b3ca 100644 --- a/feature/wifi-provision/src/commonMain/kotlin/org/meshtastic/feature/wifiprovision/ui/ProvisionStatusCard.kt +++ b/feature/wifi-provision/src/commonMain/kotlin/org/meshtastic/feature/wifiprovision/ui/ProvisionStatusCard.kt @@ -21,9 +21,6 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.CheckCircle -import androidx.compose.material.icons.rounded.Error import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi @@ -41,6 +38,9 @@ import org.meshtastic.core.resources.Res import org.meshtastic.core.resources.wifi_provision_sending_credentials import org.meshtastic.core.resources.wifi_provision_status_applied import org.meshtastic.core.resources.wifi_provision_status_failed +import org.meshtastic.core.ui.icon.Error +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Success import org.meshtastic.feature.wifiprovision.WifiProvisionUiState.ProvisionStatus /** Inline status card matching the web flasher's colored status feedback. */ @@ -86,9 +86,9 @@ private fun StatusIcon(provisionStatus: ProvisionStatus, isProvisioning: Boolean when { isProvisioning -> LoadingIndicator(modifier = Modifier.size(20.dp), color = tint) provisionStatus == ProvisionStatus.Success -> - Icon(Icons.Rounded.CheckCircle, contentDescription = null, modifier = Modifier.size(20.dp), tint = tint) + Icon(MeshtasticIcons.Success, contentDescription = null, modifier = Modifier.size(20.dp), tint = tint) provisionStatus == ProvisionStatus.Failed -> - Icon(Icons.Rounded.Error, contentDescription = null, modifier = Modifier.size(20.dp), tint = tint) + Icon(MeshtasticIcons.Error, contentDescription = null, modifier = Modifier.size(20.dp), tint = tint) } } diff --git a/feature/wifi-provision/src/commonMain/kotlin/org/meshtastic/feature/wifiprovision/ui/WifiProvisionScreen.kt b/feature/wifi-provision/src/commonMain/kotlin/org/meshtastic/feature/wifiprovision/ui/WifiProvisionScreen.kt index ced6d212c..20b54825e 100644 --- a/feature/wifi-provision/src/commonMain/kotlin/org/meshtastic/feature/wifiprovision/ui/WifiProvisionScreen.kt +++ b/feature/wifi-provision/src/commonMain/kotlin/org/meshtastic/feature/wifiprovision/ui/WifiProvisionScreen.kt @@ -43,13 +43,6 @@ import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.ArrowBack -import androidx.compose.material.icons.rounded.Bluetooth -import androidx.compose.material.icons.rounded.Lock -import androidx.compose.material.icons.rounded.Visibility -import androidx.compose.material.icons.rounded.VisibilityOff -import androidx.compose.material.icons.rounded.Wifi import androidx.compose.material3.Button import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults @@ -117,6 +110,13 @@ import org.meshtastic.core.resources.wifi_provision_ssid_label import org.meshtastic.core.resources.wifi_provision_ssid_placeholder import org.meshtastic.core.resources.wifi_provisioning import org.meshtastic.core.ui.component.AutoLinkText +import org.meshtastic.core.ui.icon.ArrowBack +import org.meshtastic.core.ui.icon.Bluetooth +import org.meshtastic.core.ui.icon.Lock +import org.meshtastic.core.ui.icon.MeshtasticIcons +import org.meshtastic.core.ui.icon.Visibility +import org.meshtastic.core.ui.icon.VisibilityOff +import org.meshtastic.core.ui.icon.Wifi import org.meshtastic.feature.wifiprovision.WifiProvisionError import org.meshtastic.feature.wifiprovision.WifiProvisionUiState import org.meshtastic.feature.wifiprovision.WifiProvisionUiState.Phase @@ -156,7 +156,7 @@ fun WifiProvisionScreen( title = { Text(stringResource(Res.string.wifi_provisioning)) }, navigationIcon = { IconButton(onClick = onNavigateUp) { - Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = stringResource(Res.string.back)) + Icon(MeshtasticIcons.ArrowBack, contentDescription = stringResource(Res.string.back)) } }, ) @@ -251,7 +251,7 @@ internal fun ScanningBleContent() { internal fun DeviceFoundContent(deviceName: String?, onProceed: () -> Unit, onCancel: () -> Unit) { CenteredStatusContent { Icon( - Icons.Rounded.Bluetooth, + MeshtasticIcons.Bluetooth, contentDescription = null, modifier = Modifier.size(64.dp), tint = MaterialTheme.colorScheme.primary, @@ -344,7 +344,7 @@ internal fun ConnectedContent( if (isScanning) { LoadingIndicator(modifier = Modifier.size(18.dp)) } else { - Icon(Icons.Rounded.Wifi, contentDescription = null, modifier = Modifier.size(18.dp)) + Icon(MeshtasticIcons.Wifi, contentDescription = null, modifier = Modifier.size(18.dp)) } Spacer(Modifier.width(8.dp)) Text( @@ -416,7 +416,8 @@ internal fun ConnectedContent( trailingIcon = { IconButton(onClick = { passwordVisible = !passwordVisible }) { Icon( - imageVector = if (passwordVisible) Icons.Rounded.VisibilityOff else Icons.Rounded.Visibility, + imageVector = + if (passwordVisible) MeshtasticIcons.VisibilityOff else MeshtasticIcons.Visibility, contentDescription = if (passwordVisible) { stringResource(Res.string.hide_password) @@ -453,7 +454,7 @@ internal fun ConnectedContent( Spacer(Modifier.width(8.dp)) Text(stringResource(Res.string.wifi_provision_sending_credentials)) } else { - Icon(Icons.Rounded.Wifi, contentDescription = null, modifier = Modifier.size(18.dp)) + Icon(MeshtasticIcons.Wifi, contentDescription = null, modifier = Modifier.size(18.dp)) Spacer(Modifier.width(8.dp)) Text(stringResource(Res.string.apply)) } @@ -474,12 +475,12 @@ internal fun NetworkRow(network: WifiNetwork, isSelected: Boolean, onClick: () - headlineContent = { Text(network.ssid) }, supportingContent = { Text(stringResource(Res.string.wifi_provision_signal_strength, network.signalStrength)) }, leadingContent = { - Icon(Icons.Rounded.Wifi, contentDescription = null, tint = MaterialTheme.colorScheme.onSurfaceVariant) + Icon(MeshtasticIcons.Wifi, contentDescription = null, tint = MaterialTheme.colorScheme.onSurfaceVariant) }, trailingContent = { if (network.isProtected) { Icon( - Icons.Rounded.Lock, + MeshtasticIcons.Lock, contentDescription = stringResource(Res.string.password), tint = MaterialTheme.colorScheme.onSurfaceVariant, ) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f703591cf..1b9b55692 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -121,7 +121,7 @@ androidx-work-testing = { module = "androidx.work:work-testing", version = "2.11 # AndroidX Compose androidx-compose-bom = { module = "androidx.compose:compose-bom", version = "2026.03.01" } -androidx-compose-material-iconsExtended = { module = "androidx.compose.material:material-icons-extended" } +androidx-compose-material-iconsExtended = { module = "androidx.compose.material:material-icons-extended" } # Only used by deprecated mesh_service_example — remove when that module is deleted androidx-compose-material3 = { module = "androidx.compose.material3:material3" } androidx-compose-runtime = { module = "androidx.compose.runtime:runtime" } androidx-compose-runtime-tracing = { module = "androidx.compose.runtime:runtime-tracing", version.ref = "androidxTracing" } @@ -140,7 +140,7 @@ compose-multiplatform-ui-tooling = { module = "org.jetbrains.compose.ui:ui-tooli compose-multiplatform-ui-tooling-preview = { module = "org.jetbrains.compose.ui:ui-tooling-preview", version.ref = "compose-multiplatform" } compose-multiplatform-resources = { module = "org.jetbrains.compose.components:components-resources", version.ref = "compose-multiplatform" } compose-multiplatform-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "compose-multiplatform-material3" } -compose-multiplatform-materialIconsExtended = { module = "org.jetbrains.compose.material:material-icons-extended", version = "1.7.3" } # last published; deprecated upstream + # JetBrains Material 3 Adaptive (multiplatform — Android, Desktop, iOS) jetbrains-compose-material3-adaptive = { module = "org.jetbrains.compose.material3.adaptive:adaptive", version.ref = "jetbrains-adaptive" } diff --git a/mesh_service_example/src/main/kotlin/com/meshtastic/android/meshserviceexample/MainScreen.kt b/mesh_service_example/src/main/kotlin/com/meshtastic/android/meshserviceexample/MainScreen.kt index 96024bf0f..8e19bcd72 100644 --- a/mesh_service_example/src/main/kotlin/com/meshtastic/android/meshserviceexample/MainScreen.kt +++ b/mesh_service_example/src/main/kotlin/com/meshtastic/android/meshserviceexample/MainScreen.kt @@ -39,10 +39,10 @@ import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.rounded.BatteryUnknown import androidx.compose.material.icons.automirrored.rounded.Message import androidx.compose.material.icons.automirrored.rounded.Send import androidx.compose.material.icons.rounded.AccountCircle +import androidx.compose.material.icons.rounded.BatteryUnknown import androidx.compose.material.icons.rounded.ExpandLess import androidx.compose.material.icons.rounded.ExpandMore import androidx.compose.material.icons.rounded.GpsFixed @@ -483,12 +483,7 @@ private fun NodeItemActions(isOnline: Boolean, onAction: (String) -> Unit) { Icon(Icons.Rounded.Route, "Traceroute", Modifier.size(20.dp), MaterialTheme.colorScheme.primary) } IconButton(onClick = { onAction("telemetry") }, modifier = Modifier.size(40.dp)) { - Icon( - Icons.AutoMirrored.Rounded.BatteryUnknown, - "Telemetry", - Modifier.size(20.dp), - MaterialTheme.colorScheme.secondary, - ) + Icon(Icons.Rounded.BatteryUnknown, "Telemetry", Modifier.size(20.dp), MaterialTheme.colorScheme.secondary) } IconButton(onClick = { onAction("position") }, modifier = Modifier.size(40.dp)) { Icon(Icons.Rounded.MyLocation, "Position", Modifier.size(20.dp), MaterialTheme.colorScheme.tertiary)