Skip to content

Support fcitx5's latest scale asset feature - #107

Merged
wengxt merged 1 commit into
masterfrom
scale
Sep 22, 2026
Merged

wengxt merged 1 commit into
masterfrom
scale

Conversation

@wengxt

@wengxt wengxt commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Generated Plasma themes now support multiple display scale factors for improved high-DPI compatibility.
    • Theme assets are created for each supported scale and selected appropriately by the desktop environment.
    • Monitor mode now detects screen scale changes and automatically regenerates themes when needed.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 922caacd-e637-4f6c-b9f5-f9fa479eb2e3

📥 Commits

Reviewing files that changed from the base of the PR and between 82058aa and 893595a.

📒 Files selected for processing (4)
  • src/plasmathemegenerator/CMakeLists.txt
  • src/plasmathemegenerator/main.cpp
  • src/plasmathemegenerator/screenscaletracker.cpp
  • src/plasmathemegenerator/screenscaletracker.h

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The generator now tracks the maximum screen scale, records it in SupportedScale, renders assets for each scale, and regenerates themes in monitor mode when a larger scale becomes available.

Changes

Scale-aware theme generation

Layer / File(s) Summary
Screen scale tracking
src/plasmathemegenerator/screenscaletracker.h, src/plasmathemegenerator/screenscaletracker.cpp
ScreenScaleTracker calculates the maximum screen scale and updates it when screens are added, removed, or changed.
Scaled asset rendering
src/plasmathemegenerator/main.cpp
Theme generation writes SupportedScale, renders assets for scales from 1 through the maximum, uses scaled filenames, and sets SVG device pixel ratios.
Monitor mode integration
src/plasmathemegenerator/main.cpp, src/plasmathemegenerator/CMakeLists.txt
Monitor mode tracks scale changes and regenerates the theme when the maximum increases. The new tracker sources are added to the executable target.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant init
  participant ScreenScaleTracker
  participant generateTheme
  participant renderScaleAssets
  participant ThemeFiles
  init->>ScreenScaleTracker: create tracker in monitor mode
  ScreenScaleTracker-->>generateTheme: provide maximum scale
  generateTheme->>renderScaleAssets: render scales 1 through maximumScale
  renderScaleAssets->>ThemeFiles: save scaled assets and theme.conf
  ScreenScaleTracker-->>init: emit maximumScaleChanged
  init->>generateTheme: regenerate when maximum scale increases
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 3 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding support for fcitx5 scale assets and related multi-scale theme generation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 3 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@wengxt
wengxt merged commit cf8b54d into master Sep 22, 2026
5 checks passed
@wengxt
wengxt deleted the scale branch September 22, 2026 01:46
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.

1 participant