abouttreesummaryrefslogcommitdiff
path: root/res/values
diff options
context:
space:
mode:
authorJules Aguillon2024-07-06 22:16:37 +0200
committerGitHub2024-07-06 22:16:37 +0200
commitbf3b9c374e1e68b1244da392666b571ab37e51fb (patch)
treeb76bd387664a2b2fc381a2e907795d21016c150d /res/values
parent6021a0b83c33a495fedde7bbb751ad3e3754bd98 (diff)
downloadunexpected-keyboard-bf3b9c374e1e68b1244da392666b571ab37e51fb.tar.gz
unexpected-keyboard-bf3b9c374e1e68b1244da392666b571ab37e51fb.zip
Clipboard pane (#681)
This adds the clipboard pane, which allows to save an arbitrary number of clipboards and to paste them later. The key can be disabled in settings. Checking the "Recently copied text" checkbox will cause the keyboard to keep a temporary history of copied text. This history can only contain 3 elements which expire after 5 minutes. If this is unchecked, no history is collected. History entries can be pinned into the persisted list of pins.
Diffstat (limited to 'res/values')
-rw-r--r--res/values/strings.xml5
-rw-r--r--res/values/styles.xml34
-rw-r--r--res/values/themes.xml10
-rw-r--r--res/values/values.xml1
4 files changed, 49 insertions, 1 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 224aca5..75df689 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -116,4 +116,9 @@ This application contains no ads, doesn't make any network requests and is Open
<string name="key_descr_page_down">Page Down</string>
<string name="key_descr_home">Home</string>
<string name="key_descr_end">End</string>
+ <string name="key_descr_clipboard">Clipboard manager</string>
+ <string name="clipboard_history_heading">Recently copied text</string>
+ <string name="clipboard_pin_heading">Pinned</string>
+ <string name="clipboard_remove_confirm">Remove this clipboard?</string>
+ <string name="clipboard_remove_confirmed">Yes</string>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 07ed490..8705d98 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
+ <!-- Emoji pane -->
<style name="emojiTypeButton">
<item name="android:padding">1px</item>
<item name="android:gravity">center</item>
@@ -15,6 +16,39 @@
<item name="android:textSize">@dimen/emoji_text_size</item>
<item name="android:textColor">?attr/emoji_color</item>
</style>
+ <!-- Clipboard pane -->
+ <style name="clipboardEntry">
+ <item name="android:layout_weight">1</item>
+ <item name="android:layout_width">fill_parent</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:layout_marginHorizontal">14dp</item>
+ <item name="android:layout_marginVertical">14dp</item>
+ <item name="android:textSize">16dp</item>
+ <item name="android:textColor">?attr/colorLabel</item>
+ </style>
+ <style name="clipboardHeading">
+ <item name="android:layout_marginHorizontal">6dp</item>
+ <item name="android:layout_marginTop">14dp</item>
+ <item name="android:layout_marginBottom">0dp</item>
+ <item name="android:textSize">14dp</item>
+ <item name="android:fontWeight">700</item>
+ <item name="android:textColor">?attr/colorSubLabel</item>
+ </style>
+ <style name="clipboardEntryButtons">
+ <item name="android:orientation">horizontal</item>
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:layout_gravity">center_vertical</item>
+ <item name="android:layout_marginRight">12dp</item>
+ </style>
+ <style name="clipboardEntryButton">
+ <item name="android:layout_width">24dp</item>
+ <item name="android:layout_height">24dp</item>
+ <item name="android:layout_marginHorizontal">2dp</item>
+ <item name="android:backgroundTint">?attr/colorLabel</item>
+ <item name="android:backgroundTintMode">src_in</item>
+ </style>
+ <!-- Launcher activity -->
<style name="paragraph">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index a1892d3..aa30080 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -23,11 +23,14 @@
<attr name="keyBorderColorTop" format="color"/>
<attr name="keyBorderColorRight" format="color"/>
<attr name="keyBorderColorBottom" format="color"/>
- <!-- Emoji panel -->
+ <!-- Emoji pane -->
<attr name="emoji_button_bg" type="color" format="color"/>
<attr name="emoji_color" type="color" format="color"/>
<attr name="emoji_key_bg" type="color" format="color"/>
<attr name="emoji_key_text" type="color" format="color"/>
+ <!-- Clipboard pane -->
+ <attr name="clipboard_divider_color" type="color" format="color"/>
+ <attr name="clipboard_divider_height" format="dimension"/>
<!-- System integration -->
<attr name="navigationBarColor" format="color"/>
<attr name="windowLightNavigationBar" format="boolean"/>
@@ -43,6 +46,8 @@
<item name="greyedDimming">0.5</item>
<item name="emoji_key_bg" type="color">?attr/emoji_button_bg</item>
<item name="emoji_key_text" type="color">?attr/colorLabel</item>
+ <item name="clipboard_divider_color" type="color">?attr/colorKey</item>
+ <item name="clipboard_divider_height">1px</item>
</style>
<style name="Dark" parent="BaseTheme">
<item name="android:isLightTheme">false</item>
@@ -116,6 +121,7 @@
<item name="colorSubLabel">#333333</item>
<item name="emoji_button_bg">#ffffff</item>
<item name="emoji_color">#000000</item>
+ <item name="clipboard_divider_color" type="color">#eeeeee</item>
</style>
<style name="ePaper" parent="BaseTheme">
<item name="android:isLightTheme">true</item>
@@ -134,6 +140,8 @@
<item name="colorSubLabel">#333333</item>
<item name="emoji_button_bg">#ffffff</item>
<item name="emoji_color">#000000</item>
+ <item name="clipboard_divider_color" type="color">#000000</item>
+ <item name="clipboard_divider_height">2dp</item>
</style>
<style name="Desert" parent="@style/BaseTheme">
<item name="android:isLightTheme">true</item>
diff --git a/res/values/values.xml b/res/values/values.xml
index cc048e9..b13296b 100644
--- a/res/values/values.xml
+++ b/res/values/values.xml
@@ -4,6 +4,7 @@
<dimen name="key_padding">2dp</dimen>
<dimen name="emoji_grid_height">250dp</dimen>
<dimen name="emoji_text_size">28dp</dimen>
+ <dimen name="clipboard_view_height">300dp</dimen>
<dimen name="pref_button_size">28dp</dimen>
<bool name="debug_logs">false</bool> <!-- Will be overwritten automatically by Gradle for the debug build variant -->
</resources>