Dark mode for Qt6#1488
Open
TheForgotten69 wants to merge 110 commits into
Open
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… VideoToolUI Removes abstract _create_browse_dir_button/_create_browse_file_button from BaseVideoToolUIView and uses the combined path_entry component instead, fixing widget alignment issues. Adds allow_video_files flag to path_entry. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…IView Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…UIView Now handled by path_entry in the base class. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…files) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Base view concrete methods were accessing self.controller, self.ui_state, and toolkit-specific action methods that were only set by CTK subclass __init__ after the base __init__ call, with no enforcement in the base. - BaseTrainUIView: add controller/ui_state as constructor params; fix sync_cloud_secrets to use controller.train_config; add @AbstractMethod for export_training, generate_debug_package, open_profiling_tool - CtkTrainUIView: reorder __init__ to create deps before base init call; replace self.train_config with self.controller.train_config - BaseCloudTabView: add controller as constructor param - CtkCloudTabView: pass controller to base __init__, drop redundant assignment - BaseCaptionUIView: add ABC + @AbstractMethod for 6 action callbacks - BaseConceptTabView: remove concrete _update_filters() (accessed CTK vars); add ConceptConfig import; add concept: ConceptConfig param to BaseConceptWidgetView.__init__ - CtkConceptTabView: implement _update_filters(); pass concept to base init - BaseConceptWindowView: initialize bucket_ax/text_color/canvas to None - BaseTrainingTabView: replace callbacks dict with 6 @AbstractMethod declarations; restore_optimizer_config(variable: str) matches controller - CtkTrainingTabView: implement all 6 abstract methods directly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The ctypes DPI awareness call is toolkit-specific (fixes CTK transparency on Windows monitor changes). It already exists in CtkTrainUIView.py and has no place in the toolkit-agnostic controller. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- PySide6TrainUIView: create train_config/ui_state/controller before base init so they can be passed as constructor params; replace self.train_config with self.controller.train_config throughout - PySide6CloudTabView: pass controller to BaseCloudTabView.__init__; remove now-redundant self.controller assignment - PySide6ConceptTabView: implement _update_filters() (removed from base); pass concept to BaseConceptWidgetView.__init__ - PySide6TrainingTabView: remove callbacks dict; call build() without it; implement 6 abstract methods with logic inlined from private helpers; remove now-unused private helper methods Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
search_var/filter_var/show_disabled_var were stored in the base but never used there after _update_filters() was removed. Subclasses manage them. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…abView Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d "Text Caching") into preview
…-component) into preview
…ng) into preview
Qt's dark mode support on Windows is broken (tabs render with no contrast). apply_theme() applies explicit palette and QSS fixes on Windows only, using palette() references so it adapts to the system light/dark preference. Linux/macOS are left to Qt's native handling. Replaces the previous force-light-mode workaround in train_ui_qt.py.
55b7283 to
81dfba6
Compare
Contributor
Author
|
dark mode is scoped only on window, no custom styles either as the hardcoded white theme is handled |
Collaborator
|
thanks! will mark this waiting and come back to it when the Qt branch has merged |
ce63c57 to
3c96784
Compare
Contributor
Author
|
I saw that Qt is merged in main, any point in me rebasing @dxqb ? |
Collaborator
|
please coordinate this #1593 |
3 tasks
|
@TheForgotten69 what was the Windows problem you were fixing here? Qt Fusion style looks fine on Windows for me in both light and dark modes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix various small issues that occured on Windows:
preference. Linux/macOS keep Qt's native theming untouched.
(QTabWidget::pane / QTabBar contrast fixes + an adaptive progressbar) plus a white text-box fix for light mode — since
Qt's dark mode renders tabs with no contrast on Windows.
The important gist is that the preferred mode is now respected and both light and dark are usable.
Test plan
pre-commit run --all-filespassesAI assistance