Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme Refactoring (with new Theme: Cosmic Dusk) #5487

Merged
merged 92 commits into from
May 30, 2024
Merged

Conversation

jonoomph
Copy link
Member

@jonoomph jonoomph commented Mar 27, 2024

In an effort to update the user-interface for OpenShot, first our theme engine needs some major refactoring.

Theme Engine

The current theme engine for OpenShot is really just a few lines of hard-coded stylesheet that is very difficult to work with. We need to refactor this into Classes, which can inherit some base theme properties, etc... We want new themes to be very easy to switch between, and we want real-time theme switching.

Timeline Refactor

We currently support 2 different webview-based timeline widgets (QWebKit and QWebEngine), and we will eventually replace both of these with a QWidget-based timeline widget. In the meantime, we need to refactor the timeline code to support a 3rd widget (experimental placeholder currently), and clean-up the timeline-related code as much as possible. This will be a gradual change-over, since much work remains on the new QWidget timeline widget. This will eventually be a huge simplification on how our timeline works, improved performance when editing projects, huge reduction in our download size, and a more feature-full timeline widget, which of course is also theme-able (due to this new theme engine).

New Theme

Part of this PR includes some initial work on a new UI theme for OpenShot. This is very early and should not be used by normal users yet. We have very detailed mock-ups and work-flows that we are moving towards, but it will be an iterative process before we switch the default theme.

- ThemeName ENUM (with all theme names)
- ThemeManager Singleton
- Theme Base class (to reset theme)
- Theme classes for each unique UI theme: No Theme, Humanity, Humanity: Dark, and Cosmic Dusk (out new theme)
- Cosmic Dusk theme still needs lots of work
- Known Issue: When changing themes on the Preferences window, some widget styles do not refresh until the window is closed/re-opened
- Renaming some dock widgets in the *.ui file
- Updating translation system to support Theme names
- Apply video widget background from current palette and not a hard-coded color
…onal testing of a non-webview timeline widget. For now though, it's a blank QWidget.
… Pixel size. Attempting to make font clearer on Windows.
… compatible with the existing TimelineView loading logic. So, whether a webview or qwidget backend is used, it is initialized mostly the same.
…lify the top of the timeline view file. Also, optimizing imports (removing unused imports)
…qwidget instead, for testing the new timeline widget backend.
# Conflicts:
#	src/language/OpenShot/OpenShot.pot
#	src/windows/views/timeline.py
…lar controller to top of document (so dynamic style tags are possible). Updating light theme and cosmic themes to better integrate web-view based timeline widgets.
@jonoomph
Copy link
Member Author

…enu theming, web-view timeline scrollbar colors
…d corners and border color. Fixed some QMenu padding issues. Styled QTreeView and QListView in Cosmic Dust theme.
…ion, which can completly remove margins from a specific dock (i.e. timeline).

- Refactored audio waveform display on timeline (simpler, cleaner, easier to debug, aligned with bottom of clip).
- Added keyframe icons to Cosmic Dust theme
- More Cosmic Dust theme improvements (no margin timeline, smaller tracks / clips, improved clip CSS)
- Note: webkit rendering is broken in Cosmic Dust theme.
…tly show thumbnail and waveform without padding or resizing)
…tLocation function. Dragging files onto timeline now works in all themes, and works with better "diff" calculations for nearest track to drop the clip on.
…ues with track snapping when dragging + scrollbar changes.

- Shrinking transitions style for Cosmic Dust theme to fit on track.
- Update track Y coordinates after a theme change, to make sure different size tracks from different themes still function correctly.
- Improved snapping to prevent multi-layer selections from moving past the bottom of the timeline.
…move playhead when dragging one of these items (or resizing them). For example, if you start to drag a clip, and while dragging move your mouse up onto the timeline ruler.
…ving a redundant method. Fixing small regression in clip.js (missing variable).
…ight keyframe icons to be more visible (blue). Fixed transition render artifacts.
…on't freeze the main thread/window during load
…eed and turbulence. Also, slowed down the animation and made it flow smoother.
…utomatically when changing screen DPI. This can be disabled in the "adjust_scaling_factor" settings file.
…UNDING_POLICY to PassThrough, so Windows will stop showing our UI too big when 150% scaling is used, etc...
…r version -dev scheme). Fixing x64 with amd64 for the manifest.
…ong limits, due to rasterization crashes at large sizes
…ips blurry, does not render borders, and causes many visual lines and artifacts as you interact with it.
- Rename Edit Toolbar to Timeline Toolbar
- Expanded main window Menu descriptions
- Added section on Timeline Toolbar options
- Expanded Docks section with links to related pages
- Remove Gap and Remove All Gaps
- Max limits on scale x/y and shear x/y
- Updated Blender min version to 4.1 and updated doc references
- Added Fuse library requirement for AppImage and AppImage launcher instructions
- Mentioned High DPI monitor support, and troubleshooting steps and link to our wiki
- Described 3 included themes
- Added list of vector titles
- Added list of 3D animations
@jonoomph jonoomph changed the title Theme Refactoring (including WIP Theme) Theme Refactoring (with new Theme: Cosmic Dusk) May 30, 2024
@jonoomph jonoomph merged commit b41da06 into develop May 30, 2024
9 checks passed
@jonoomph jonoomph deleted the new-ui-theme branch May 30, 2024 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant