<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Impact Analysis of generic darkmode rendering of plugin dock panels (from PR #11711 )]]></title><description><![CDATA[<p dir="auto">[ <em>This is feedback for some of the points discussed in <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/pull/11711" rel="nofollow ugc">Notepad++ PR #11711</a>. So, the referred quotes in this post refer to the conversation items in that <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/pull/11711" rel="nofollow ugc">PR</a>.</em> ]</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/donho" aria-label="Profile: donho">@<bdi>donho</bdi></a> &amp; @ozone10:</p>
<blockquote>
<p dir="auto">Let’s remove (comment) it. We will see users’ reaction about this feature to add it back, or to add an non-GUI option in config, or even an empty xml file as sentinel for enable this option.</p>
</blockquote>
<p dir="auto">I have tested the NPP commit with my <a href="https://github.com/shriprem/FWDataViz" rel="nofollow ugc">Fixed-Width Data Visualizer</a> plugin and providing the relevant feedback here.</p>
<p dir="auto">Darkmode support was added to the <em>FWDataViz</em> plugin soon after it featured in NPP, over a year ago. Now with the generic darkmode rendering for all plugin dock panels in NPP, I was interested to see if this caused issues with <em>FWDataViz</em> which already had its own darkmode support. My observations:</p>
<ol>
<li>
<p dir="auto">Thankfully, there were no crashes or interface blemishes when NPP’s generic darkmode rendering and the plugin’s own darkmode rendering were both simultaneously active.</p>
</li>
<li>
<p dir="auto">Also, the plugin panel was getting the darkmode enable/disable toggles and tone changes immediately, with no restart required in NPP. This could be because maybe I missed turning off all the darkmode render code in <em>FWDataViz</em>, OR I am misunderstanding this statement:</p>
</li>
</ol>
<blockquote>
<p dir="auto">Also current implementation require restart, user still must close Notepad++ to apply new config.</p>
</blockquote>
<ol start="3">
<li>When I had just the NPP darkmode rendering active, it failed to do its job only on the <strong><em>three-state checkbox</em></strong> on the <em>FWDataViz</em> side panel.<br />
<img src="https://user-images.githubusercontent.com/45252729/172060015-19f3a1a7-761e-4a48-90fa-158de62acdf6.png" alt="image" class=" img-fluid img-markdown" /><br />
That can be easily fixed, if needed, in the NPP darkmode render code by accounting for <code>BS_AUTO3STATE</code> controls as seen in these code snippets from the <a href="https://github.com/shriprem/FWDataViz/blob/fec61a300cf18571b963a26859301594433e54cf/src/Darkmode/NppDarkMode.cpp#L377" rel="nofollow ugc">adapted version of NppDarkmode.cpp</a> for the <em>FWDataViz</em> plugin:</li>
</ol>
<pre><code class="language-C++">...
         if (wcscmp(className, WC_BUTTON) == 0)
         {
            auto nButtonStyle = ::GetWindowLongPtr(hwnd, GWL_STYLE) &amp; 0xF;
            switch (nButtonStyle)
            {
               case BS_CHECKBOX:
               case BS_AUTOCHECKBOX:
               case BS_AUTO3STATE:
               case BS_RADIOBUTTON:
               case BS_AUTORADIOBUTTON:
                  if (p.subclass)
                  {
                     subclassButtonControl(hwnd);
                  }
                  break;
...
...
...
      int iPartID = BP_CHECKBOX;
      if (nButtonStyle == BS_CHECKBOX || nButtonStyle == BS_AUTOCHECKBOX || nButtonStyle == BS_AUTO3STATE)
      {
         iPartID = BP_CHECKBOX;
      }
...
</code></pre>
<ol start="4">
<li>
<p dir="auto">The generic darkmode render code also doesn’t support any other popup dialogs that are opened by the <em>FWDataViz</em> plugin. This clip was taken by turning off <em>FWDataViz</em>’s own darkmode rendering, and with just NPP’s generic darkmode rendering in action.<br />
<img src="https://user-images.githubusercontent.com/45252729/172060249-df6f3cd9-16f5-4f0d-818f-d9e82108f930.png" alt="image" class=" img-fluid img-markdown" /></p>
</li>
<li>
<p dir="auto">In view of the preceding observation and to avoid the needless double rendering of darkmode for the plugin, I had to add the <a href="https://github.com/shriprem/FWDataViz/blob/fec61a300cf18571b963a26859301594433e54cf/src/PluginDefinition.cpp#L162" rel="nofollow ugc"><code>DWS_USEOWNDARKMODE</code> flag</a> to <em>FWDataViz</em>’s dock panel creation code to turn-off the generic darkmode rendering from NPP, and turn on the <em>FWDataViz</em>’s custom darkmode rendering.<br />
<img src="https://user-images.githubusercontent.com/45252729/172060438-33f09fa6-cd71-468e-b0ca-81d732a1160d.png" alt="image" class=" img-fluid img-markdown" /></p>
</li>
</ol>
<p dir="auto">The changes made to <em>FWDataViz</em> code along with other issue fixes are already available in the latest <em>FWDataViz</em> <a href="https://github.com/shriprem/FWDataViz/releases/tag/v2.5.2.0" rel="nofollow ugc">2.5.2.0 release</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/23080/impact-analysis-of-generic-darkmode-rendering-of-plugin-dock-panels-from-pr-11711</link><generator>RSS for Node</generator><lastBuildDate>Tue, 11 Aug 2026 22:47:47 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/23080.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 05 Jun 2022 16:49:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Impact Analysis of generic darkmode rendering of plugin dock panels (from PR #11711 ) on Sat, 02 Jul 2022 12:47:52 GMT]]></title><description><![CDATA[<p dir="auto">Also, what is the best way to apply DarkMode colors in other windows and dialogs? 🤔 There are other dialogs that are started from the dockable window, and also from menu items.</p>
<p dir="auto"><img src="/assets/uploads/files/1656766016195-notepad_darkmode_dialog.png" alt="notepad_darkmode_dialog.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/78071</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/78071</guid><dc:creator><![CDATA[Bas de Reuver]]></dc:creator><pubDate>Sat, 02 Jul 2022 12:47:52 GMT</pubDate></item><item><title><![CDATA[Reply to Impact Analysis of generic darkmode rendering of plugin dock panels (from PR #11711 ) on Sat, 02 Jul 2022 10:17:53 GMT]]></title><description><![CDATA[<p dir="auto">The generic darkmode rendering looks pretty cool. 👍 I’m trying get my plugin to make use of this as well. The plugin is created using C#, but for the WinForm controls this shouldn’t matter afaik.</p>
<p dir="auto">However, as far as I can see the function <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/NppDarkMode.cpp#L1761" rel="nofollow ugc">autoSubclassAndThemeChildControls</a> iterates over the <code>EnumChildWindows</code> but it isn’t called recursively for container-type controls.</p>
<p dir="auto">I mean some controls like <code>Panel</code>, <code>GroupBox</code>, <code>SplitContainer</code> are containers which have ChildControls, so they contain labels and buttons etc. So a textbox inside a container doesn’t get the DarkMode treatment, see screenshot below (btw I’m using the v8.4.3 RC)</p>
<p dir="auto"><img src="/assets/uploads/files/1656757019251-notepad_darkmode_window.png" alt="notepad_darkmode_window.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I’m not familiar with C++ so I don’t know how to detect if it’s a container control. But fyi in Visual Studio all the controls shown under <code>Containers</code> are: Pointer, FlowLayoutPanel, GroupBox, Panel, SplitContainer, TabControl, TableLayoutPanel.<br />
Not sure if that’s all the possible containers though…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/78068</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/78068</guid><dc:creator><![CDATA[Bas de Reuver]]></dc:creator><pubDate>Sat, 02 Jul 2022 10:17:53 GMT</pubDate></item><item><title><![CDATA[Reply to Impact Analysis of generic darkmode rendering of plugin dock panels (from PR #11711 ) on Tue, 07 Jun 2022 19:06:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/donho" aria-label="Profile: donho">@<bdi>donho</bdi></a>, with the addition of <code>COLORREF disabledEdge</code> member to the <code>NppDarkMode::Colors</code> struct, today’s commit of <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/commits/master" rel="nofollow ugc">Use edge colors in dark mode for listbox border</a> to the Notepad++ repo has affected the Darkmode Query API for plugins added only recently in NPP 8.4.1.</p>
<p dir="auto">I am looking forward to the day when all these darkmode-related changes are stabilized so that developers who are supporting darkmode in their plugins don’t have keep playing catch-up with every darkmode-related commit in Notepad++.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77365</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77365</guid><dc:creator><![CDATA[Shridhar Kumar]]></dc:creator><pubDate>Tue, 07 Jun 2022 19:06:05 GMT</pubDate></item><item><title><![CDATA[Reply to Impact Analysis of generic darkmode rendering of plugin dock panels (from PR #11711 ) on Mon, 06 Jun 2022 13:24:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/donho" aria-label="Profile: donho">@<bdi>donho</bdi></a></p>
<p dir="auto">There are some side effects from this commit on Plugins when Dark Mode is DIS-abled.  I don’t use Dark Mode, and observed the behavior of plugins changes with this commit even when Dark Mode is not enabled.  I commented on the commit:</p>
<p dir="auto"><a href="https://github.com/notepad-plus-plus/notepad-plus-plus/compare/v8.4.2...master#commitcomment-75431005" rel="nofollow ugc">https://github.com/notepad-plus-plus/notepad-plus-plus/compare/v8.4.2...master#commitcomment-75431005</a></p>
<p dir="auto">But essentially, using Explorer plugin as example:</p>
<p dir="auto">BEFORE:<br />
<img src="/assets/uploads/files/1654521812054-209100de-57f6-40e1-b550-69e699dc02ae-image.png" alt="209100de-57f6-40e1-b550-69e699dc02ae-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">AFTER:<br />
<img src="/assets/uploads/files/1654521820720-cb576de6-1327-4c4f-9fa4-f3b3ee9b3db7-image.png" alt="cb576de6-1327-4c4f-9fa4-f3b3ee9b3db7-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Notice the “AFTER” image lower pane no longer has any file icons.  The only change for this “demo” was running with Notepad++ artifact before this commit and then Notepad++ artifact from after this commit.</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77337</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77337</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Mon, 06 Jun 2022 13:24:36 GMT</pubDate></item><item><title><![CDATA[Reply to Impact Analysis of generic darkmode rendering of plugin dock panels (from PR #11711 ) on Sun, 05 Jun 2022 23:44:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/shridhar-kumar" aria-label="Profile: shridhar-kumar">@<bdi>shridhar-kumar</bdi></a></p>
<p dir="auto">Nice to learn that <code>DWS_USEOWNDARKMODE</code> does the trick.<br />
Thank you for the very detailed information!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77327</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77327</guid><dc:creator><![CDATA[donho]]></dc:creator><pubDate>Sun, 05 Jun 2022 23:44:36 GMT</pubDate></item><item><title><![CDATA[Reply to Impact Analysis of generic darkmode rendering of plugin dock panels (from PR #11711 ) on Sun, 05 Jun 2022 22:22:04 GMT]]></title><description><![CDATA[<p dir="auto">To clarify further, having the <code>DWS_USEOWNDARKMODE</code> flag added in the <em>FWDataViz</em> 2.5.2.0 release is not causing any issues at all when it is used either in NPP 8.4.1 or NPP 8.4.2 (i.e., when those NPP versions aren’t processing/handling the <code>DWS_USEOWNDARKMODE</code> flag).</p>
<p dir="auto">In NPP 8.4.0 or NPP 8.3.3, the 2.5.2.0 version still works but without any darkmode support because of the reasons mentioned in the preceding post.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77326</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77326</guid><dc:creator><![CDATA[Shridhar Kumar]]></dc:creator><pubDate>Sun, 05 Jun 2022 22:22:04 GMT</pubDate></item><item><title><![CDATA[Reply to Impact Analysis of generic darkmode rendering of plugin dock panels (from PR #11711 ) on Sun, 05 Jun 2022 22:08:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/donho" aria-label="Profile: donho">@<bdi>donho</bdi></a>,</p>
<p dir="auto">Yes, my plugin is working well with both NPP v8.4.2 and the NPP build from the commit with #11711 PR.</p>
<p dir="auto">Prior to NPP 8.4.1, my plugin was providing darkmode support by querying the config.xml. This involved linking to TinyXML library. With the release of NPP 8.4.1, the plugin only relies on the darkmode query APIs that were added in NPP. Subsequently, I removed the code for querying config.xml and the TinyXML linking. So, the current version of <em>FWDataViz</em> only works with NPP 8.4.1 and higher versions.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77325</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77325</guid><dc:creator><![CDATA[Shridhar Kumar]]></dc:creator><pubDate>Sun, 05 Jun 2022 22:08:51 GMT</pubDate></item><item><title><![CDATA[Reply to Impact Analysis of generic darkmode rendering of plugin dock panels (from PR #11711 ) on Sun, 05 Jun 2022 19:03:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/shridhar-kumar" aria-label="Profile: shridhar-kumar">@<bdi>shridhar-kumar</bdi></a> said in <a href="/post/77320">Impact Analysis of generic darkmode rendering of plugin dock panels (from PR #11711 )</a>:</p>
<blockquote>
<p dir="auto">In view of the preceding observation and to avoid the needless double rendering of darkmode for the plugin, I had to add the DWS_USEOWNDARKMODE flag to FWDataViz’s dock panel creation code to turn-off the generic darkmode rendering from NPP, and turn on the FWDataViz’s custom darkmode rendering.</p>
</blockquote>
<p dir="auto">Thank you for your info, very appreciated.</p>
<p dir="auto">So currently, you use <code>DWS_USEOWNDARKMODE</code> to avoid dark mode processing from Notepad++ and render dark mode by you own, and there’s no more issue in v2.5.2.0 release. Could you confirm it?</p>
<p dir="auto">Have you tested v2.5.2.0 with Notepad++ v8.4.2 or v8.3.3 ?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77322</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77322</guid><dc:creator><![CDATA[donho]]></dc:creator><pubDate>Sun, 05 Jun 2022 19:03:15 GMT</pubDate></item></channel></rss>