mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 14:02:44 +00:00
Upscale the d-pad arrows globally (#934)
This commit is contained in:
parent
f7d82b9589
commit
57b99e27b0
16 changed files with 75 additions and 45 deletions
|
@ -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
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromDegrees="90"
|
||||
android:drawable="@drawable/ic_arrow_left">
|
||||
</rotate>
|
|
@ -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>
|
|
@ -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
app/src/main/res/drawable/ic_dpad_left.xml
Normal file
17
app/src/main/res/drawable/ic_dpad_left.xml
Normal file
|
@ -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
app/src/main/res/drawable/ic_dpad_left_rounded.xml
Normal file
18
app/src/main/res/drawable/ic_dpad_left_rounded.xml
Normal file
|
@ -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
app/src/main/res/drawable/ic_dpad_right.xml
Normal file
5
app/src/main/res/drawable/ic_dpad_right.xml
Normal file
|
@ -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
app/src/main/res/drawable/ic_dpad_right_rounded.xml
Normal file
5
app/src/main/res/drawable/ic_dpad_right_rounded.xml
Normal file
|
@ -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>
|
|
@ -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">
|
||||
</rotate>
|
||||
android:drawable="@drawable/ic_dpad_left">
|
||||
</rotate>
|
5
app/src/main/res/drawable/ic_dpad_up_rounded.xml
Normal file
5
app/src/main/res/drawable/ic_dpad_up_rounded.xml
Normal file
|
@ -0,0 +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_dpad_left_rounded">
|
||||
</rotate>
|
|
@ -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>
|
|
@ -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>
|
|
@ -1,13 +0,0 @@
|
|||
<!--
|
||||
icon available in Android Studio
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<!-- todo: remove / merge with ic_arrow_left -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="32dp"
|
||||
android:width="32dp"
|
||||
android:viewportHeight="24"
|
||||
android:viewportWidth="24" >
|
||||
<path android:fillColor="#FFF"
|
||||
android:pathData="M15.41,16.59L10.83,12l4.58,-4.59L14,6l-6,6 6,6 1.41,-1.41z"/>
|
||||
</vector>
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue