RickStrahl / MarkdownMonster

An extensible Markdown Editor, Viewer and Weblog Publisher for Windows
https://markdownmonster.west-wind.com
Other
1.59k stars 235 forks source link

Document Outline unreadable in Dark mode #1106

Closed indigofairyx closed 6 months ago

indigofairyx commented 6 months ago

the heading text in the document outline is staying black on the dark grey background. its bearly readable.

one the current version. tried checking in the to change it myself but can figure out where that theme coloring is coming from.

image

RickStrahl commented 6 months ago

hmmm... not sure how that's happening. Here's what mine looks like:

image

Only thing I can think of is that perhaps you have hard coded colors in your Windows theme and that's showing up in the Treeview in particular. Although I'm not sure that should be happening because this is custom themed from MahApps (I'd have to check). I would think that if the base theming is the problem you would also see that in the Folder Browser tree view. Neither of those components is using custom colors - just stock styles inherited from Mahapps and dark theme should be an off white color.

indigofairyx commented 6 months ago

Hmmm. Interesting.... I do have a couple custom theme hacks running to add aero to my win10. They might be causing it. I'll keep poking round some more.

I'll also add this is only happening in outline panel. All the others side panels are rendering as they should.

indigofairyx commented 6 months ago

its its any help here my error report from the help menu.

5/2/2024 1:22:01 AM - Unable to parse table data
Duplicate header Name encountered at column index 1
Markdown Monster v3.2.15.0
10.0.19041.1.amd64fre.vb_release.191206-1406 - en-US - NET .NET 8.0.1 - 64 bit
System manufacturer System Product Name, NVIDIA GeForce GTX 1050 Ti, hw-acc: True
WebView: rt: 121.0.2277.112 - sdk: 1.0.2365.46
en-US - en-US
C:\Program Files\Markdown Monster
Portable: False
---
LumenWorks.Framework.IO
   at LumenWorks.Framework.IO.Csv.CsvReader.ReadNextRecord(Boolean onlyReadHeaders, Boolean skipToNextLine)
   at LumenWorks.Framework.IO.Csv.CachedCsvReader.ReadNextRecord(Boolean onlyReadHeaders, Boolean skipToNextLine)
   at LumenWorks.Framework.IO.Csv.CsvReader.ReadNextRecord()
   at MarkdownMonster.Windows.TableParser.ParseCsvStreamToData(Stream stream, String delimiter) in D:\projects\MarkdownMonsterCode\markdownmonster\Windows\TableEditor\TableParser.cs:line 651
   at MarkdownMonster.Windows.TableParser.ParseCsvStringToData(String csvContent, String delimiter) in D:\projects\MarkdownMonsterCode\markdownmonster\Windows\TableEditor\TableParser.cs:line 626
   at MarkdownMonster.Windows.TableParser.ParseMarkdownToData(String tableMarkdown) in D:\projects\MarkdownMonsterCode\markdownmonster\Windows\TableEditor\TableParser.cs:line 314
LumenWorks.Framework.IO.Csv.DuplicateHeaderException
---------------------------

5/2/2024 2:12:28 PM - App: Object reference not set to an instance of an object.
Object reference not set to an instance of an object.
Markdown Monster v3.2.16.0
10.0.19041.1.amd64fre.vb_release.191206-1406 - en-US - NET .NET 8.0.1 - 64 bit
System manufacturer System Product Name, NVIDIA GeForce GTX 1050 Ti, hw-acc: True
WebView: rt: 121.0.2277.112 - sdk: 1.0.2365.46
en-US - en-US
C:\Program Files\Markdown Monster
Portable: False
---
MarkdownMonster
   at MarkdownMonster.Windows.FolderBrowerSidebar.HandleDroppedFiles(String[] files, PathItem target, DragDropEffects effect) in D:\projects\MarkdownMonsterCode\markdownmonster\Windows\FolderBrowserSidebar\FolderBrowerSidebar.xaml.cs:line 1767
   at MarkdownMonster.Windows.FolderBrowerSidebar.TreeViewItem_Drop(Object sender, DragEventArgs e) in D:\projects\MarkdownMonsterCode\markdownmonster\Windows\FolderBrowserSidebar\FolderBrowerSidebar.xaml.cs:line 1679
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.OleDropTarget.RaiseDragEvent(RoutedEvent dragEvent, Int32 dragDropKeyStates, Int32& effects, DependencyObject target, Point targetPoint)
   at System.Windows.OleDropTarget.MS.Win32.UnsafeNativeMethods.IOleDropTarget.OleDrop(Object data, Int32 dragDropKeyStates, Int64 point, Int32& effects)
   at MS.Win32.UnsafeNativeMethods.DoDragDrop(IDataObject dataObject, IOleDropSource dropSource, Int32 allowedEffects, Int32[] finalEffect)
   at System.Windows.OleServicesContext.OleDoDragDrop(IDataObject dataObject, IOleDropSource dropSource, Int32 allowedEffects, Int32[] finalEffect)
   at System.Windows.DragDrop.OleDoDragDrop(DependencyObject dragSource, DataObject dataObject, DragDropEffects allowedEffects)
   at System.Windows.DragDrop.DoDragDrop(DependencyObject dragSource, Object data, DragDropEffects allowedEffects)
   at MarkdownMonster.MainWindow.DragablzItem_PreviewMouseMove(Object sender, MouseEventArgs e) in D:\projects\MarkdownMonsterCode\markdownmonster\MainWindow.xaml.cs:line 2655
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
System.NullReferenceException
---------------------------
RickStrahl commented 6 months ago

Huh? These errors have nothing to do with the rendering of your Document Outline.

RickStrahl commented 6 months ago

I took a look at the markup for the document outline, and there's nothing special that I can see about the item or the text that's rendering it - there's no hardcoded styling, it should just use the default styling, which shouldn't be any different than any of the other lists like the File Browser, or Favorites sidebar list.

The icon and heading level have hardcoded colors and they show correctly as would be expected.

Even if you have custom settings in your Windows color scheme that doesn't really explain that the problem only shows on the document outline.

Ok, other controls that use the same 'style' should be the Git dialog (only works on Git folders) and the Snippets Addin (the {#} icon). Can you check those forms?

indigofairyx commented 6 months ago

the snippit window is rendering correctly.

image

and im not a developer or coder. dont have any git repos or know how to use that part of MM. no weblogs either.

just been trying out MM for a personal\offline notes collection.

so far its wonderful for that! i might add im also new to .md, just decided to learn this a week ago. for a while now ive been using Notepad++ in .txt format for my daily notes and logs. and while Notepad++ has markdown panel plugins the lags and bugs aren't good for editing, just viewing.

RickStrahl commented 6 months ago

Hmmm... I'm at a loss why that renders incorrectly for you. The list here is basically identical to the way it's set up in the Document outline.

indigofairyx commented 6 months ago

well. i just found the culprit. this was my own doing.

ive been using https://github.com/namazso/SecureUxTheme to install custom aero themes over Win10. i just tried uninstalling this and the Outline Menu corrected itself!

can call this issue closed.

Thank you for spending the time to look into it!

RickStrahl commented 6 months ago

Thanks for letting me know. Still wondering why this only applied to that one window using default theming as do other windows/lists.

Glad you found the issue at least. Did you know what the exact tweak was? Did you explicitly set the color for list items?