Skip to content

Commit

Permalink
Feature/icons fix (#1638)
Browse files Browse the repository at this point in the history
* Removing hardcoded blue styling for media picker indicator

* Proper styling of media picker buttons

* Normalising arrow icons

* Tweaks
  • Loading branch information
ThomasSession authored Aug 22, 2024
1 parent fa39545 commit 8deb21c
Show file tree
Hide file tree
Showing 53 changed files with 95 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ fun CellButtons(
}
LargeItemButton(
R.string.delete,
R.drawable.ic_message_details__trash,
R.drawable.ic_delete,
colors = dangerButtonColors(),
onClick = onDelete
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ class KeyboardPageSearchView @JvmOverloads constructor(
fun showRequested(): Boolean = state == State.SHOW_REQUESTED

fun enableBackNavigation(enable: Boolean = true) {
navButton.setImageResource(if (enable) R.drawable.ic_arrow_left_24 else R.drawable.ic_search_24)
navButton.setImageResource(if (enable) R.drawable.ic_arrow_left else R.drawable.ic_search_24)
if (enable) {
navButton.setImageResource(R.drawable.ic_arrow_left_24)
navButton.setImageResource(R.drawable.ic_arrow_left)
navButton.setOnClickListener { callbacks?.onNavigationClicked() }
} else {
navButton.setImageResource(R.drawable.ic_search_24)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
}
LargeItemButton(R.string.activity_settings_help_button, R.drawable.ic_help, Modifier.contentDescription(R.string.AccessibilityId_help)) { show<HelpSettingsActivity>() }
Divider()
LargeItemButton(R.string.activity_settings_clear_all_data_button_title, R.drawable.ic_message_details__trash, Modifier.contentDescription(R.string.AccessibilityId_clear_data), dangerButtonColors()) { ClearAllDataDialog().show(supportFragmentManager, "Clear All Data Dialog") }
LargeItemButton(R.string.activity_settings_clear_all_data_button_title, R.drawable.ic_delete, Modifier.contentDescription(R.string.AccessibilityId_clear_data), dangerButtonColors()) { ClearAllDataDialog().show(supportFragmentManager, "Clear All Data Dialog") }
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fun AppBarText(title: String) {
fun AppBarBackIcon(onBack: () -> Unit) {
IconButton(onClick = onBack) {
Icon(
painter = painterResource(id = R.drawable.ic_baseline_arrow_back_24),
painter = painterResource(id = R.drawable.ic_arrow_left),
contentDescription = stringResource(R.string.back)
)
}
Expand Down
Binary file removed app/src/main/res/drawable-hdpi/ic_arrow_right.png
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/drawable-hdpi/ic_select_off.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-hdpi/ic_select_on.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/drawable-mdpi/ic_arrow_right.png
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/drawable-mdpi/ic_select_off.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-mdpi/ic_select_on.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xhdpi/ic_arrow_right.png
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/drawable-xhdpi/ic_select_off.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xhdpi/ic_select_on.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxhdpi/ic_arrow_right.png
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxhdpi/ic_select_off.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxhdpi/ic_select_on.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxxhdpi/ic_arrow_right.png
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxxhdpi/ic_select_off.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxxhdpi/ic_select_on.png
Binary file not shown.
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_arrow_left.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="50"
android:viewportHeight="50">
<path
android:pathData="M34.425,36.527L19.159,24.147L34.753,11.491C34.947,11.342 35.111,11.152 35.236,10.933C35.361,10.714 35.443,10.471 35.479,10.217C35.515,9.963 35.504,9.704 35.446,9.455C35.387,9.206 35.284,8.972 35.14,8.767C34.996,8.562 34.816,8.39 34.61,8.261C34.404,8.132 34.176,8.049 33.939,8.016C33.702,7.983 33.462,8.001 33.232,8.07C33.002,8.139 32.787,8.256 32.6,8.416L15.545,22.254C15.363,22.406 15.208,22.592 15.09,22.804C15.007,22.888 14.93,22.978 14.86,23.074C14.574,23.482 14.451,23.995 14.517,24.501C14.584,25.006 14.834,25.463 15.212,25.77L32.268,39.609C32.455,39.762 32.668,39.873 32.896,39.937C33.123,40.001 33.36,40.016 33.593,39.982C33.826,39.947 34.05,39.863 34.252,39.735C34.455,39.607 34.632,39.437 34.773,39.235C34.916,39.032 35.02,38.802 35.079,38.556C35.139,38.311 35.153,38.055 35.121,37.803C35.089,37.552 35.011,37.31 34.891,37.091C34.772,36.872 34.614,36.68 34.425,36.527Z"
android:fillColor="?android:textColorPrimary"/>
</vector>
10 changes: 0 additions & 10 deletions app/src/main/res/drawable/ic_arrow_left_24.xml

This file was deleted.

9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_arrow_right.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="50"
android:viewportHeight="50">
<path
android:pathData="M15.575,11.473L30.841,23.853L15.247,36.509C15.053,36.658 14.889,36.848 14.764,37.067C14.639,37.286 14.557,37.529 14.521,37.783C14.484,38.037 14.496,38.296 14.554,38.545C14.613,38.794 14.717,39.028 14.86,39.233C15.003,39.438 15.184,39.61 15.39,39.739C15.596,39.868 15.824,39.951 16.061,39.984C16.298,40.017 16.538,39.999 16.768,39.93C16.998,39.861 17.212,39.744 17.4,39.584L34.455,25.746C34.637,25.594 34.792,25.408 34.91,25.196C34.993,25.112 35.07,25.022 35.14,24.926C35.426,24.518 35.549,24.005 35.482,23.499C35.416,22.994 35.166,22.537 34.787,22.23L17.732,8.391C17.545,8.238 17.331,8.127 17.104,8.063C16.877,7.999 16.64,7.983 16.407,8.018C16.174,8.053 15.95,8.137 15.748,8.265C15.545,8.393 15.368,8.563 15.227,8.766C15.084,8.968 14.98,9.198 14.921,9.444C14.861,9.689 14.847,9.945 14.879,10.197C14.911,10.448 14.99,10.69 15.109,10.909C15.228,11.128 15.386,11.32 15.575,11.473Z"
android:fillColor="#000000"/>
</vector>
11 changes: 0 additions & 11 deletions app/src/main/res/drawable/ic_baseline_arrow_back_24.xml

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_delete.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="32dp"
android:height="32dp"
android:viewportWidth="32"
android:viewportHeight="32">
<path
android:pathData="M11.165,26.962H20.827C22.7,26.962 23.523,26.037 23.812,24.174L25.284,9.692L23.521,9.768L22.057,24.071C21.925,24.916 21.499,25.256 20.744,25.256H11.256C10.486,25.256 10.067,24.916 9.943,24.071L8.478,9.768L6.715,9.692L8.187,24.174C8.469,26.044 9.299,26.962 11.165,26.962ZM6.818,10.644H25.183C26.419,10.644 27.13,9.853 27.13,8.627V7.296C27.13,6.071 26.419,5.28 25.183,5.28H6.818C5.63,5.28 4.869,6.071 4.869,7.296V8.627C4.869,9.853 5.584,10.644 6.818,10.644ZM7.168,9.021C6.75,9.021 6.568,8.831 6.568,8.412V7.51C6.568,7.091 6.75,6.902 7.168,6.902H24.839C25.256,6.902 25.431,7.091 25.431,7.51V8.412C25.431,8.831 25.256,9.021 24.839,9.021H7.168Z"
android:fillColor="#FF3A3A"/>
</vector>
9 changes: 0 additions & 9 deletions app/src/main/res/drawable/ic_message_details__trash.xml

This file was deleted.

9 changes: 2 additions & 7 deletions app/src/main/res/drawable/media_camera_button_background.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/core_grey_45">
<item android:id="@+id/mask">
<shape>
<corners android:radius="1000dp" />
<solid android:color="@color/white" />
</shape>
</item>
<item>
<shape android:shape="oval">
<solid android:color="@color/core_white" />
<solid android:color="?backgroundSecondary" />
<stroke android:color="?elementBorderColor" android:width="1dp" />
</shape>
</item>
</ripple>
10 changes: 5 additions & 5 deletions app/src/main/res/drawable/media_count_button_background.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/transparent_white_40">
<item android:id="@+id/mask">

<item>
<shape>
<corners android:radius="1000dp" />
<solid android:color="@color/white" />
<solid android:color="?backgroundSecondary" />
<stroke android:color="?elementBorderColor" android:width="1dp" />
</shape>
</item>
<item android:drawable="@drawable/pill" />
</ripple>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1000dp" />
<solid android:color="@color/core_white" />
<solid android:color="?colorAccent" />
</shape>
6 changes: 6 additions & 0 deletions app/src/main/res/drawable/media_selected_indicator_off.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="oval"
xmlns:android="http://schemas.android.com/apk/res/android">

<stroke android:width="1dp" android:color="?android:textColorPrimary"/>
</shape>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/media_selected_indicator_on.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="oval"
xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?accentColor" />
</shape>
5 changes: 0 additions & 5 deletions app/src/main/res/drawable/pill.xml

This file was deleted.

1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_conversation_v2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@+id/conversationRecyclerView"
app:layout_constraintStart_toStartOf="parent"
android:theme="@style/Widget.Session.ActionBar.Flat"
android:background="?colorPrimary"
app:contentInsetStart="0dp">

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_webrtc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
android:elevation="8dp"
android:layout_marginLeft="@dimen/small_spacing"
android:layout_marginTop="@dimen/small_spacing"
android:src="@drawable/ic_baseline_arrow_back_24"
android:src="@drawable/ic_arrow_left"
android:scaleType="centerInside"
android:layout_width="@dimen/medium_profile_picture_size"
android:layout_height="@dimen/medium_profile_picture_size"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_create_group.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
android:clickable="true"
android:contentDescription="@string/new_conversation_dialog_back_button_content_description"
android:focusable="true"
android:src="@drawable/ic_arrow_left_24"
android:src="@drawable/ic_arrow_left"
app:layout_constraintBottom_toBottomOf="@id/titleText"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/titleText"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_join_community.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
android:layout_marginStart="@dimen/medium_spacing"
android:clickable="true"
android:focusable="true"
android:src="@drawable/ic_arrow_left_24"
android:src="@drawable/ic_arrow_left"
app:layout_constraintBottom_toBottomOf="@id/titleText"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/titleText"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/media_preview_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:theme="@style/Widget.Session.ActionBar"/>

</com.google.android.material.appbar.AppBarLayout>

Expand Down
31 changes: 18 additions & 13 deletions app/src/main/res/layout/mediapicker_media_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,20 @@
android:layout_height="match_parent"
android:background="@color/transparent_black_90" />

<FrameLayout
android:id="@+id/mediapicker_select_off"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right|end"
android:padding="6dp"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:layout_width="@dimen/small_radial_size"
android:layout_height="@dimen/small_radial_size"
android:src="@drawable/media_selected_indicator_off" />
</FrameLayout>

<FrameLayout
android:id="@+id/mediapicker_select_on"
android:layout_width="wrap_content"
Expand All @@ -59,29 +73,20 @@
tools:visibility="visible">

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_select_on" />
android:layout_width="@dimen/small_radial_size"
android:layout_height="@dimen/small_radial_size"
android:src="@drawable/media_selected_indicator_on" />

<TextView
android:id="@+id/mediapicker_select_order"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="@color/core_white"
android:textColor="?colorPrimary"
android:textSize="14dp"
android:gravity="center"
tools:text="3"/>

</FrameLayout>

<ImageView
android:id="@+id/mediapicker_select_off"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right|end"
android:padding="6dp"
android:src="@drawable/ic_select_off"
android:visibility="gone" />

</FrameLayout>
15 changes: 9 additions & 6 deletions app/src/main/res/layout/mediasend_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
android:layout_marginBottom="32dp"
android:layout_marginEnd="32dp"
android:layout_gravity="bottom|end"
android:padding="8dp"
android:paddingStart="8dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingEnd="4dp"
android:gravity="center"
android:orientation="horizontal"
android:background="@drawable/media_count_button_background"
Expand All @@ -37,15 +40,15 @@
android:paddingBottom="2dp"
android:gravity="center"
android:background="@drawable/media_count_number_background"
android:textColor="?colorAccent"
android:textColor="?colorPrimary"
android:textSize="18sp"
tools:text="3" />


<ImageView
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginStart="2dp"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="@dimen/medium_spacing"
android:src="@drawable/ic_arrow_right"
app:tint="@color/core_white"/>

Expand All @@ -60,7 +63,7 @@
android:layout_gravity="bottom|start"
android:padding="12dp"
android:src="@drawable/ic_camera_filled_24"
app:tint="@color/core_grey_60"
app:tint="?android:textColorPrimary"
android:background="@drawable/media_camera_button_background"
android:elevation="4dp"
android:visibility="gone"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_baseline_arrow_back_24"
android:src="@drawable/ic_arrow_left"
android:alpha="0.5"/>

</FrameLayout>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/view_conversation_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:layout_gravity="center"
android:alpha="0.6"
android:visibility="gone"
android:src="@drawable/ic_baseline_keyboard_arrow_left_24dp"
android:src="@drawable/ic_arrow_left"
app:tint="?android:textColorPrimary"
tools:visibility="visible" />

Expand Down Expand Up @@ -48,7 +48,7 @@
android:layout_gravity="center"
android:alpha="0.6"
android:visibility="gone"
android:src="@drawable/ic_baseline_keyboard_arrow_right_24dp"
android:src="@drawable/ic_arrow_right"
app:tint="?android:textColorPrimary"
tools:visibility="visible" />

Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/view_input_bar_recording.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@

<ImageView
android:id="@+id/inputBarChevronImageView"
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/ic_keyboard_arrow_left_grey600_24dp"
android:layout_width="12dp"
android:layout_height="12dp"
android:src="@drawable/ic_arrow_left"
android:layout_marginTop="1dp"
app:tint="?android:textColorPrimary"
android:alpha="0.6" />
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
<!-- Session -->
<style name="Widget.Session.ActionBar" parent="Widget.AppCompat.Light.ActionBar.Solid">
<item name="android:background">?colorPrimary</item>
<item name="android:elevation">1dp</item>
<item name="elevation">1dp</item>
<item name="titleTextStyle">@style/TextAppearance.Session.DarkActionBar.TitleTextStyle</item>
<item name="homeAsUpIndicator">@drawable/ic_arrow_left</item>
<item name="android:homeAsUpIndicator">@drawable/ic_arrow_left</item>
</style>

<style name="Widget.Session.ActionBar.Flat">
<item name="android:elevation">0dp</item>
<item name="elevation">0dp</item>
<item name="homeAsUpIndicator">@drawable/ic_arrow_left</item>
<item name="android:homeAsUpIndicator">@drawable/ic_arrow_left</item>
</style>

<style name="TextAppearance.Session.DarkActionBar.TitleTextStyle" parent="TextAppearance.AppCompat.Widget.ActionBar.Title">
Expand Down

0 comments on commit 8deb21c

Please sign in to comment.