-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Background** This PR adds new designed icons to remote-controls **Changes** - Add designed icons **Test plan** - Open infrared remotes and see new icons in setup and remotes
- Loading branch information
1 parent
e0bf5ec
commit eb5e3e0
Showing
79 changed files
with
1,529 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
152 changes: 75 additions & 77 deletions
152
...ote-controls/core-ui/src/main/kotlin/com/flipperdevices/ifrmvp/core/ui/ext/IconTypeExt.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,82 @@ | ||
package com.flipperdevices.ifrmvp.core.ui.ext | ||
|
||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.automirrored.filled.Logout | ||
import androidx.compose.material.icons.automirrored.filled.Reply | ||
import androidx.compose.material.icons.automirrored.filled.VolumeDown | ||
import androidx.compose.material.icons.automirrored.filled.VolumeOff | ||
import androidx.compose.material.icons.automirrored.filled.VolumeUp | ||
import androidx.compose.material.icons.filled.Air | ||
import androidx.compose.material.icons.filled.Brightness2 | ||
import androidx.compose.material.icons.filled.Brightness5 | ||
import androidx.compose.material.icons.filled.CameraAlt | ||
import androidx.compose.material.icons.filled.Delete | ||
import androidx.compose.material.icons.filled.Eject | ||
import androidx.compose.material.icons.filled.EmergencyRecording | ||
import androidx.compose.material.icons.filled.EnergySavingsLeaf | ||
import androidx.compose.material.icons.filled.Favorite | ||
import androidx.compose.material.icons.filled.Fireplace | ||
import androidx.compose.material.icons.filled.Light | ||
import androidx.compose.material.icons.filled.LiveTv | ||
import androidx.compose.material.icons.filled.LockReset | ||
import androidx.compose.material.icons.filled.Logout | ||
import androidx.compose.material.icons.filled.Menu | ||
import androidx.compose.material.icons.filled.Mode | ||
import androidx.compose.material.icons.filled.MoreHoriz | ||
import androidx.compose.material.icons.filled.Pause | ||
import androidx.compose.material.icons.filled.PlayArrow | ||
import androidx.compose.material.icons.filled.PowerOff | ||
import androidx.compose.material.icons.filled.SettingsPower | ||
import androidx.compose.material.icons.filled.SevereCold | ||
import androidx.compose.material.icons.filled.SkipNext | ||
import androidx.compose.material.icons.filled.SkipPrevious | ||
import androidx.compose.material.icons.filled.Stop | ||
import androidx.compose.material.icons.filled.Timer | ||
import androidx.compose.material.icons.filled.VolumeDown | ||
import androidx.compose.material.icons.filled.VolumeUp | ||
import androidx.compose.material.icons.filled.WindPower | ||
import androidx.compose.material.icons.filled.ZoomIn | ||
import androidx.compose.material.icons.filled.ZoomOut | ||
import androidx.compose.material.icons.outlined.Home | ||
import androidx.compose.material.icons.outlined.Info | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.graphics.vector.rememberVectorPainter | ||
import androidx.compose.ui.res.painterResource | ||
import com.flipperdevices.ifrmvp.model.buttondata.IconButtonData | ||
import com.flipperdevices.remotecontrols.core.ui.R as RemoteControlsR | ||
|
||
@Suppress("CyclomaticComplexMethod") | ||
@Suppress("CyclomaticComplexMethod", "LongMethod") | ||
@Composable | ||
fun IconButtonData.IconType.asPainter() = when (this) { | ||
IconButtonData.IconType.BACK -> rememberVectorPainter(Icons.AutoMirrored.Filled.Reply) | ||
IconButtonData.IconType.HOME -> rememberVectorPainter(Icons.Outlined.Home) | ||
IconButtonData.IconType.INFO -> rememberVectorPainter(Icons.Outlined.Info) | ||
IconButtonData.IconType.MORE -> rememberVectorPainter(Icons.Filled.MoreHoriz) | ||
IconButtonData.IconType.MUTE -> rememberVectorPainter(Icons.AutoMirrored.Filled.VolumeOff) | ||
IconButtonData.IconType.POWER -> rememberVectorPainter(Icons.Default.SettingsPower) | ||
IconButtonData.IconType.COOL -> rememberVectorPainter(Icons.Default.SevereCold) | ||
IconButtonData.IconType.HEAT -> rememberVectorPainter(Icons.Default.Fireplace) | ||
IconButtonData.IconType.FAN -> rememberVectorPainter(Icons.Default.Air) | ||
IconButtonData.IconType.CAMERA -> rememberVectorPainter(Icons.Default.CameraAlt) | ||
IconButtonData.IconType.BRIGHT_MORE -> rememberVectorPainter(Icons.Default.Brightness2) | ||
IconButtonData.IconType.BRIGHT_LESS -> rememberVectorPainter(Icons.Default.Brightness5) | ||
IconButtonData.IconType.PAUSE -> rememberVectorPainter(Icons.Default.Pause) | ||
IconButtonData.IconType.PLAY -> rememberVectorPainter(Icons.Default.PlayArrow) | ||
IconButtonData.IconType.STOP -> rememberVectorPainter(Icons.Default.Stop) | ||
IconButtonData.IconType.ENERGY_SAVE -> rememberVectorPainter(Icons.Default.EnergySavingsLeaf) | ||
IconButtonData.IconType.EXIT -> rememberVectorPainter(Icons.AutoMirrored.Filled.Logout) | ||
IconButtonData.IconType.MENU -> rememberVectorPainter(Icons.Default.Menu) | ||
IconButtonData.IconType.ZOOM_IN -> rememberVectorPainter(Icons.Default.ZoomIn) | ||
IconButtonData.IconType.ZOOM_OUT -> rememberVectorPainter(Icons.Default.ZoomOut) | ||
IconButtonData.IconType.RESET -> rememberVectorPainter(Icons.Default.LockReset) | ||
IconButtonData.IconType.NEXT -> rememberVectorPainter(Icons.Default.SkipNext) | ||
IconButtonData.IconType.PREVIOUS -> rememberVectorPainter(Icons.Default.SkipPrevious) | ||
IconButtonData.IconType.EJECT -> rememberVectorPainter(Icons.Default.Eject) | ||
IconButtonData.IconType.RECORD -> rememberVectorPainter(Icons.Default.EmergencyRecording) | ||
IconButtonData.IconType.WIND_SPEED -> rememberVectorPainter(Icons.Default.WindPower) | ||
IconButtonData.IconType.MODE -> rememberVectorPainter(Icons.Default.Mode) | ||
IconButtonData.IconType.LIGHT -> rememberVectorPainter(Icons.Default.Light) | ||
IconButtonData.IconType.TIMER -> rememberVectorPainter(Icons.Default.Timer) | ||
IconButtonData.IconType.OFF -> rememberVectorPainter(Icons.Default.PowerOff) | ||
IconButtonData.IconType.DELETE -> rememberVectorPainter(Icons.Default.Delete) | ||
IconButtonData.IconType.LIVE_TV -> rememberVectorPainter(Icons.Default.LiveTv) | ||
IconButtonData.IconType.FAVORITE -> rememberVectorPainter(Icons.Default.Favorite) | ||
IconButtonData.IconType.VOL_UP -> rememberVectorPainter(Icons.AutoMirrored.Filled.VolumeUp) | ||
IconButtonData.IconType.VOL_DOWN -> rememberVectorPainter(Icons.AutoMirrored.Filled.VolumeDown) | ||
} | ||
IconButtonData.IconType.BACK -> RemoteControlsR.drawable.ic_rc_back | ||
IconButtonData.IconType.HOME -> RemoteControlsR.drawable.ic_rc_home | ||
IconButtonData.IconType.INFO -> RemoteControlsR.drawable.ic_rc_info | ||
IconButtonData.IconType.MORE -> RemoteControlsR.drawable.ic_rc_more_points | ||
IconButtonData.IconType.MUTE -> RemoteControlsR.drawable.ic_rc_mute | ||
IconButtonData.IconType.POWER -> RemoteControlsR.drawable.ic_rc_pwr | ||
IconButtonData.IconType.COOL -> RemoteControlsR.drawable.ic_rc_cool | ||
IconButtonData.IconType.HEAT -> RemoteControlsR.drawable.ic_rc_heat_add | ||
IconButtonData.IconType.CAMERA -> RemoteControlsR.drawable.ic_rc_shutter | ||
IconButtonData.IconType.BRIGHT_MORE -> RemoteControlsR.drawable.ic_rc_brightness_up | ||
IconButtonData.IconType.BRIGHT_LESS -> RemoteControlsR.drawable.ic_rc_brightness_down | ||
IconButtonData.IconType.PAUSE -> RemoteControlsR.drawable.ic_rc_pause | ||
IconButtonData.IconType.PLAY -> RemoteControlsR.drawable.ic_rc_play | ||
IconButtonData.IconType.STOP -> RemoteControlsR.drawable.ic_rc_stop | ||
IconButtonData.IconType.ENERGY_SAVE -> RemoteControlsR.drawable.ic_rc_energy_save_eco | ||
IconButtonData.IconType.EXIT -> RemoteControlsR.drawable.ic_rc_exit | ||
IconButtonData.IconType.MENU -> RemoteControlsR.drawable.ic_rc_menu | ||
IconButtonData.IconType.ZOOM_IN -> RemoteControlsR.drawable.ic_rc_zoom_up | ||
IconButtonData.IconType.ZOOM_OUT -> RemoteControlsR.drawable.ic_rc_zoom_down | ||
IconButtonData.IconType.RESET -> RemoteControlsR.drawable.ic_rc_reset | ||
IconButtonData.IconType.NEXT -> RemoteControlsR.drawable.ic_rc_next | ||
IconButtonData.IconType.PREVIOUS -> RemoteControlsR.drawable.ic_rc_previous | ||
IconButtonData.IconType.EJECT -> RemoteControlsR.drawable.ic_rc_eject | ||
IconButtonData.IconType.RECORD -> RemoteControlsR.drawable.ic_rc_record | ||
IconButtonData.IconType.WIND_SPEED -> RemoteControlsR.drawable.ic_rc_wind_speed | ||
IconButtonData.IconType.MODE -> RemoteControlsR.drawable.ic_rc_mode | ||
IconButtonData.IconType.LIGHT -> RemoteControlsR.drawable.ic_rc_light | ||
IconButtonData.IconType.TIMER -> RemoteControlsR.drawable.ic_rc_timer | ||
IconButtonData.IconType.DELETE -> RemoteControlsR.drawable.ic_rc_delete | ||
IconButtonData.IconType.LIVE_TV -> RemoteControlsR.drawable.ic_rc_live_tv | ||
IconButtonData.IconType.FAVORITE -> RemoteControlsR.drawable.ic_rc_favorite | ||
IconButtonData.IconType.VOL_UP -> RemoteControlsR.drawable.ic_rc_vol_up | ||
IconButtonData.IconType.VOL_DOWN -> RemoteControlsR.drawable.ic_rc_vol_down | ||
IconButtonData.IconType.ADD_PLUS_MORE -> RemoteControlsR.drawable.ic_rc_add_plus_more | ||
IconButtonData.IconType.AUX -> RemoteControlsR.drawable.ic_rc_aux | ||
IconButtonData.IconType.CH_DOWN -> RemoteControlsR.drawable.ic_rc_ch_down | ||
IconButtonData.IconType.CH_UP -> RemoteControlsR.drawable.ic_rc_ch_up | ||
IconButtonData.IconType.COLD_WIND -> RemoteControlsR.drawable.ic_rc_cold_wind | ||
IconButtonData.IconType.DOWN -> RemoteControlsR.drawable.ic_rc_down | ||
IconButtonData.IconType.FAN_HIGH -> RemoteControlsR.drawable.ic_rc_fan_high | ||
IconButtonData.IconType.FAN_MEDIUM -> RemoteControlsR.drawable.ic_rc_fan_medium | ||
IconButtonData.IconType.FAN_LOW -> RemoteControlsR.drawable.ic_rc_fan_low | ||
IconButtonData.IconType.FAN_OFF -> RemoteControlsR.drawable.ic_rc_fan_off | ||
IconButtonData.IconType.FAN_SPEED -> RemoteControlsR.drawable.ic_rc_fan_speed | ||
IconButtonData.IconType.FAN_SPEED_DOWN -> RemoteControlsR.drawable.ic_rc_fan_speed_down | ||
IconButtonData.IconType.FAN_SPEED_UP -> RemoteControlsR.drawable.ic_rc_fan_speed_up | ||
IconButtonData.IconType.FAR -> RemoteControlsR.drawable.ic_rc_far | ||
IconButtonData.IconType.FOCUS_LESS -> RemoteControlsR.drawable.ic_rc_focus_less | ||
IconButtonData.IconType.FOCUS_MORE -> RemoteControlsR.drawable.ic_rc_focus_more | ||
IconButtonData.IconType.FORWARD -> RemoteControlsR.drawable.ic_rc_forw_forward | ||
IconButtonData.IconType.HEAT_ADD -> RemoteControlsR.drawable.ic_rc_heat_add | ||
IconButtonData.IconType.HEAT_REDUCE -> RemoteControlsR.drawable.ic_rc_heat_reduce | ||
IconButtonData.IconType.LEFT -> RemoteControlsR.drawable.ic_rc_left | ||
IconButtonData.IconType.NEAR -> RemoteControlsR.drawable.ic_rc_near | ||
IconButtonData.IconType.OK -> RemoteControlsR.drawable.ic_rc_ok | ||
IconButtonData.IconType.OSCILLATE -> RemoteControlsR.drawable.ic_rc_oscillate | ||
IconButtonData.IconType.REMOVE_MINUS_LESS -> RemoteControlsR.drawable.ic_rc_remove_minus_less | ||
IconButtonData.IconType.REWIND -> RemoteControlsR.drawable.ic_rc_rew_rewind | ||
IconButtonData.IconType.RIGHT -> RemoteControlsR.drawable.ic_rc_right | ||
IconButtonData.IconType.SETTINGS -> RemoteControlsR.drawable.ic_rc_set_settings | ||
IconButtonData.IconType.SHAKE_WIND -> RemoteControlsR.drawable.ic_rc_shake_wind | ||
IconButtonData.IconType.SLEEP -> RemoteControlsR.drawable.ic_rc_sleep | ||
IconButtonData.IconType.SWING -> RemoteControlsR.drawable.ic_rc_swing | ||
IconButtonData.IconType.TEMPERATURE_DOWN -> RemoteControlsR.drawable.ic_rc_temperature_down | ||
IconButtonData.IconType.TEMPERATURE_UP -> RemoteControlsR.drawable.ic_rc_temperature_up | ||
IconButtonData.IconType.TIMER_ADD -> RemoteControlsR.drawable.ic_rc_timer_add | ||
IconButtonData.IconType.TIMER_REDUCE -> RemoteControlsR.drawable.ic_rc_timer_reduce | ||
IconButtonData.IconType.TV -> RemoteControlsR.drawable.ic_rc_tv | ||
IconButtonData.IconType.UP -> RemoteControlsR.drawable.ic_rc_up | ||
IconButtonData.IconType.VOD -> RemoteControlsR.drawable.ic_rc_vod | ||
IconButtonData.IconType.WIND_TYPE -> RemoteControlsR.drawable.ic_rc_wind_type | ||
}.let { painterResource(it) } |
Oops, something went wrong.