fix(icon): chọn màu icon khay theo panel của KDE Plasma (#374) - #497
Merged
nhktmdzhg merged 3 commits intoSep 15, 2026
Merged
Conversation
…InputMethod#374) On KDE the settings portal reports the application colour scheme (kdeglobals), but the tray sits on the panel, which the Plasma Style paints. The default Fedora 44 look pairs BreezeLight with the breeze-dark Plasma Style (stored in ~/.config/kdedefaults), so Auto picked the black icon on a black panel. When XDG_CURRENT_DESKTOP names KDE, read plasmarc through the KConfig cascade, use the theme's own colors file when it ships one and the system scheme otherwise, and apply the portal's qGray < 192 threshold. Plain file reads, no subprocess; fall back to the old probes when no colour is found. Verified on Fedora 44 KDE Wayland: tray icon black before, white after. New unit test plasma_panel_theme: 15 cases, 12 red on an empty stub as declared beforehand, all green with the fix; ctest 10/10 on dev. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W39vFnx4ECponJC5MQ9Fiu
nguyenphivn
added a commit
to nguyenphivn/LotusVibe
that referenced
this pull request
Sep 14, 2026
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W39vFnx4ECponJC5MQ9Fiu
nguyenphivn
added a commit
to nguyenphivn/LotusVibe
that referenced
this pull request
Sep 16, 2026
The fix itself was merged upstream in LotusInputMethod#497 without its test. Build the test against the upstream code: link lotus-utils.cpp for getEnv and pass an empty string to isKdePlasmaSession, which now takes std::string. 12/12 with ctest.
nguyenphivn
added a commit
to nguyenphivn/LotusVibe
that referenced
this pull request
Sep 16, 2026
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W39vFnx4ECponJC5MQ9Fiu
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.
Mô tả
Sửa lỗi icon chế độ Auto chọn chữ V đen trên panel tối của KDE Plasma khi color scheme của ứng dụng là sáng nhưng Plasma Style là tối. Đây là giao diện mặc định của Fedora 44. Nguyên nhân và cách tiếp cận mình đã ghi ở #374.
src/lotus-plasma-theme.h,src/lotus-plasma-theme.cpp(mới): đọcplasmarctheo thứ tự đè của KConfig (có~/.config/kdedefaults), lấy[Colors:Window] BackgroundNormaltừ filecolorscủa Plasma Style; theme không có file này thì lấy từ color scheme hệ thống. NgưỡngqGray < 192giống xdg-desktop-portal-kde. Chỉ đọc file, khôngpopen.LotusEngine::isDarkMode(): khiXDG_CURRENT_DESKTOPcóKDEthì hỏi màu panel trước; không đọc ra màu thì chạy tiếp các bước cũ, nên DE khác không đổi.test/plasma-panel-theme.cpp(mới): test đơn vị 15 trường hợp, không cần fcitx5 hay màn hình.Loại thay đổi
Liên kết issue
Fixes #374
Screenshot (cho UI changes)
Fedora 44 KDE Plasma Wayland, giao diện mặc định, màu icon Auto: trước khi sửa là V đen trên panel tối, sau khi sửa là V trắng.
Checklist
dev(KHÔNG phảimain)clang-format(tuân thủ.clang-format): clang-format 22.1.8,--dry-runtrên các file đã sửa không báo gìruff checkvàruff format(cho phần Pythonsettings-gui): không áp dụng, PR không đụng Pythoncmake .. && make): gcc 16,-DBUILD_TESTING=ON,ctest10/10cd bamboo/ && go test -race ./...)devmới nhất🤖 Generated with Claude Code
https://claude.ai/code/session_01W39vFnx4ECponJC5MQ9Fiu