pbek / QOwnNotes

QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.
https://www.qownnotes.org/
GNU General Public License v2.0
4.65k stars 412 forks source link

Text color of “unspecified string” on Japanese input method is too pale to read #1815

Closed suzusime closed 4 years ago

suzusime commented 4 years ago

Actual behaviour

To write Japanese text, many Japanese people (including me) use Japanese input method softwares which execute kana-to-kanji conversion.

The process of kana-to-kanji conversion is (as I know):

  1. Type kana spelling (representing the pronunciation)
  2. Select kanji text (disired text) from list
  3. Finish

After stage 3, kanji text (disired text) are input to the text area and treated the same as normal Latin text. In stage 1 or 2, however, the text are in an unique status called “unspecified string”(未確定文字列).

The problem is that in QOwnNotes (on Windows 10) text in stage 2 are displayed in pale grey and difficult to read.

QOwnNotes and Microsoft IME: qown_msime

QOwnNotes and SKKFEP: qown_skkfep

(I use Windows and don't know the behavior on other OSs.)

Expected behaviour

Could you display the text in the same color as normal text or add option to select color of the text on color theme settings?

For example, I will show the behaviour on Windows Notepad below.

Notepad and Microsoft IME: notepad_msime

Notepad and SKKFEP: notepad_skkfep

Steps to reproduce

Type Japanese text using kana-to-kanji conversion systems on Windows 10.

pbek commented 4 years ago

I'm not sure what is causing this. Can you please try to turn off highlighting in the Editor settings to see if it is caused by the highlighter. There should be no coloring at all then.

pbek commented 4 years ago

And can you please post the output from the debug settings (see issue template).

suzusime commented 4 years ago

Turning on "Enable Markdown highlighting" and turning on "Highlight the current line" (as I showed above): qown_msime5

Turning on "Enable Markdown highlighting" and turning off "Highlight the current line": qown_msime4

Turning off "Enable Markdown highlighting" and turning on "Highlight the current line": qown_msime2

Turning off "Enable Markdown highlighting" and turning off "Highlight the current line": qown_msime3


So, this issue appears to relate to "Highlight the current line" feature. With turning on "Highlight the current line", it seems that the text color of unspecified string is pale grey regardless what a color theme is selected (so making "current line background color" dark is workaround).

The debug log of the time when I typed text (with turning off "Enable Markdown highlighting" and turning on "Highlight the current line") is shown below (however, I think there is no information about the issue).

Expand
[16:28:35] [debug] cloudConnection: CloudConnection: 1 "****" "https://****" "****" 1
[16:28:37] [debug] cloudConnection: CloudConnection: 1 "****" "https://****" "****" 1
[16:28:39] [debug] storing note file: "Test text.md"
[16:28:39] [debug] stored note: Note: 2 "Test text" "Test text.md" 1 "_zatsu" false
[16:28:39] [debug] storeUpdatedNotesToDisk - 'count': 1
[16:28:39] [status] Stored 1 note(s) to disk
suzusime commented 4 years ago

I guess this pale text color is for black background (as with turning off "Highlight the current line"), but in QOwnNotes with turning on "Highlight the current line" the feature to make the background black is disabled.

pbek commented 4 years ago

You can set the background color in the Editor fonts and colors settings. It is then used in QOwnNotesMarkdownTextEdit::highlightCurrentLine().

suzusime commented 4 years ago

When I wrote

making "current line background color" dark is workaround

I intended to say this setting can help :)

After the above inspection, I understood that using themes whose current line background color is dark made no problem for me. However, I hope unspecified string are readable even with themes whose current line background color is light., someday. (I know well that issues about input methods are difficult, much environment dependent, language-specific and with little information...)

pbek commented 4 years ago

I hope unspecified string are readable even with themes whose current line background color is light., someday.

If you find any support for it by the Qt framework please let me know. :wink:

I know well that issues about input methods are difficult, much environment dependent, language-specific and with little information...

Yes, they are. :smile: And most of it depends on the used framework (Qt in this case).