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.6k stars 409 forks source link

Horizontal line (-----) not visible in preview in dark theme #1205

Closed Nuntius0 closed 5 years ago

Nuntius0 commented 5 years ago

Expected behaviour

Preview renders horizontal rule correctly in white.

Actual behaviour

Horizontal lines in markdown file (see https://github.com/pbek/QOwnNotes/blob/develop/src/demonotes/Markdown%20Cheatsheet.md#horizontal-rule) are not really visible in the preview screen.

Steps to reproduce

  1. Use QOwnNotes on a KDE Plasma 5.12 Desktop with theme Breeze Dark
  2. Set layout to "Full"
  3. Write a new note:
    
    There should be

line here.


4. With full screen brightness, you can just make out the black horizontal line on the grey preview background.

#### Output from the debug section in the settings dialog

QOwnNotes Debug Information
===========================

## General Info

**Current Date**: `So. Mai 12 12:17:14 2019`
**Version**: `19.5.2`
**Build date**: `May  8 2019`
**Build number**: `536`
**Platform**: `linux`
**Operating System**: `Ubuntu 18.04.2 LTS`
**Build architecture**: `x86_64`
**Current architecture**: `x86_64`
**Release**: `Launchpad PPA`
**Qt Version (build)**: `5.9.5`
**Qt Version (runtime)**: `5.9.5`
**Portable mode**: `no`
**Settings path / key**: `/home/user/.config/PBE/QOwnNotes.conf`
**Application database path**: `/home/user/.local/share/PBE/QOwnNotes/QOwnNotes.sqlite`
**Application arguments**: `/usr/bin/QOwnNotes`
**Qt Debug**: `0`
**Locale (system)**: `en_US`
**Locale (interface)**: *empty*
**Icon theme**: `breeze-dark`
**Notes in current note folder**: `22`
**Enabled scripts**: `0`

Let me know if you require other bits of the output

#### Relevant log output in the Log panel

Let me know if you need this.

<!-- You have to enable enable the Log panel in the Windows menu! -->
<!-- Please also enable debug output in the options of panel. -->
<!-- Alternatively you can also turn on a log file in the settings. -->
pbek commented 5 years ago

You didn't post your settings... Did you enable dark mode in the application?

Nuntius0 commented 5 years ago

It happens both with dark mode on:

Settings

ActiveNoteHistoryItem (NoteHistoryItem): <binary data> Debug/fakeOldVersionNumber (QString): false Debug/fileLogging (QString): false DistractionFreeMode/isEnabled (QString): false DistractionFreeMode/menuBarGeometry (QByteArray): <binary data> DistractionFreeMode/menuBarHeight (QString): 30 DistractionFreeMode/menuBarVisible (QString): true DistractionFreeMode/windowState (QByteArray): <binary data> Editor/CurrentSchemaKey (QString): EditorColorSchema-6033d61b-cb96-46d5-a3a8-20d5172017eb Editor/autoBracketClosing (QString): true Editor/autoBracketRemoval (QString): true Editor/editorWidthInDFMOnly (QString): true Editor/highlightCurrentLine (QString): true Editor/vimMode (QString): false FileDialog/LastPath (QString): /home/thore FileDialog/LastPath-NotePDFExport (QString): /home/thore IssueAssistantDialog/geometry (QByteArray): <binary data> LastUpdateCheck (QDateTime): 2019-05-12T20:27:56 MainWindow/mainToolBar.iconSize (QString): 22 MainWindow/noteTextEdit.code.font (QString): Hack,9,-1,7,50,0,0,0,0,0,Regular MainWindow/noteTextEdit.font (QString): Noto Sans,10,-1,0,50,0,0,0,0,0,Regular MainWindow/noteTextView.code.font (QString): Hack,9,-1,7,50,0,0,0,0,0,Regular MainWindow/noteTextView.font (QString): Noto Sans,10,-1,0,50,0,0,0,0,0,Regular MainWindow/noteTextView.rtl (QString): false MainWindow/noteTextView.underline (QString): false MainWindow/showNotesFromAllNoteSubFolders (QString): false MessageBoxOverride/move-notes (QString): 16384 NoteHistory-1 (QVariantList): <variant list with 24 item(s)> NoteHistoryCurrentIndex-1 (QString): 23 PiwikClientId (QString): <hidden> Printer/NotePDFExport (QByteArray): <binary data> SearchEngineId (QString): 2 SettingsDialog/geometry (QByteArray): <binary data> SettingsDialog/mainSplitterState (QByteArray): <binary data> ShowSystemTray (QString): false StartHidden (QString): false WelcomeDialog/geometry (QByteArray): <binary data> acceptAllExternalModifications (QString): false allowDifferentNoteFileName (QString): false allowNoteEditing (bool): true allowOnlyOneAppInstance (QString): true appMetrics/disableAppHeartbeat (QString): false appMetrics/disableTracking (QString): false appMetrics/notificationShown (QString): true automaticNoteFolderDatabaseClosing (QString): false closeTodoListAfterSave (QString): false cryptoKey (QString): <hidden> currentNoteFolderId (QString): 1 currentWorkspace (QString): initial cursorWidth (QString): 1 customNoteFileExtensionList: empty darkMode (QString): true darkModeColors (QString): true darkModeTrayIcon (QString): true defaultNoteFileExtension (QString): md disableAutomaticUpdateDialog (QString): true disableSavedSearchesAutoCompletion (QString): false dockWasInitializedOnce (QString): true enableSocketServer (QString): true externalEditorPath (QString): empty fullyHighlightedBlockquotes (QString): false gitCommitInterval (QString): 30 gitExecutablePath (QString): empty gitLogCommand (QString): empty guiFirstRunInit (bool): true ignoreAllExternalModifications (QString): false ignoreAllExternalNoteFolderChanges (QString): false ignoreNoteSubFolders (QString): ^\. imageScaleDown (QString): false imageScaleDownMaximumHeight (QString): 1024 imageScaleDownMaximumWidth (QString): 1024 initialLayoutIdentifier (QString): full insertTimeFormat (QString): empty interfaceFontSize (QString): 11 interfaceLanguage (QString): empty internalIconTheme (QString): false itemHeight (QString): 24 localTrash/autoCleanupDays (QString): 30 localTrash/autoCleanupEnabled (QString): true localTrash/supportEnabled (QString): true markdownHighlightingEnabled (QString): true navigationPanelHideSearch (QString): false networking/ignoreSSLErrors (QString): true networking/proxyType (QString): 2 newNoteAskHeadline (QString): false noteEditIsCentralWidget (QString): true noteListPreview (QString): false noteSaveIntervalTime (QString): 10 noteSubfoldersPanelDisplayAsFullTree (QString): true noteSubfoldersPanelHideSearch (QString): false noteSubfoldersPanelOrder (QString): 0 noteSubfoldersPanelShowFullPath (QString): false noteSubfoldersPanelShowNotesRecursively (QString): false noteSubfoldersPanelShowRootFolderName (QString): true noteSubfoldersPanelSort (QString): 0 notesPanelOrder (QString): 0 notesPanelSort (QString): 1 notesPath (QString): /home/thore/Nextcloud/Notes notifyAllExternalModifications (QString): false overrideInterfaceFontSize (QString): false ownCloud/password (QString): <hidden> ownCloud/serverUrl (QString): https://cloud.goebel.family ownCloud/supportEnabled (QString): true ownCloud/todoCalendarBackend (QString): 3 ownCloud/todoCalendarCalDAVPassword (QString): <hidden> ownCloud/todoCalendarCalDAVServerUrl (QString): empty ownCloud/todoCalendarCalDAVUsername (QString): empty ownCloud/todoCalendarDisplayNameList: empty ownCloud/todoCalendarEnabledList: empty ownCloud/todoCalendarEnabledUrlList: empty ownCloud/todoCalendarUrlList: empty ownCloud/userName (QString): thore ownCloudInfo/appIsValid (bool): true ownCloudInfo/connectionErrorMessage (QString): Unknown error ownCloudInfo/notesPathExistsText (QString): yes ownCloudInfo/serverVersion (QString): 16.0.0.9 restoreCursorPosition (QString): true savedSearches/noteFolder-1 (QString): Note 2019-05-12T12.13.27 showMenuBar (bool): true showStatusBar (bool): true systemIconTheme (QString): false taggingShowNotesRecursively (QString): false tagsPanelHideSearch (QString): false tagsPanelOrder (QString): 0 tagsPanelSort (QString): 0 toolbar/1/items (QStringList): action_New_note, action_Find_note, action_Remove_note, action_Open_note_in_external_editor, actionShow_local_trash, actionAllow_note_editing, , action_Back_in_note_history, action_Forward_in_note_history, , action_Find_text_in_note, actionReplace_in_current_note, , actionShow_versions, actionShow_trash, actionShare_note, , actionOpen_List toolbar/1/name (QString): mainToolBar toolbar/1/title (QString): main toolbar toolbar/2/items (QStringList): actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote toolbar/2/name (QString): formattingToolbar toolbar/2/title (QString): formatting toolbar toolbar/3/items (QStringList): actionInsert_Link_to_note, actionInsert_image, actionInsert_current_time toolbar/3/name (QString): insertingToolbar toolbar/3/title (QString): inserting toolbar toolbar/4/items (QStringList): action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note toolbar/4/name (QString): encryptionToolbar toolbar/4/title (QString): encryption toolbar toolbar/5/items (QStringList): actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size toolbar/5/name (QString): windowToolbar toolbar/5/title (QString): window toolbar toolbar/6/items (QString): action_Quit toolbar/6/name (QString): quitToolbar toolbar/6/title (QString): quit toolbar toolbar/size (QString): 6 useUNIXNewline (QString): false webSocketServerService/bookmarksNoteName (QString): Bookmarks webSocketServerService/bookmarksTag (QString): bookmarks webSocketServerService/port (QString): 22222 workspace-initial/name (QString): Full workspace-initial/noteSubFolderDockWidgetVisible (QString): true workspace-initial/windowState (QByteArray): <binary data> workspaces (QString): initial

and with dark mode off (but the interface is still dark when KDE is set to use Breeze Dark as a theme):

Settings

ActiveNoteHistoryItem (NoteHistoryItem): <binary data> Debug/fakeOldVersionNumber (QString): false Debug/fileLogging (QString): false DistractionFreeMode/isEnabled (QString): false DistractionFreeMode/menuBarGeometry (QByteArray): <binary data> DistractionFreeMode/menuBarHeight (QString): 30 DistractionFreeMode/menuBarVisible (QString): true DistractionFreeMode/windowState (QByteArray): <binary data> Editor/CurrentSchemaKey (QString): EditorColorSchema-6033d61b-cb96-46d5-a3a8-20d5172017eb Editor/autoBracketClosing (QString): true Editor/autoBracketRemoval (QString): true Editor/editorWidthInDFMOnly (QString): true Editor/highlightCurrentLine (QString): true Editor/vimMode (QString): false FileDialog/LastPath (QString): /home/thore FileDialog/LastPath-NotePDFExport (QString): /home/thore IssueAssistantDialog/geometry (QByteArray): <binary data> LastUpdateCheck (QDateTime): 2019-05-12T20:29:04 MainWindow/mainToolBar.iconSize (QString): 22 MainWindow/noteTextEdit.code.font (QString): Hack,9,-1,7,50,0,0,0,0,0,Regular MainWindow/noteTextEdit.font (QString): Noto Sans,10,-1,0,50,0,0,0,0,0,Regular MainWindow/noteTextView.code.font (QString): Hack,9,-1,7,50,0,0,0,0,0,Regular MainWindow/noteTextView.font (QString): Noto Sans,10,-1,0,50,0,0,0,0,0,Regular MainWindow/noteTextView.rtl (QString): false MainWindow/noteTextView.underline (QString): false MainWindow/showNotesFromAllNoteSubFolders (QString): false MessageBoxOverride/move-notes (QString): 16384 NoteHistory-1 (QVariantList): <variant list with 24 item(s)> NoteHistoryCurrentIndex-1 (QString): 23 PiwikClientId (QString): <hidden> Printer/NotePDFExport (QByteArray): <binary data> SearchEngineId (QString): 2 SettingsDialog/geometry (QByteArray): <binary data> SettingsDialog/mainSplitterState (QByteArray): <binary data> ShowSystemTray (QString): false StartHidden (QString): false WelcomeDialog/geometry (QByteArray): <binary data> acceptAllExternalModifications (QString): false allowDifferentNoteFileName (QString): false allowNoteEditing (bool): true allowOnlyOneAppInstance (QString): true appMetrics/disableAppHeartbeat (QString): false appMetrics/disableTracking (QString): false appMetrics/notificationShown (QString): true automaticNoteFolderDatabaseClosing (QString): false closeTodoListAfterSave (QString): false cryptoKey (QString): <hidden> currentNoteFolderId (QString): 1 currentWorkspace (QString): initial cursorWidth (QString): 1 customNoteFileExtensionList: empty darkMode (QString): false darkModeColors (QString): true darkModeTrayIcon (QString): false defaultNoteFileExtension (QString): md disableAutomaticUpdateDialog (QString): true disableSavedSearchesAutoCompletion (QString): false dockWasInitializedOnce (QString): true enableSocketServer (QString): true externalEditorPath (QString): empty fullyHighlightedBlockquotes (QString): false gitCommitInterval (QString): 30 gitExecutablePath (QString): empty gitLogCommand (QString): empty guiFirstRunInit (bool): true ignoreAllExternalModifications (QString): false ignoreAllExternalNoteFolderChanges (QString): false ignoreNoteSubFolders (QString): ^\. imageScaleDown (QString): false imageScaleDownMaximumHeight (QString): 1024 imageScaleDownMaximumWidth (QString): 1024 initialLayoutIdentifier (QString): full insertTimeFormat (QString): empty interfaceFontSize (QString): 11 interfaceLanguage (QString): empty internalIconTheme (QString): false itemHeight (QString): 24 localTrash/autoCleanupDays (QString): 30 localTrash/autoCleanupEnabled (QString): true localTrash/supportEnabled (QString): true markdownHighlightingEnabled (QString): true navigationPanelHideSearch (QString): false networking/ignoreSSLErrors (QString): true networking/proxyType (QString): 2 newNoteAskHeadline (QString): false noteEditIsCentralWidget (QString): true noteListPreview (QString): false noteSaveIntervalTime (QString): 10 noteSubfoldersPanelDisplayAsFullTree (QString): true noteSubfoldersPanelHideSearch (QString): false noteSubfoldersPanelOrder (QString): 0 noteSubfoldersPanelShowFullPath (QString): false noteSubfoldersPanelShowNotesRecursively (QString): false noteSubfoldersPanelShowRootFolderName (QString): true noteSubfoldersPanelSort (QString): 0 notesPanelOrder (QString): 0 notesPanelSort (QString): 1 notesPath (QString): /home/thore/Nextcloud/Notes notifyAllExternalModifications (QString): false overrideInterfaceFontSize (QString): false ownCloud/password (QString): <hidden> ownCloud/serverUrl (QString): https://cloud.goebel.family ownCloud/supportEnabled (QString): true ownCloud/todoCalendarBackend (QString): 3 ownCloud/todoCalendarCalDAVPassword (QString): <hidden> ownCloud/todoCalendarCalDAVServerUrl (QString): empty ownCloud/todoCalendarCalDAVUsername (QString): empty ownCloud/todoCalendarDisplayNameList: empty ownCloud/todoCalendarEnabledList: empty ownCloud/todoCalendarEnabledUrlList: empty ownCloud/todoCalendarUrlList: empty ownCloud/userName (QString): thore ownCloudInfo/appIsValid (bool): true ownCloudInfo/connectionErrorMessage (QString): Unknown error ownCloudInfo/notesPathExistsText (QString): yes ownCloudInfo/serverVersion (QString): 16.0.0.9 restoreCursorPosition (QString): true savedSearches/noteFolder-1 (QString): Note 2019-05-12T12.13.27 showMenuBar (bool): true showStatusBar (bool): true systemIconTheme (QString): false taggingShowNotesRecursively (QString): false tagsPanelHideSearch (QString): false tagsPanelOrder (QString): 0 tagsPanelSort (QString): 0 toolbar/1/items (QStringList): action_New_note, action_Find_note, action_Remove_note, action_Open_note_in_external_editor, actionShow_local_trash, actionAllow_note_editing, , action_Back_in_note_history, action_Forward_in_note_history, , action_Find_text_in_note, actionReplace_in_current_note, , actionShow_versions, actionShow_trash, actionShare_note, , actionOpen_List toolbar/1/name (QString): mainToolBar toolbar/1/title (QString): main toolbar toolbar/2/items (QStringList): actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote toolbar/2/name (QString): formattingToolbar toolbar/2/title (QString): formatting toolbar toolbar/3/items (QStringList): actionInsert_Link_to_note, actionInsert_image, actionInsert_current_time toolbar/3/name (QString): insertingToolbar toolbar/3/title (QString): inserting toolbar toolbar/4/items (QStringList): action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note toolbar/4/name (QString): encryptionToolbar toolbar/4/title (QString): encryption toolbar toolbar/5/items (QStringList): actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size toolbar/5/name (QString): windowToolbar toolbar/5/title (QString): window toolbar toolbar/6/items (QString): action_Quit toolbar/6/name (QString): quitToolbar toolbar/6/title (QString): quit toolbar toolbar/size (QString): 6 useUNIXNewline (QString): false webSocketServerService/bookmarksNoteName (QString): Bookmarks webSocketServerService/bookmarksTag (QString): bookmarks webSocketServerService/port (QString): 22222 workspace-initial/name (QString): Full workspace-initial/noteSubFolderDockWidgetVisible (QString): true workspace-initial/windowState (QByteArray): <binary data> workspaces (QString): initial

Yes, I did close (Ctrl+Q) and reopen QOwnNotes inbetween viewing whether there's any visual difference (there is none, the horizontal bar is black in both cases).

pbek commented 5 years ago

Thank you for your feedback. I can't reproduce this in dark mode. The <hr> is white for me in the preview. What happens when you install the script Custom note preview styling from the script repository and set something like hr {color: white; border-color: white; background-color: white}?

Nuntius0 commented 5 years ago

No luck either, here's what I get with the custom preview styling:

screenshot_qownnotes0

Same when manually enabling dark mode in QOwnNotes' settings.

pbek commented 5 years ago

Do you care if it works if you are using the breeze light desktop theme?

pbek commented 5 years ago

The hr-styling doesn't work for me neither. But I'm using KDE Neon with breeze light. It seems you can't define a custom color via css for a hr (https://doc.qt.io/qt-5/richtext-html-subset.html), so it seems Qt gets the color dictated from the desktop theme.

Nuntius0 commented 5 years ago

I fail to fully switch the desktop theme :see_no_evil:. The bottom bar turns light, but all the apps, even KMail and Dolphin stay dark, even after rebooting -.- But I guess since in daily use I'll stay on dark anyway, we can close this as a framework limitation?

pbek commented 5 years ago

I tested with breeze dark yesterday and I had the same issue. I guess that's a thing between KDE and Qt, I can't do much about it right now, so we can close this at the moment.