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
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/fcitx5/highlight.svg.mustache
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"

Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
height="40"
x="10.000001"
y="10.000001"
fill="#015ad7"
fill="#{{base04-hex}}"
stroke="#000000"
stroke-width="0"
rx="0"
Expand Down
25 changes: 14 additions & 11 deletions modules/fcitx5/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
template = ./theme.conf.mustache;
extension = "conf";
};
theme-kwin = config.lib.stylix.colors {
template = ./theme-kwin.conf.mustache;
extension = "conf";
};
highlight = config.lib.stylix.colors {
template = ./highlight.svg.mustache;
extension = "svg";
Expand All @@ -17,17 +21,16 @@
extension = "svg";
};
in {
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?

}
2 changes: 1 addition & 1 deletion modules/fcitx5/panel.svg.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
fill="#f0f0f0"
stroke="#adadad"
rx="0"
style="fill:#{{base00-hex}};fill-opacity:1;stroke:#{{base01-hex}};stroke-width:1.2;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter480)"
style="fill:#{{base01-hex}};fill-opacity:1;stroke:#{{base01-hex}};stroke-width:1.2;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter480)"
inkscape:path-effect="#path-effect1"
sodipodi:type="rect"
d="m 29.5,10.5 h 1 c 10.49341,0 19,8.50659 19,19 v 1 c 0,10.49341 -8.50659,19 -19,19 h -1 c -10.49341,0 -19,-8.50659 -19,-19 v -1 c 0,-10.49341 8.50659,-19 19,-19 z" />
Expand Down
241 changes: 241 additions & 0 deletions modules/fcitx5/theme-kwin.conf.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
[Metadata]
Name=Stylix (KWin)
Version=0.1
Author="sanweiya and ontake (make-42)"
Description="Stylix fcitx5 theme based on the mellow-themes by sanweiya"

[InputPanel]
NormalColor=#{{base05-hex}}
HighlightCandidateColor=#{{base01-hex}}
EnableBlur=False
BlurMask=
FullWidthHighlight=True
HighlightColor=#ffffff
HighlightBackgroundColor=#a5a5a5
Comment on lines +13 to +14
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.


[InputPanel/BlurMargin]
Left=0
Right=0
Top=0
Bottom=0

[InputPanel/Background]
Image=panel.svg
Color=#ffffff
BorderColor=#ffffff00
Comment on lines +24 to +25
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.

BorderWidth=0
Overlay=
Gravity="Top Left"
OverlayOffsetX=0
OverlayOffsetY=0
HideOverlayIfOversize=False

[InputPanel/Background/Margin]
Left=15
Right=15
Top=15
Bottom=15

[InputPanel/Background/OverlayClipMargin]
Left=0
Right=0
Top=0
Bottom=0

[InputPanel/Highlight]
Image=highlight.svg
Color=#ffffff
BorderColor=#ffffff00
Comment on lines +47 to +48
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.

BorderWidth=0
Overlay=
Gravity="Top Left"
OverlayOffsetX=0
OverlayOffsetY=0
HideOverlayIfOversize=False

[InputPanel/Highlight/Margin]
Left=15
Right=15
Top=10
Bottom=10

[InputPanel/Highlight/OverlayClipMargin]
Left=0
Right=0
Top=0
Bottom=0

[InputPanel/Highlight/HighlightClickMargin]
Left=0
Right=0
Top=0
Bottom=0

[InputPanel/ContentMargin]
Left=9
Right=9
Top=7
Bottom=7

[InputPanel/TextMargin]
Left=9
Right=9
Top=6
Bottom=7

[InputPanel/PrevPage]
Image=

[InputPanel/PrevPage/ClickMargin]
Left=5
Right=5
Top=4
Bottom=4

[InputPanel/NextPage]
Image=

[InputPanel/NextPage/ClickMargin]
Left=5
Right=5
Top=4
Bottom=4

[InputPanel/ShadowMargin]
Left=0
Right=0
Top=0
Bottom=0

[Menu]
NormalColor=#000000
HighlightCandidateColor=#ffffff
Comment on lines +111 to +112
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.

Spacing=0

[Menu/Background]
Image=panel.svg
Color=#ffffff
BorderColor=#ffffff00
Comment on lines +117 to +118
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.

BorderWidth=0
Overlay=
Gravity="Top Left"
OverlayOffsetX=0
OverlayOffsetY=0
HideOverlayIfOversize=False

[Menu/Background/Margin]
Left=11
Right=11
Top=11
Bottom=11

[Menu/Background/OverlayClipMargin]
Left=0
Right=0
Top=0
Bottom=0

[Menu/Highlight]
Image=highlight.svg
Color=#ffffff
BorderColor=#ffffff00
Comment on lines +140 to +141
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.

BorderWidth=0
Overlay=
Gravity="Top Left"
OverlayOffsetX=0
OverlayOffsetY=0
HideOverlayIfOversize=False

[Menu/Highlight/Margin]
Left=5
Right=5
Top=5
Bottom=5

[Menu/Highlight/OverlayClipMargin]
Left=0
Right=0
Top=0
Bottom=0

[Menu/Separator]
Image=
Color=#c0c0c0
BorderColor=#ffffff00
Comment on lines +163 to +164
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.

BorderWidth=0
Overlay=
Gravity="Top Left"
OverlayOffsetX=0
OverlayOffsetY=0
HideOverlayIfOversize=False

[Menu/Separator/Margin]
Left=0
Right=0
Top=0
Bottom=0

[Menu/Separator/OverlayClipMargin]
Left=0
Right=0
Top=0
Bottom=0

[Menu/CheckBox]
Image=radio.svg
Color=#ffffff
BorderColor=#ffffff00
Comment on lines +186 to +187
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.

BorderWidth=0
Overlay=
Gravity="Top Left"
OverlayOffsetX=0
OverlayOffsetY=0
HideOverlayIfOversize=False

[Menu/CheckBox/Margin]
Left=0
Right=0
Top=0
Bottom=0

[Menu/CheckBox/OverlayClipMargin]
Left=0
Right=0
Top=0
Bottom=0

[Menu/SubMenu]
Image=arrow.svg
Color=#ffffff
BorderColor=#ffffff00
Comment on lines +209 to +210
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.

BorderWidth=0
Overlay=
Gravity="Top Left"
OverlayOffsetX=0
OverlayOffsetY=0
HideOverlayIfOversize=False

[Menu/SubMenu/Margin]
Left=0
Right=0
Top=0
Bottom=0

[Menu/SubMenu/OverlayClipMargin]
Left=0
Right=0
Top=0
Bottom=0

[Menu/ContentMargin]
Left=11
Right=11
Top=11
Bottom=11

[Menu/TextMargin]
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

3 changes: 2 additions & 1 deletion modules/fcitx5/theme.conf.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Bottom=0

[Menu/Highlight]
Image=highlight.svg
Color=#{{base05-hex}}
Color=#{{base01-hex}}
BorderColor=#{{base05-hex}}00
BorderWidth=0
Overlay=
Expand Down Expand Up @@ -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

Loading