Skip to content

Call update after setting opacity#624

Open
Brayozin wants to merge 1 commit into
lxqt:masterfrom
Brayozin:patch-1
Open

Call update after setting opacity#624
Brayozin wants to merge 1 commit into
lxqt:masterfrom
Brayozin:patch-1

Conversation

@Brayozin
Copy link
Copy Markdown

@Brayozin Brayozin commented Apr 3, 2026

Summary

setOpacity sets _opacity but never schedules a repaint, so opacity changes have no visible effect until something else triggers one. This adds the missing update() call.

In a related fix to the QML fork (Swordfish90/qmltermwidget#48)), I also moved setOpacity to public slots: so it can be called directly from QML and connected to signals. I didn't include that here since qtermwidget is a pure C++ widget and the existing placement in public: is fine.

Test plan

  • Call setOpacity() with a sub-1.0 value and confirm the terminal background renders semi-transparent immediately, without needing any other event to trigger a repaint
  • Confirm full-opacity (1.0) rendering is unchanged

## Summary

`setOpacity` sets `_opacity` but never schedules a repaint, so opacity
changes have no visible effect until something else triggers one.
This adds the missing `update()` call.

In a related fix to the QML fork (qmltermwidget), I also moved
`setOpacity` to `public slots:` so it can be called directly from QML
and connected to signals. I didn't include that here since qtermwidget
is a pure C++ widget and the existing placement in `public:` is fine.

## Test plan

- [ ] Call `setOpacity()` with a sub-1.0 value and confirm the terminal
      background renders semi-transparent immediately, without needing
      any other event to trigger a repaint
- [ ] Confirm full-opacity (`1.0`) rendering is unchanged
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