1
0
Fork 0

fixed incorrect command palette key spacing

This commit is contained in:
sspanak 2025-01-30 11:59:10 +02:00 committed by Dimo Karaivanov
parent 3d2a5a0c30
commit e910ef36c9
6 changed files with 12 additions and 14 deletions

View file

@ -22,7 +22,7 @@ class MainLayoutSmall extends MainLayoutTray {
height = super.getHeight(forceRecalculate); height = super.getHeight(forceRecalculate);
if (!isCommandPaletteShown() && !isTextEditingPaletteShown()) { if (!isCommandPaletteShown() && !isTextEditingPaletteShown()) {
height += tt9.getResources().getDimensionPixelSize(R.dimen.main_small_key_wrapper_height); height += tt9.getResources().getDimensionPixelSize(R.dimen.main_small_main_key_wrapper_height);
} }
} }

View file

@ -24,7 +24,7 @@ class MainLayoutTray extends BaseMainLayout {
height = resources.getDimensionPixelSize(R.dimen.status_bar_height) + getBottomInsetSize(); height = resources.getDimensionPixelSize(R.dimen.status_bar_height) + getBottomInsetSize();
if (isCommandPaletteShown() || isTextEditingPaletteShown()) { if (isCommandPaletteShown() || isTextEditingPaletteShown()) {
height += resources.getDimensionPixelSize(R.dimen.main_small_key_text_editing_height); height += resources.getDimensionPixelSize(R.dimen.main_small_command_palette_height);
} }
} }

View file

@ -2,10 +2,8 @@
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:showIn="@layout/main_small" style="@style/TTheme.CommandPalette.Wrapper"
android:layout_width="match_parent" tools:showIn="@layout/main_small">
android:layout_height="wrap_content"
android:orientation="horizontal">
<io.github.sspanak.tt9.ui.main.keys.SoftKeyFn <io.github.sspanak.tt9.ui.main.keys.SoftKeyFn
style="@style/TTheme.CommandPalette.Key" style="@style/TTheme.CommandPalette.Key"

View file

@ -15,7 +15,7 @@
android:paddingEnd="15dp" android:paddingEnd="15dp"
android:text="✕" android:text="✕"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Widget.TextView" android:textAppearance="@android:style/TextAppearance.DeviceDefault.Widget.TextView"
android:textSize="@dimen/main_small_key_icon_size" android:textSize="@dimen/pref_deletable_word_icon_size"
tools:ignore="HardcodedText,RtlSymmetry" /> tools:ignore="HardcodedText,RtlSymmetry" />
<TextView <TextView

View file

@ -16,14 +16,14 @@
<dimen name="main_small_suggestion_spacing_horizontal">6sp</dimen> <dimen name="main_small_suggestion_spacing_horizontal">6sp</dimen>
<dimen name="main_small_suggestion_text_size">18sp</dimen> <dimen name="main_small_suggestion_text_size">18sp</dimen>
<dimen name="main_small_key_icon_size">32sp</dimen> <dimen name="main_small_main_key_wrapper_height">46dp</dimen> <!-- key height + margin -->
<dimen name="main_small_key_text_editing_height">66dp</dimen> <dimen name="main_small_command_palette_height">66dp</dimen>
<dimen name="main_small_key_wrapper_height">46dp</dimen> <!-- key height + margin -->
<!-- Preferences, default font size --> <!-- Preferences, default font size -->
<dimen name="pref_custom_min_height">48dp</dimen> <dimen name="pref_custom_min_height">48dp</dimen>
<dimen name="pref_custom_spacing_horizontal">16dp</dimen> <dimen name="pref_custom_spacing_horizontal">16dp</dimen>
<dimen name="pref_custom_spacing_vertical">12dp</dimen> <dimen name="pref_custom_spacing_vertical">12dp</dimen>
<dimen name="pref_deletable_word_icon_size">32sp</dimen>
<dimen name="pref_search_height">72dp</dimen> <dimen name="pref_search_height">72dp</dimen>
<!-- Preferences, large font size --> <!-- Preferences, large font size -->

View file

@ -79,7 +79,7 @@
<style name="TTheme.MainSmall.Wrapper" parent=""> <style name="TTheme.MainSmall.Wrapper" parent="">
<item name="android:baselineAligned">true</item> <item name="android:baselineAligned">true</item>
<item name="android:gravity">center</item> <item name="android:gravity">center</item>
<item name="android:layout_height">@dimen/main_small_key_wrapper_height</item> <item name="android:layout_height">@dimen/main_small_main_key_wrapper_height</item>
<item name="android:layout_width">match_parent</item> <item name="android:layout_width">match_parent</item>
<item name="android:orientation">horizontal</item> <item name="android:orientation">horizontal</item>
</style> </style>
@ -110,7 +110,7 @@
<!-- Fn keys (command palette or text-editing palette) --> <!-- Fn keys (command palette or text-editing palette) -->
<style name="TTheme.CommandPalette.Wrapper" parent=""> <style name="TTheme.CommandPalette.Wrapper" parent="">
<item name="android:layout_height">@dimen/main_small_key_text_editing_height</item> <item name="android:layout_height">@dimen/main_small_command_palette_height</item>
<item name="android:layout_width">match_parent</item> <item name="android:layout_width">match_parent</item>
<item name="android:orientation">horizontal</item> <item name="android:orientation">horizontal</item>
</style> </style>
@ -118,13 +118,13 @@
<style name="TTheme.CommandPalette.Key" parent="TTheme.MainSmall.Key"> <style name="TTheme.CommandPalette.Key" parent="TTheme.MainSmall.Key">
<item name="android:drawablePadding">0dp</item> <item name="android:drawablePadding">0dp</item>
<item name="android:layout_marginTop">0dp</item> <item name="android:layout_marginTop">0dp</item>
<item name="android:layout_marginRight">1dp</item>
<item name="android:layout_marginBottom">0dp</item> <item name="android:layout_marginBottom">0dp</item>
<item name="android:layout_marginLeft">1dp</item> <item name="android:layout_marginLeft">1dp</item>
<item name="android:layout_marginRight">1dp</item>
<item name="android:paddingTop">0dp</item> <item name="android:paddingTop">0dp</item>
<item name="android:paddingRight">0dp</item>
<item name="android:paddingBottom">2dp</item> <item name="android:paddingBottom">2dp</item>
<item name="android:paddingLeft">0dp</item> <item name="android:paddingLeft">0dp</item>
<item name="android:paddingRight">0dp</item>
<item name="android:textAppearance">@style/TextAppearance.AppCompat</item> <item name="android:textAppearance">@style/TextAppearance.AppCompat</item>
<item name="android:textSize">@dimen/key_text_size</item> <item name="android:textSize">@dimen/key_text_size</item>