Skip to content
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

fctix5: fix highlighted candidate color #724

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

make-42
Copy link
Contributor

@make-42 make-42 commented Jan 3, 2025

I had not tested this theme on KDE. This fixes the highlighted candidate's color to be coherant with the theme on GNOME.

Fixes: #718

I had not tested this theme on KDE. This fixes the highlighted candidate's color to be coherant with the theme on GNOME.
@make-42
Copy link
Contributor Author

make-42 commented Jan 3, 2025

This is a small correction to #718

@make-42
Copy link
Contributor Author

make-42 commented Jan 3, 2025

I have created a theme for GNOME and a theme for KDE, both have been extensively tested on both DEs to ensure a good look on both.

Copy link
Collaborator

@trueNAHO trueNAHO left a comment

Choose a reason for hiding this comment

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

I have created a theme for GNOME and a theme for KDE, both have been extensively tested on both DEs to ensure a good look on both.

Is the correct DE theme automatically applied in the correct context?

Consider inspecting the other theme files for fcitx5, if they also contain several magic values for the colors.

@@ -238,3 +238,4 @@ Left=6
Right=6
Top=6
Bottom=6

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change

Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume the following values should also be some Stylix parameter:

pagecolor="#ffffff"
bordercolor="#000000"

Comment on lines 20 to 35
options.stylix.targets.fcitx5.enable =
config.lib.stylix.mkEnableTarget "fcitx5" true;
options.stylix.targets.fcitx5.enable = config.lib.stylix.mkEnableTarget "fcitx5" true;

config =
lib.mkIf
(config.stylix.enable && config.stylix.targets.fcitx5.enable)
{
xdg.dataFile = {
"fcitx5/themes/stylix/highlight.svg".source = highlight;
"fcitx5/themes/stylix/panel.svg".source = panel;
"fcitx5/themes/stylix/theme.conf".source = theme;
};
config = lib.mkIf (config.stylix.enable && config.stylix.targets.fcitx5.enable) {
xdg.dataFile = {
"fcitx5/themes/stylix/theme.conf".source = theme;
"fcitx5/themes/stylix/panel.svg".source = panel;
"fcitx5/themes/stylix/highlight.svg".source = highlight;
"fcitx5/themes/stylix-kwin/theme.conf".source = theme-kwin;
"fcitx5/themes/stylix-kwin/panel.svg".source = panel;
"fcitx5/themes/stylix-kwin/highlight.svg".source = highlight;
};
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you make the changes without the reformatting?

Right=6
Top=6
Bottom=6

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change

Comment on lines +13 to +14
HighlightColor=#ffffff
HighlightBackgroundColor=#a5a5a5
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume these values should be some Stylix parameter.

Comment on lines +117 to +118
Color=#ffffff
BorderColor=#ffffff00
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume these values should be some Stylix parameter.

Comment on lines +140 to +141
Color=#ffffff
BorderColor=#ffffff00
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume these values should be some Stylix parameter.

Comment on lines +163 to +164
Color=#c0c0c0
BorderColor=#ffffff00
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume these values should be some Stylix parameter.

Comment on lines +186 to +187
Color=#ffffff
BorderColor=#ffffff00
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume these values should be some Stylix parameter.

Comment on lines +209 to +210
Color=#ffffff
BorderColor=#ffffff00
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume these values should be some Stylix parameter.

@make-42
Copy link
Contributor Author

make-42 commented Jan 3, 2025

From what I can see, they do contain these magic values because the SVG files that are imported have all the color information. These colors do not appear to the user because the SVG files mask them. There does not seem to a way to automatically enable the themes depending to the DE.

@make-42
Copy link
Contributor Author

make-42 commented Jan 3, 2025

Also, some GNOME users might still use the KWin backend because that's the only one supported on GNOME Wayland

@make-42
Copy link
Contributor Author

make-42 commented Jan 4, 2025

Actually there might be a way to enable these themes depending on what DE is enabled and also making the typography be coherent with the rest of the system by dropping in a custom .config/fcitx5/conf/classicui.conf file.

An example file contains the following:

# Vertical Candidate List
Vertical Candidate List=False
# Use mouse wheel to go to prev or next page
WheelForPaging=True
# Font
Font="Sans 10"
# Menu Font
MenuFont="Sans 10"
# Tray Font
TrayFont="Sans Bold 10"
# Tray Label Outline Color
TrayOutlineColor=#000000
# Tray Label Text Color
TrayTextColor=#ffffff
# Prefer Text Icon
PreferTextIcon=False
# Show Layout Name In Icon
ShowLayoutNameInIcon=True
# Use input method language to display text
UseInputMethodLanguageToDisplayText=True
# Theme
Theme=stylix
# Dark Theme
DarkTheme=stylix
# Follow system light/dark color scheme
UseDarkTheme=True
# Follow system accent color if it is supported by theme and desktop
UseAccentColor=True
# Use Per Screen DPI on X11
PerScreenDPI=False
# Force font DPI on Wayland
ForceWaylandDPI=0
# Enable fractional scale under Wayland
EnableFractionalScale=True

Some of these the user might want to change independently though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants