mirror of
https://github.com/hyprwm/hyprlock.git
synced 2025-01-26 04:19:48 +01:00
label: fix redrawing shadow on label updates (#599)
This commit is contained in:
parent
83bda4883d
commit
002e44f627
2 changed files with 5 additions and 1 deletions
|
@ -119,7 +119,10 @@ bool CLabel::draw(const SRenderData& data) {
|
|||
|
||||
if (!asset)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (updateShadow) {
|
||||
updateShadow = false;
|
||||
shadow.markShadowDirty();
|
||||
}
|
||||
|
||||
|
@ -143,7 +146,7 @@ void CLabel::renderUpdate() {
|
|||
asset = newAsset;
|
||||
resourceID = pendingResourceID;
|
||||
pendingResourceID = "";
|
||||
shadow.markShadowDirty();
|
||||
updateShadow = true;
|
||||
} else {
|
||||
Debug::log(WARN, "Asset {} not available after the asyncResourceGatherer's callback!", pendingResourceID);
|
||||
|
||||
|
|
|
@ -45,4 +45,5 @@ class CLabel : public IWidget {
|
|||
std::shared_ptr<CTimer> labelTimer = nullptr;
|
||||
|
||||
CShadowable shadow;
|
||||
bool updateShadow = true;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue