Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upscale the d-pad arrows globally #934

Merged
merged 2 commits into from
Jun 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ fun createToolbarKey(context: Context, keyboardAttr: TypedArray, key: ToolbarKey
val contentDescriptionId = context.resources.getIdentifier(key.name.lowercase(), "string", context.packageName)
if (contentDescriptionId != 0)
button.contentDescription = context.getString(contentDescriptionId)
if (key == LEFT || key == RIGHT || key == UP || key == DOWN) {
// arrows look a little awkward when not scaled
button.scaleX = 1.2f
button.scaleY = 1.2f
}
button.isActivated = !when (key) {
INCOGNITO -> Settings.readAlwaysIncognitoMode(DeviceProtectedUtils.getSharedPreferences(context))
ONE_HANDED -> Settings.getInstance().current.mOneHandedModeEnabled
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="270"
android:drawable="@drawable/ic_arrow_left">
android:drawable="@drawable/ic_dpad_left">
</rotate>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="270"
android:drawable="@drawable/ic_arrow_left_rounded">
android:drawable="@drawable/ic_dpad_left_rounded">
</rotate>
17 changes: 17 additions & 0 deletions app/src/main/res/drawable/ic_dpad_left.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
icon available in Android Studio
SPDX-License-Identifier: Apache-2.0
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<group android:scaleX="1.2"
android:scaleY="1.2"
android:translateX="-2.4"
android:translateY="-2.4">
<path android:fillColor="#FFF"
android:pathData="M15.41,16.59L10.83,12l4.58,-4.59L14,6l-6,6 6,6 1.41,-1.41z"/>
</group>
</vector>
18 changes: 18 additions & 0 deletions app/src/main/res/drawable/ic_dpad_left_rounded.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-FileCopyrightText: Material Design Authors / Google LLC
SPDX-License-Identifier: Apache-2.0
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960">
<group android:scaleX="1.2"
android:scaleY="1.2"
android:translateX="-96"
android:translateY="-96">
<path android:fillColor="#FFF"
android:pathData="M432,480L588,636Q599,647 599,664Q599,681 588,692Q577,703 560,703Q543,703 532,692L348,508Q342,502 339.5,495Q337,488 337,480Q337,472 339.5,465Q342,458 348,452L532,268Q543,257 560,257Q577,257 588,268Q599,279 599,296Q599,313 588,324L432,480Z"/>
</group>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_dpad_right.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="180"
android:drawable="@drawable/ic_dpad_left">
</rotate>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_dpad_right_rounded.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="180"
android:drawable="@drawable/ic_dpad_left_rounded">
</rotate>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="90"
android:drawable="@drawable/ic_arrow_left">
android:drawable="@drawable/ic_dpad_left">
</rotate>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="90"
android:drawable="@drawable/ic_arrow_left_rounded">
android:drawable="@drawable/ic_dpad_left_rounded">
</rotate>
7 changes: 4 additions & 3 deletions app/src/main/res/drawable/sym_keyboard_shift_lxx.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- it's the arrow up icon, but with a different name -->
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_arrow_up">
</rotate>
android:fromDegrees="90"
android:drawable="@drawable/ic_arrow_left">
</rotate>
7 changes: 4 additions & 3 deletions app/src/main/res/drawable/sym_keyboard_shift_rounded.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- it's the arrow up icon, but with a different name -->
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_arrow_up_rounded">
</rotate>
android:fromDegrees="90"
android:drawable="@drawable/ic_arrow_left_rounded">
</rotate>
13 changes: 0 additions & 13 deletions app/src/main/res/drawable/sym_keyboard_switch_onehanded_holo.xml

This file was deleted.

10 changes: 5 additions & 5 deletions app/src/main/res/values/keyboard-icons-holo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
<item name="iconClearClipboardKey">@drawable/sym_keyboard_clear_clipboard_holo</item>
<item name="iconStartOneHandedMode">@drawable/sym_keyboard_start_onehanded_holo</item>
<item name="iconStopOneHandedMode">@drawable/sym_keyboard_stop_onehanded_holo</item>
<item name="iconSwitchOneHandedMode">@drawable/sym_keyboard_switch_onehanded_holo</item>
<item name="iconSwitchOneHandedMode">@drawable/ic_arrow_left</item>
<item name="iconResizeOneHandedMode">@drawable/ic_arrow_horizontal</item>
<item name="iconNumpadKey">@drawable/sym_keyboard_numpad_key_holo</item>
<item name="iconToolbarKey">@drawable/ic_arrow_right</item>
<item name="iconSelectAll">@drawable/ic_select_all</item>
<item name="iconArrowLeft">@drawable/ic_arrow_left</item>
<item name="iconArrowRight">@drawable/ic_arrow_right</item>
<item name="iconArrowUp">@drawable/ic_arrow_up</item>
<item name="iconArrowDown">@drawable/ic_arrow_down</item>
<item name="iconArrowLeft">@drawable/ic_dpad_left</item>
<item name="iconArrowRight">@drawable/ic_dpad_right</item>
<item name="iconArrowUp">@drawable/ic_dpad_up</item>
<item name="iconArrowDown">@drawable/ic_dpad_down</item>
<item name="iconBin">@drawable/ic_delete</item>
<item name="iconUndo">@drawable/ic_undo</item>
<item name="iconRedo">@drawable/ic_redo</item>
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/values/keyboard-icons-lxx-light.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
<item name="iconNumpadKey">@drawable/sym_keyboard_numpad_key_lxx</item>
<item name="iconToolbarKey">@drawable/ic_arrow_right</item>
<item name="iconSelectAll">@drawable/ic_select_all</item>
<item name="iconArrowLeft">@drawable/ic_arrow_left</item>
<item name="iconArrowRight">@drawable/ic_arrow_right</item>
<item name="iconArrowUp">@drawable/ic_arrow_up</item>
<item name="iconArrowDown">@drawable/ic_arrow_down</item>
<item name="iconArrowLeft">@drawable/ic_dpad_left</item>
<item name="iconArrowRight">@drawable/ic_dpad_right</item>
<item name="iconArrowUp">@drawable/ic_dpad_up</item>
<item name="iconArrowDown">@drawable/ic_dpad_down</item>
<item name="iconBin">@drawable/ic_delete</item>
<item name="iconUndo">@drawable/ic_undo</item>
<item name="iconRedo">@drawable/ic_redo</item>
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/values/keyboard-icons-rounded.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
<item name="iconNumpadKey">@drawable/sym_keyboard_numpad_key_lxx</item>
<item name="iconToolbarKey">@drawable/ic_arrow_right_rounded</item>
<item name="iconSelectAll">@drawable/ic_select_all_rounded</item>
<item name="iconArrowLeft">@drawable/ic_arrow_left_rounded</item>
<item name="iconArrowRight">@drawable/ic_arrow_right_rounded</item>
<item name="iconArrowUp">@drawable/ic_arrow_up_rounded</item>
<item name="iconArrowDown">@drawable/ic_arrow_down_rounded</item>
<item name="iconArrowLeft">@drawable/ic_dpad_left_rounded</item>
<item name="iconArrowRight">@drawable/ic_dpad_right_rounded</item>
<item name="iconArrowUp">@drawable/ic_dpad_up_rounded</item>
<item name="iconArrowDown">@drawable/ic_dpad_down_rounded</item>
<item name="iconBin">@drawable/ic_delete_rounded</item>
<item name="iconUndo">@drawable/ic_undo_rounded</item>
<item name="iconRedo">@drawable/ic_redo_rounded</item>
Expand Down