Feature/icons fix (#1638)

* Removing hardcoded blue styling for media picker indicator

* Proper styling of media picker buttons

* Normalising arrow icons

* Tweaks
This commit is contained in:
ThomasSession 2024-08-22 21:36:31 +10:00 committed by GitHub
parent fa395456a5
commit 8deb21c0c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
53 changed files with 95 additions and 92 deletions

View File

@ -235,7 +235,7 @@ fun CellButtons(
}
LargeItemButton(
R.string.delete,
R.drawable.ic_message_details__trash,
R.drawable.ic_delete,
colors = dangerButtonColors(),
onClick = onDelete
)

View File

@ -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)

View File

@ -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") }
}
}
}

View File

@ -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)
)
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 923 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -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>

View File

@ -1,10 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/signal_icon_tint_tab_selected"
android:pathData="M20,11.25l-14.439,0l1.559,-1.249l5.471,-5.471l-1.061,-1.06l-8.53,8.53l8.53,8.53l1.061,-1.06l-5.471,-5.471l-1.559,-1.249l14.439,0l0,-1.5z"/>
</vector>

View File

@ -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>

View File

@ -1,11 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
</vector>

View File

@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M15.41,16.59L10.83,12l4.58,-4.59L14,6l-6,6 6,6 1.41,-1.41z"/>
</vector>

View File

@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M8.59,16.59L13.17,12 8.59,7.41 10,6l6,6 -6,6 -1.41,-1.41z"/>
</vector>

View File

@ -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>

View File

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="26dp"
android:height="26dp"
android:viewportWidth="26"
android:viewportHeight="26">
<path
android:pathData="M8.749,24.43H19.167C21.186,24.43 22.073,23.433 22.385,21.427L23.972,5.825L22.071,5.907L20.492,21.315C20.35,22.226 19.89,22.591 19.076,22.591H8.847C8.017,22.591 7.566,22.226 7.432,21.315L5.853,5.907L3.952,5.825L5.539,21.427C5.843,23.441 6.738,24.43 8.749,24.43ZM4.063,6.85H23.863C25.195,6.85 25.962,5.998 25.962,4.677V3.244C25.962,1.924 25.195,1.072 23.863,1.072H4.063C2.782,1.072 1.962,1.924 1.962,3.244V4.677C1.962,5.998 2.732,6.85 4.063,6.85ZM4.44,5.102C3.99,5.102 3.794,4.898 3.794,4.446V3.474C3.794,3.023 3.99,2.819 4.44,2.819H23.492C23.942,2.819 24.13,3.023 24.13,3.474V4.446C24.13,4.898 23.942,5.102 23.492,5.102H4.44Z"
android:fillColor="#FF3A3A"/>
</vector>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1000dp" />
<solid android:color="?colorAccent" />
</shape>

View File

@ -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">

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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>

View File

@ -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"
@ -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>

View File

@ -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"
@ -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"/>
@ -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"

View File

@ -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>

View File

@ -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" />
@ -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" />

View File

@ -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" />

View File

@ -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">