ThemeRenderer to support drawing the ListView (FileList) and its header.#98
ThemeRenderer to support drawing the ListView (FileList) and its header.#98
Conversation
- Migrated custom drawing logic from FileList to ThemeRenderer. - Introduced IListViewDataProvider interface to decouple ThemeRenderer from FileList. - Implemented themed rendering for ListView Header (WC_HEADER) in dark mode. - Handled NM_CUSTOMDRAW for ListView items in parent window subclass to support themes. - Improved TreeView support by applying DarkMode_Explorer theme. - Fixed header rendering using BeginPaint/EndPaint in WM_PAINT handler. - Cleaned up FileList by removing redundant custom draw logic. Co-authored-by: funap <31555185+funap@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- ThemeRenderer: Added subclassing for WC_LISTVIEW and WC_HEADER. - ThemeRenderer: Implemented dark mode header painting with item hover effects. - ThemeRenderer: Added non-blocking NM_CUSTOMDRAW handling for ListView items to set theme colors and hover background. - FileList: Restored component-specific custom drawing (underline for open files, parent icons) using dialog-compatible DWLP_MSGRESULT. - Explorer: Populated hover_bg theme color from editor colors. - Improved theme consistency for TreeView and scrollbars. Co-authored-by: funap <31555185+funap@users.noreply.github.com>
- ThemeRenderer: Added subclassing and themed rendering for WC_LISTVIEW and WC_HEADER. - ThemeRenderer: Implemented dark mode header painting with manual GDI calls (background, text, separators, sort arrows). - ThemeRenderer: Added hover support for header items and list items using primary_bg. - ThemeRenderer: Configured non-blocking NM_CUSTOMDRAW handling to allow component-specific drawing. - FileList: Maintained specific logic for underlining open files and parent icons, updated for dialog compatibility. - Consistent theme and dark scrollbar application for TreeView and ListView. Co-authored-by: funap <31555185+funap@users.noreply.github.com>
I have updated the ThemeRenderer to support drawing the ListView (FileList) and its header.
Main changes:
1.Extended the ThemeRenderer to support subclassing of
WC_LISTVIEWandWC_HEADER.Introduced the IListViewDataProvider interface to reduce coupling between ThemeRenderer and FileList while still allowing retrieval of necessary data for rendering (such as open-file state and icons).
Implemented custom drawing of the ListView header in dark mode, including background, text, sort arrows, and separators.
Handled NM_CUSTOMDRAW notifications for ListView items in the parent window (
ThemeRenderer::WindowProc), applying theme‑based colors and FileList‑specific rendering (such as underlining open files and drawing parent‑folder icons).Applied SetWindowTheme(DarkMode_Explorer) to WC_TREEVIEW as well, ensuring consistent dark‑mode scrollbars.
Removed the old custom‑drawing logic from FileList and completed the migration to ThemeRenderer.
Corrected Win32 API usage, including proper handling of BeginPaint/EndPaint in
WM_PAINT.PR created automatically by Jules for task 6465392800648036340 started by @funap