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

Css for the note title editor doesn't work #515

Open
KirilOkun opened this issue Jan 7, 2023 · 7 comments
Open

Css for the note title editor doesn't work #515

KirilOkun opened this issue Jan 7, 2023 · 7 comments

Comments

@KirilOkun
Copy link

KirilOkun commented Jan 7, 2023

I've spent over an hour trying all sorts of combinations in the themes.ini to make the color of the note title field above the note body to be other than blue. As others have pointed out it looks bad in the dark themes. I've tried all possible themes, then tried all of seemingly relevant selectors in those themes. Nothing works. What is the selector for the note editor field?

image

@boo-yee
Copy link

boo-yee commented Jan 12, 2023

The key is noteTitleEditorActiveCss and noteTitleEditorInactiveCss, and the selector is QLineEdit > color.

I take theme 'Solarized Dark' for example.

[Solarized Dark (for dark system)]
editorCss=body { background-color: #002b36; color: #839496; } a { color: #268bd2;} img { background-color: #839496; }
noteTitleEditorActiveCss=QLineEdit {background-color: transparent; color: #839496; border: 1px solid #268bd2; border-radius: 4px; }
noteTitleEditorInactiveCss=QLineEdit {background-color: transparent; color: #268bd2; border-radius: 0px;} QLineEdit:hover {border: 1px solid #808080; border-radius: 4px;}
searchInputCss=QLineEdit { } QLineEdit:hover { border: 1px solid #808080; border-radius: 4px;}

You can change 'color: #839496;' in the third line and 'color: #268bd2;' in the fourth line to achieve your goal.

And you have to make sure you are modifying the right file. By default, the theme.ini file is located at /usr/share/nixnote2/.

@KirilOkun
Copy link
Author

I did try the TitleEditor ones but it didn't work. Thank you very much for the detailed explanation. I'll give it a go.

@KirilOkun
Copy link
Author

So i opened the correct file and tried the following. The text is still the same dark color. I know that this is the correct file because some things do change but not that particular element. Any other ideas?

// these styles were in the Mint Dark Y Theme originally
titleActiveCss=QLineEdit { background-color: transparent; border-radius: 0px; color: white; } QLineEdit:hover { border: 1px solid #8e8e8e; color: #ededed; background-color: transparent; border-radius: 4px; }
titleInactiveCss=QLineEdit { border: none; background-color: transparent; border-radius: 4px; color: white; }

// i also added the selectors you described with the same styles.
noteTitleEditorActiveCss=QLineEdit { background-color: transparent; border-radius: 0px; color: white; } QLineEdit:hover { border: 1px solid #8e8e8e; color: #ededed; background-color: transparent; border-radius: 4px; }
noteTitleEditorInactiveCss=QLineEdit { border: none; background-color: transparent; border-radius: 4px; color: white; }

@boo-yee
Copy link

boo-yee commented Jan 13, 2023

image
themes.zip

I uploaded my themes.ini file, with the inactive title color value changed to white only, you could test with it. It works on my Linux, like the screenshot shows.

@KirilOkun
Copy link
Author

thank you. much appreciated.

@boo-yee
Copy link

boo-yee commented Jan 20, 2023

I just notice that the version you are using looks like a little classic, you may want to try a later one if it still can't work now. The version I tested on previously is 2.1.2-1.

@KirilOkun
Copy link
Author

I installed it from Ubuntu app repository. Maybe that package has not been updated properly. Thanks for the follow up.

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

No branches or pull requests

2 participants