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

Fix icon color in dark mode #7953

Closed
wants to merge 3 commits into from
Closed

Fix icon color in dark mode #7953

wants to merge 3 commits into from

Conversation

JJJoex
Copy link

@JJJoex JJJoex commented Aug 2, 2021

A new PR to #7917, fixes #7853
QQ截图20210802082831
by adding this at the end of PreferencesDialog.css and it works. Here's comparison.
BEFORE
QQ截图20210718171836
QQ截图20210718171728
QQ截图20210718171802
QQ截图20210718171824
AFTER
QQ截图20210802081841
QQ截图20210802081849
QQ截图20210802081709
QQ截图20210802081729

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

@JJJoex JJJoex changed the title modified Fix icon color in dark mode, a new PR Aug 2, 2021
@calixtus
Copy link
Member

calixtus commented Aug 2, 2021

I'm pretty sure we use Ikonli-icons not just in the preferences dialog. So i guess it would be better, to put that into the base.css?

@calixtus
Copy link
Member

calixtus commented Aug 2, 2021

Btw, keeping the checkboxes in the PR description and checking them, if applicable, is mandatory!

@calixtus
Copy link
Member

calixtus commented Aug 2, 2021

Why did you open a new PR instead of pushing your commit onto the old branch?

@JJJoex
Copy link
Author

JJJoex commented Aug 2, 2021

@calixtus I've tried put it in base.css, but it also changes something else, which makes it weird.
QQ截图20210802080608
I think it should look like the following pic.
QQ截图20210802081709
So I just add it on perferencesDialog

Copy link
Author

@JJJoex JJJoex left a comment

Choose a reason for hiding this comment

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

A discription to the work i've done.

@Siedlerchr
Copy link
Member

You only need to add it to Dark.css so that it only is applied when you select the Dark theme

@JJJoex
Copy link
Author

JJJoex commented Aug 2, 2021

@Siedlerchr I know, but in the figures following:
AFTER
InkedQQ截图20210802080608_LI
BEFORE
InkedQQ截图20210802081709_LI
In this dialog, these icons' color will change, so I think put this code in PreferencesDialog.css would be better.

@Siedlerchr
Copy link
Member

Siedlerchr commented Aug 2, 2021

try the following

to .glyph icon add -fx-icon-color: -jr-theme-text;
and before add the ikonli font icon

.ikonli-font-icon {
	-fx-icon-color: red;
}
.glyph-icon {
    /* This adjusts text alignment within the bounds of text nodes so that
       the text is always vertically centered within the bounds. Based on
       the cap height of the text. */
    -fx-bounds-type: logical_vertical_center;

    /* The base color of icons should always be the same as the text. */
    -fx-fill: -fx-text-base-color;
    -fx-icon-color: -jr-theme-text;
}

@JJJoex
Copy link
Author

JJJoex commented Aug 2, 2021

@Siedlerchr In this way, it works but still have problems. In the figure, you can see this icon is colored by the theme-color while it should be the text base color.
QQ截图20210802151804

@Siedlerchr
Copy link
Member

If you look into IconTheme, you see that there is a method asButton which adds another css class and makes it an icon-button. Seems like you need to add an extra rule for that

@calixtus calixtus changed the title Fix icon color in dark mode, a new PR Fix icon color in dark mode Aug 2, 2021
@Siedlerchr Siedlerchr self-assigned this Aug 16, 2021
@calixtus calixtus mentioned this pull request Aug 16, 2021
5 tasks
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.

Icons in Entry Edit Window not visible in Dark Mode
3 participants