Skip to content

Commit 461726a

Browse files
committed
v11: Fix background picture showing style to fit current user style
By adding candidate-box style For GNOME 3.38 Signed-off-by: Hollow Man <hollowman@hollowman.ml>
1 parent 0b43b9a commit 461726a

8 files changed

Lines changed: 28 additions & 18 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
(English version is down below)
1919

20-
### 注意:如果后期无重大 BUG 的话,v9 将是支持 GNOME 3.38 的最后一个版本
20+
### 注意:如果后期无重大 BUG 的话,v11 将是支持 GNOME 3.38 的最后一个版本
2121

2222
在 GNOME Shell 中更改 IBus 的候选框方向、shell 主题、背景图片、字体和输入法默认语言。
2323

@@ -47,7 +47,7 @@ cd Customize-IBus && make install
4747
### _提示:_
4848

4949
1. 推荐使用 X11。如果你在 Wayland 中更改 IBus 主题,你的当前所有工作都将会丢失,因为 Wayland 下只支持通过重新登陆来重启 GNOME-shell。
50-
2. 在 Fedora 33 和 Ubuntu 20.04, GNOME-shell 3.38 中(v3,v5,v9)通过了测试。
50+
2. 在 Fedora 33 和 Ubuntu 20.04, GNOME-shell 3.38 中(v3,v5,v9,v11)通过了测试。
5151
3. 对于那些不使用 GNOME 而是使用如 KDE 等桌面环境的用户,更改 IBus 主题最简单的方法请参见[这里](https://github.com/qvshuo/Ibus-custom-theme),从而为 IBus 指定一个不同的 GTK 主题。
5252

5353
## 更改 IBus 背景图片的实现
@@ -83,7 +83,7 @@ _该项目是谷歌编程之夏 (GSoC) 2021 于[OpenSUSE](https://github.com/ope
8383

8484
# Customize IBus
8585

86-
### Note: If no severe bug was found later, v9 will be the last version that support GNOME 3.38.
86+
### Note: If no severe bug was found later, v11 will be the last version that support GNOME 3.38.
8787

8888
Customize IBus for orientation, shell theme, background picture, font and ascii mode auto-switch.
8989

@@ -111,7 +111,7 @@ When user chooses a theme from the list, this extension will first read the them
111111
### _NOTE:_
112112

113113
1. Recommend to use X11. If you change IME theme under Wayland, all your current work may be lost (Since Wayland only support relogin to restart the GNOME-shell).
114-
2. Tested on Fedora 33 and Ubuntu 20.04, GNOME-shell 3.38(v3, v5, v9).
114+
2. Tested on Fedora 33 and Ubuntu 20.04, GNOME-shell 3.38(v3, v5, v9, v11).
115115
3. For users who don't use GNOME but other desktop environments like KDE, the easiest way to change the IBus theme is to act as described in [here](https://github.com/qvshuo/Ibus-custom-theme) to use a different GTK theme for IBus.
116116

117117
## To-do

customize-ibus@hollowman.ml/extension.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,17 +213,22 @@ const IBusBGSetting = GObject.registerClass(
213213
set bg(bg) {
214214
global.log(_("loading background for IBus:") + bg);
215215
let candidateBox = CandidatePopup.bin.get_children();
216-
if (candidateBox)
216+
if (candidateBox) {
217217
candidateBox[0].set_style(
218218
'background: url("%s"); background-repeat:no-repeat; background-size:cover;'.format(
219219
bg
220220
)
221221
);
222+
candidateBox[0].add_style_class_name("candidate-box");
223+
}
222224
}
223225

224226
destroy() {
225227
let candidateBox = CandidatePopup.bin.get_children();
226-
if (candidateBox) candidateBox[0].set_style("");
228+
if (candidateBox) {
229+
candidateBox[0].set_style("");
230+
candidateBox[0].remove_style_class_name("candidate-box");
231+
}
227232
}
228233
}
229234
);

customize-ibus@hollowman.ml/locale/customize-ibus.pot

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#, fuzzy
77
msgid ""
88
msgstr ""
9-
"Project-Id-Version: Customize Ibus 9\n"
9+
"Project-Id-Version: Customize Ibus 11\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2021-04-07 09:16+0800\n"
11+
"POT-Creation-Date: 2021-04-07 23:10+0800\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -21,11 +21,15 @@ msgstr ""
2121
msgid "loading background for IBus:"
2222
msgstr ""
2323

24-
#: extension.js:410
24+
#: extension.js:329
25+
msgid "loading user theme for IBus:"
26+
msgstr ""
27+
28+
#: extension.js:415
2529
msgid "loading default theme for IBus"
2630
msgstr ""
2731

28-
#: extension.js:459
32+
#: extension.js:464
2933
msgid "Restarting..."
3034
msgstr ""
3135

customize-ibus@hollowman.ml/locale/zh_CN/LC_MESSAGES/customize-ibus.po

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: customize-ibus 1\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2021-04-07 09:03+0800\n"
11+
"POT-Creation-Date: 2021-04-07 23:10+0800\n"
1212
"PO-Revision-Date: 2021-03-27 16:22+0800\n"
1313
"Last-Translator: Hollow Man <hollowman@hollowman.ml>\n"
1414
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
@@ -21,11 +21,15 @@ msgstr ""
2121
msgid "loading background for IBus:"
2222
msgstr "正在为IBus加载背景:"
2323

24-
#: extension.js:410
24+
#: extension.js:329
25+
msgid "loading user theme for IBus:"
26+
msgstr "正在为IBus加载用户主题:"
27+
28+
#: extension.js:415
2529
msgid "loading default theme for IBus"
2630
msgstr "正在为IBus加载当前系统主题"
2731

28-
#: extension.js:459
32+
#: extension.js:464
2933
msgid "Restarting..."
3034
msgstr "正在重新启动⋯⋯"
3135

@@ -84,6 +88,3 @@ msgstr "自定义IBus"
8488
#: prefs.js:406
8589
msgid "Follow User Theme"
8690
msgstr "跟随系统主题"
87-
88-
#~ msgid "loading user theme for IBus:"
89-
#~ msgstr "正在为IBus加载用户主题:"

customize-ibus@hollowman.ml/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"original-authors": ["hollowman@hollowman.ml"],
99
"uuid": "customize-ibus@hollowman.ml",
1010
"extension-id": "customize-ibus",
11-
"version": 9
11+
"version": 11
1212
}

img/demo-en.png

100755100644
1.03 KB
Loading

img/demo.png

100755100644
-310 Bytes
Loading

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "customize-ibus",
3-
"version": "9.0.0",
3+
"version": "11.0.0",
44
"description": "Customize IBus for orientation, shell theme, background picture, font and ascii mode auto-switch.",
55
"dependencies": {
66
"eslint": "^7.21.0",

0 commit comments

Comments
 (0)