mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix key preview appearing wrongly depending on key height
This commit is contained in:
parent
80272cbab4
commit
c937a618e1
@ -41,7 +41,7 @@
|
|||||||
<dimen name="config_more_keys_keyboard_vertical_correction_holo">-22.4dp</dimen>
|
<dimen name="config_more_keys_keyboard_vertical_correction_holo">-22.4dp</dimen>
|
||||||
<dimen name="config_key_preview_offset_holo">1.6dp</dimen>
|
<dimen name="config_key_preview_offset_holo">1.6dp</dimen>
|
||||||
<dimen name="config_key_preview_height_holo">80dp</dimen>
|
<dimen name="config_key_preview_height_holo">80dp</dimen>
|
||||||
<dimen name="config_key_preview_offset_lxx">43.6dp</dimen>
|
<dimen name="config_key_preview_offset_lxx">0.0dp</dimen>
|
||||||
<dimen name="config_key_preview_height_lxx">122dp</dimen>
|
<dimen name="config_key_preview_height_lxx">122dp</dimen>
|
||||||
<fraction name="config_key_preview_text_ratio">90%</fraction>
|
<fraction name="config_key_preview_text_ratio">90%</fraction>
|
||||||
<fraction name="config_key_letter_ratio_holo">65%</fraction>
|
<fraction name="config_key_letter_ratio_holo">65%</fraction>
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<dimen name="config_more_keys_keyboard_vertical_correction_holo">-26.4dp</dimen>
|
<dimen name="config_more_keys_keyboard_vertical_correction_holo">-26.4dp</dimen>
|
||||||
<dimen name="config_key_preview_offset_holo">8.0dp</dimen>
|
<dimen name="config_key_preview_offset_holo">8.0dp</dimen>
|
||||||
<dimen name="config_key_preview_height_holo">80dp</dimen>
|
<dimen name="config_key_preview_height_holo">80dp</dimen>
|
||||||
<dimen name="config_key_preview_offset_lxx">50.0dp</dimen>
|
<dimen name="config_key_preview_offset_lxx">0.0dp</dimen>
|
||||||
<dimen name="config_key_preview_height_lxx">122dp</dimen>
|
<dimen name="config_key_preview_height_lxx">122dp</dimen>
|
||||||
<fraction name="config_key_preview_text_ratio">82%</fraction>
|
<fraction name="config_key_preview_text_ratio">82%</fraction>
|
||||||
<fraction name="config_key_letter_ratio_holo">66%</fraction>
|
<fraction name="config_key_letter_ratio_holo">66%</fraction>
|
||||||
|
@ -133,7 +133,7 @@ public final class KeyPreviewChoreographer {
|
|||||||
// The key preview is placed vertically above the top edge of the parent key with an
|
// The key preview is placed vertically above the top edge of the parent key with an
|
||||||
// arbitrary offset.
|
// arbitrary offset.
|
||||||
final int previewY = key.getY() - previewHeight + mParams.mPreviewOffset
|
final int previewY = key.getY() - previewHeight + mParams.mPreviewOffset
|
||||||
+ CoordinateUtils.y(originCoords);
|
+ CoordinateUtils.y(originCoords) + key.getHeight();
|
||||||
|
|
||||||
ViewLayoutUtils.placeViewAt(
|
ViewLayoutUtils.placeViewAt(
|
||||||
keyPreviewView, previewX, previewY, previewWidth, previewHeight);
|
keyPreviewView, previewX, previewY, previewWidth, previewHeight);
|
||||||
|
Loading…
Reference in New Issue
Block a user