Skip to content

Conversation

@HollowMan6
Copy link

@HollowMan6 HollowMan6 commented Jul 13, 2021

The senario of using custom theme or icon is pretty much alike the using custom font. If users want to change IBus panel theme, just tick the Use custom theme, then select a theme from the combo box. Or tick the Use custom icon, then select an icon theme from the combo box to customize page switch buttons (the arrows):

Examples

image
image

image
image

image
image

Untick the box to follow the system global gtk theme or icon theme again.

(This feature is a part of my goal in GSoC 2021 project, I used to use GTK_THEME=? ibus-daemon -r & to change IBus GTK themes with my IBus-Theme-Tools, but now I guess it's better to add this functionality to upstream since it's more intuitive.)

@hillwoodroc @qiangzhao @epico

@fujiwarat
Copy link
Member

Thank you for the idea. I will bring back the issue later.

@HollowMan6
Copy link
Author

Now support customizing page switch buttons (the arrows):

  • Screenshot_20211023_171006
  • Screenshot_20211023_171037
  • image

@fujiwarat
Copy link
Member

I checked the code but I don't know why you need to change the theme for IBus only. The font setting is needed to enlarge the font size for IM demo.
IBus follows the current desktop theme and you can change it with the desktop tool likes gnome-tweaks, xfce4-appearance-settings.

@HollowMan6
Copy link
Author

I checked the code but I don't know why you need to change the theme for IBus only. The font setting is needed to enlarge the font size for IM demo. IBus follows the current desktop theme and you can change it with the desktop tool likes gnome-tweaks, xfce4-appearance-settings.

@fujiwarat This PR resolves openSUSE/mentoring#158, and I can also see that a lot of people ask that ibus can have own control of themes #1548, rime/ibus-rime#101 (In Chinese, Google translation if needed), rime/ibus-rime#77 (also in Chinese).

With this feature, developers now can create an IBus specific GTK themes. (One use case is to add a background to the IBus input panel, just like fcitx, and I'm sure for most users they won't apply such kind of theme system wide, they only want the IBus panel to have it)

And finally as you know, fcitx has its own control of themes, so I would appreciate that IBus can also have that.

@fujiwarat
Copy link
Member

    Fix and cleanup
    Making judging dark variant more general
    Set to use `gtk-*` instead of simply `*`

Please mention your changes are relative with theme in each git subject

@HollowMan6
Copy link
Author

Thanks for your reviewing. I've squashed all the commits into one, otherwise it would be too messy to make those changes.

@HollowMan6 HollowMan6 requested a review from fujiwarat January 24, 2022 16:30
Copy link
Member

@fujiwarat fujiwarat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much better now however I asked some updates.

I like to have the links gnome-tweaks and this PR:

Add functionality to change IBus panel themes with available GTK themes

<Describe why you need this feature in IBus instead of the desktop theme tools>

https://gitlab.gnome.org/GNOME/gnome-tweaks/-/blob/b9badc47b92dd73f8cedbd2efc66cbaf3ea25773/gtweak/tweaks/tweak_group_appearance.py#L69

BUG=https://github.com/ibus/ibus/pull/2327
    
Signed-off-by: Hollow Man <hollowman@opensuse.org>

@fujiwarat
Copy link
Member

Could you provide which UI effects the customizing icon theme? I could not find any differences in XFCE desktop.

This change effects GUI and unfortunately the change would be a little late for 1.5.26 and I will reschedule this to 1.5.27, sorry.

@HollowMan6
Copy link
Author

HollowMan6 commented Jan 26, 2022

Could you provide which UI effects the customizing icon theme? I could not find any differences in XFCE desktop.

It's the arrows for candidates page up and down. I've mentioned here: #2327 (comment) . It works on KDE.

@HollowMan6 HollowMan6 requested a review from fujiwarat January 26, 2022 02:08
@fujiwarat
Copy link
Member

It's the arrows for candidates page up and down. I've mentioned here: #2327 (comment) . It works on KDE.

Ah, you meant the arrow buttons. Thank you. I didn't notice them when I looked at your screenshots.
Probably I think it's good to add tooltip_text for check buttons and I will add another code review.

Copy link
Member

@fujiwarat fujiwarat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd request to add tooltip texts to explain the features.

@HollowMan6 HollowMan6 requested a review from fujiwarat January 26, 2022 03:22
@HollowMan6
Copy link
Author

@fujiwarat Done! Thanks for reviewing!

@fujiwarat
Copy link
Member

LGTM.
I will ask you to rebase patches again after 1.5.26 is released.

@fujiwarat fujiwarat modified the milestones: 1.5.26, 1.5.27 Jan 27, 2022
@cryobry
Copy link

cryobry commented Apr 2, 2022

@fujiwarat could we get this merged for 1.5.27 release go-ahead?

@fujiwarat
Copy link
Member

The master branch is still a maintaining term for 1.5.26.
I will integrate this feature after Fedora 36 GA.
https://fedorapeople.org/groups/schedule/f-36/f-36-key-tasks.html

@fujiwarat
Copy link
Member

@HollowMan6 Do you have a chance to rebase your patches to the latest master?
We have done internal tests with your patches recently and the status is fine.

So that the theme list won't get too messy

BUG=#2327

Signed-off-by: Hollow Man <hollowman@opensuse.org>
BUG=#2327

Signed-off-by: Hollow Man <hollowman@opensuse.org>
@HollowMan6
Copy link
Author

@fujiwarat Done rebasing! CI looks good. Thanks for reviewing the PR and tests all the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants