-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ibus customized pre-edit themes #158
Comments
Hi, I'm a previous year GSoC applicant from #131, and I'm interested in this project. After searching on the Google, I noticed that currently ibus's theme is determined by the desktop theme rime/ibus-rime#77, and we can't change it manually unless you use Gnome and change it with gnome-shell. And another workaround to change the theme is to act in this way in Gnome: https://blog.csdn.net/weixin_30414245/article/details/96607094 So my question is, since this functionality hasn't been realized in ibus, do we just add an API for changing themes in ibus in this project? If so, currently I have no idea how to realize it, since the theme is directly determined by desktop theme. Can you give me more guidance? |
I've got some ideas from IBus Tweaker: https://extensions.gnome.org/extension/2820/ibus-tweaker/ We can make a GNOME Shell Extension that reads from the skin files (it can be rime-like color schemes https://github.com/rime-aca/color_schemes) located in the specified folder (e.g. ~/ibus_themes), users can choose a theme from the list or just follow the original GNOME theme. |
I think we will use the current gtk3 theme and gnome-shell theme for this feature. |
OK, I see. So combining user-theme and ibus-tweaker will make a perfect demo. I'll try this. |
I have worked out a demo which successfully changes the IBus theme with user's current gnome-shell theme, it can also support additional functions such as customizing IBus for orientation, font and input mode auto-switch: https://github.com/HollowMan6/Customize-IBus The extension has been sent to GNOME Shell Extension store for review (Currently it may not be available): https://extensions.gnome.org/extension/4112/customize-ibus/ Please suggest any changes if applicable @epico @hillwoodroc @qiangzhao Cheers! e.g.Seen as the picture below for a example. User currently choose RealizationWhen user chooses a theme from the list, this extension will first read the theme CSS file, extract the IBus related style classes ( NOTE:
To-do
|
Hi! I've had my proposal shared with https://drive.google.com/file/d/1a0vlrJAsqupYpBZtac9AYjAOspRQIYhw/view?usp=sharing, hope to get some feedback from the community and mentors @epico @hillwoodroc @qiangzhao |
@HollowMan6 Could you try some gnome-shell theme with customized background image? |
hmm, I've never seen that kind of gnome-shell theme with background image for IBus candidate window before, can you provide some example? |
I knew this theme earlier since it's provided in the description part.
And I've tried this theme when I started to do this idea, it was problematic when I was trying on Fedora 33, GNOME 3.38. Now this gnome-shell theme seems to still be problematic with displaying IBus candidate window correctly and with no background image showing on Fedora rawhide, GNOME 40 changed using the official user theme extension. @epico Does this theme display IBus candidate window correctly on your computer, what version of GNOME-shell do you use? |
I'm able to fix this theme by adding those style code to the background: url("assets/bg.png");
background-repeat:no-repeat;
background-size:cover; So I can tell that my extension can fit such kind of themes since the extension just copies the whole IBus related style blocks to the If we want to add a functionality to change background image to https://github.com/HollowMan6/Customize-IBus, just write the code to modify the |
… Fix During [fixing Unity8-Wood theme and add support for IBus Backgound](openSUSE/mentoring#158 (comment)), I found that if I add the following style for class `.candidate-popup-content`: ```css background: url("assets/bg.png"); background-repeat:no-repeat; background-size:cover; ``` I can modify the background picture. Further combining [ibus-font-setting](https://extensions.gnome.org/extension/1121/ibus-font-setting/) and [background-logo](https://pagure.io/background-logo-extension), referring to GNOME-Shell's source code, I found the [corresponding widget](https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/master/js/ui/ibusCandidatePopup.js#L154) for class `candidate-popup-content`, and modified the style to realize modifying IBus background picture without restarting GNOME-Shell. Signed-off-by: Hollow Man <hollowman@hollowman.ml>
The customizing IBus background picture functionality has been added into my extension for GNOME 40: openSUSE/Customize-IBus@1e00e3e |
@HollowMan6 Great, thanks! :) |
During [fixing Unity8-Wood theme and add support for IBus Backgound](openSUSE/mentoring#158 (comment)), I found that if I add the following style for class `.candidate-popup-content`: ```css background: url("assets/bg.png"); background-repeat:no-repeat; background-size:cover; ``` I can modify the background picture. Further combining [ibus-font-setting](https://extensions.gnome.org/extension/1121/ibus-font-setting/) and [background-logo](https://pagure.io/background-logo-extension), referring to GNOME-Shell's source code, I found the [corresponding widget](https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/master/js/ui/ibusCandidatePopup.js#L154) for class `candidate-popup-content`, and modified the style to realize modifying IBus background picture without restarting GNOME-Shell. Signed-off-by: Hollow Man <hollowman@hollowman.ml>
Looks great! |
@HollowMan6 Could you consider to split this extension into theme conversion tool and import ibus theme extension? |
Do you mean by making a script in python or shell which allow users to select from the GNOME theme CSS file, then extract the IBus related style classes (.candidate-*), finally write it to another stylesheet? And then modify the current extension to accept the user given stylesheet? @epico |
Right, we can use Python or JavaScript to write the conversion tool, and maintain it in a separate repo.
Right, the import theme extension can import the modified theme file. |
OK, thanks! I'll do these jobs during GSoC coding period. |
I’ve created a project for changing the IBus GTK theme in a non-GNOME Shell desktop environment using Python: https://github.com/HollowMan6/IBus-Theme , later during GSoC coding period I can merge the above theme conversion tool for GNOME into it to make a complete project. Tested on XFCE: |
Hi! Glad to hear that I'm accepted by GSoC 2021! I have made a lot of progress before the results are announced and have added quite a few features for my Customize IBus extension. Here's the repos collection: https://github.com/IBus-Customize . Hope to get some feedback. Issues are welcome! And here's a guideline for using Customize IBus (in Chinese) : https://blog.csdn.net/qq_18572023/article/details/116331601 |
Look forward to work on this feature with you during GSoC! 🙂 |
Hello people's i am a new comer can u explain me little bit more bcz now it is bit tough to me to understand it .... . |
@HollowMan6 okay thanku |
close for GSOC 2022 as offline discussion. |
Project Title: ibus pre-edit window support customized theme
**Description: The original skin function of ibus in different desktop environments is based on GNOME-shell and GTK, we need to inherit and customize it, so that users can freely choose the style they need.
**Deliverable: the modification to different desktop components to accomplish the target.
Mentor: @epico @hillwoodroc @qiangzhao
Skills: C, C++, Python3
Skill Level: Medium
Get started:
The text was updated successfully, but these errors were encountered: