Skip to content

Commit

Permalink
优化 声笔补丁
Browse files Browse the repository at this point in the history
  • Loading branch information
nopdan committed May 5, 2021
1 parent 2ec091b commit b058286
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 17 deletions.
3 changes: 2 additions & 1 deletion 单静+.trime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ style:
__include: 单静.trime:/style
key_height: 61 #符号、颜文字键盘 按键高度
__patch:
- 单静+.patch.声笔系列码:/style?
- 单静+.patch.声笔快码:/style?
- 单静+.patch.声笔拼音:/style?

fallback_colors:
__include: 单静.trime:/fallback_colors
Expand Down
15 changes: 6 additions & 9 deletions 单静.trime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -489,11 +489,8 @@ preset_keyboards:
__patch:
- 单静.patch.星空助记:/preset_keyboards?

flypy:
__include: preset_keyboards/default

pinyin_simp:
name: 拼音
default:
name: 默认26键
author: '单单 <cxprcn@gmail.com>'
ascii_mode: 0
label_transform: uppercase
Expand Down Expand Up @@ -648,16 +645,16 @@ preset_keyboards:
__patch:
'keys/@33/long_click': Keyboard_default

default:
name: 默认26键
__include: preset_keyboards/pinyin_simp
flypy:
name: 二重
__include: preset_keyboards/default
__patch:
'keys/@21/composing': select_second
'keys/@34/composing': '.'

qwertys:
name: 默认27键
__include: preset_keyboards/default
__include: preset_keyboards/flypy
__patch:
'keys/@11/width': 0
'keys/@17/hint': ' '
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

style:
# 候选区
## 候选
candidate_view_height: 28 #候选区高度
candidate_text_size: 18 #候选字号
## 编码
comment_on_top: false #编码提示在上方或右侧
comment_height: 16 #编码提示区高度
comment_text_size: 15 #编码提示字号

# 悬浮窗口
label_text_size: 16 #标签字号
text_size: 16 #编码区字号

window: #悬浮窗口组件
#- {start: "", move: 'ㄓ ', end: ""}
- { start: ' ', composition: '%s', end: ' ', letter_spacing: 0 } #letter_spacing需要>=Android5.0。TODO: 不为0时,会导致不换行的问题
- {
start: "",
label: '%s',
candidate: '%s',
comment: '%s',
end: '',
sep: ' ',
}
layout: #悬浮窗口设置
# 整体样式
position: fixed #位置:left|right|left_up|right_up|fixed|bottom_left|bottom_right|top_left|top_right(left、right需要>=Android5.0)
movable: false #是否可移动窗口,或仅移动一次 true|false|once
spacing: -1 #与预编辑或边缘的距离
margin_x: 5 #水平边距
margin_y: 1 #竖直边距
border: 0 #边框宽度
round_corner: 2 #窗口圆角
elevation: 0 #阴影(>=Android5.0)
alpha: 0xff #透明度(0-255)
#background: background.png #颜色或者backgrounds目录下的图片文件名
# 样式
all_phrases: false #所有满足条件的词语都显示在窗口
min_length: 0 #最小词长
max_length: 80 #超过字数则换行
sticky_lines: 1 #固顶行数
max_entries: 1 #最大词条数
max_width: 350 #最大宽度,超过则自动换行
max_height: 400 #最大高度
min_width: 0 #最小宽度
min_height: 0 #最小高度
line_spacing: 0 #候选词的行间距(px)
line_spacing_multiplier: 1 #候选词的行间距(倍数)
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
style:
# 候选区
## 候选
candidate_view_height: 24 #候选区高度
candidate_view_height: 28 #候选区高度
candidate_text_size: 18 #候选字号
## 编码
comment_on_top: true #编码提示在上方或右侧
comment_on_top: false #编码提示在上方或右侧
comment_height: 16 #编码提示区高度
comment_text_size: 15 #编码提示字号

Expand All @@ -28,7 +28,7 @@ style:
# 整体样式
position: fixed #位置:left|right|left_up|right_up|fixed|bottom_left|bottom_right|top_left|top_right(left、right需要>=Android5.0)
movable: false #是否可移动窗口,或仅移动一次 true|false|once
spacing: -43 #与预编辑或边缘的距离
spacing: -29 #与预编辑或边缘的距离
margin_x: 5 #水平边距
margin_y: 1 #竖直边距
border: 0 #边框宽度
Expand All @@ -40,9 +40,9 @@ style:
all_phrases: false #所有满足条件的词语都显示在窗口
min_length: 0 #最小词长
max_length: 80 #超过字数则换行
sticky_lines: 1 #固顶行数
sticky_lines: 0 #固顶行数
max_entries: 6 #最大词条数
max_width: 330 #最大宽度,超过则自动换行
max_width: 350 #最大宽度,超过则自动换行
max_height: 400 #最大高度
min_width: 0 #最小宽度
min_height: 0 #最小高度
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ preset_keys:

preset_keyboards:
xkjd6: #星空键道6
__include: 单静.trime:/preset_keyboards/default
__include: 单静.trime:/preset_keyboards/flypy
__patch:
'keys/@33/hint': '键道6'
'keys/@33/swipe_up': kb_xkjd6zj
Expand Down Expand Up @@ -246,7 +246,7 @@ preset_keyboards:
'keys/@33/swipe_up': Back

xklbs:
__include: 单静.trime:/preset_keyboards/default
__include: 单静.trime:/preset_keyboards/flypy
__patch:
'keys/@33/hint': '两笔S'
'keys/@33/key_hint_offset_y': -19
Expand Down

0 comments on commit b058286

Please sign in to comment.