mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-11-16 23:05:58 +01:00
shadows: disable by default
This commit is contained in:
parent
a4dc596cb8
commit
9b54840e12
2 changed files with 7 additions and 1 deletions
|
@ -38,7 +38,7 @@ void CConfigManager::init() {
|
||||||
|
|
||||||
#define SHADOWABLE(name) \
|
#define SHADOWABLE(name) \
|
||||||
m_config.addSpecialConfigValue(name, "shadow_size", Hyprlang::INT{3}); \
|
m_config.addSpecialConfigValue(name, "shadow_size", Hyprlang::INT{3}); \
|
||||||
m_config.addSpecialConfigValue(name, "shadow_passes", Hyprlang::INT{2}); \
|
m_config.addSpecialConfigValue(name, "shadow_passes", Hyprlang::INT{0}); \
|
||||||
m_config.addSpecialConfigValue(name, "shadow_color", Hyprlang::INT{0xFF000000}); \
|
m_config.addSpecialConfigValue(name, "shadow_color", Hyprlang::INT{0xFF000000}); \
|
||||||
m_config.addSpecialConfigValue(name, "shadow_boost", Hyprlang::FLOAT{1.2});
|
m_config.addSpecialConfigValue(name, "shadow_boost", Hyprlang::FLOAT{1.2});
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,9 @@ CShadowable::CShadowable(IWidget* widget_, const std::unordered_map<std::string,
|
||||||
|
|
||||||
void CShadowable::markShadowDirty() {
|
void CShadowable::markShadowDirty() {
|
||||||
|
|
||||||
|
if (passes == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!shadowFB.isAllocated())
|
if (!shadowFB.isAllocated())
|
||||||
shadowFB.alloc(viewport.x, viewport.y, true);
|
shadowFB.alloc(viewport.x, viewport.y, true);
|
||||||
|
|
||||||
|
@ -27,6 +30,9 @@ void CShadowable::markShadowDirty() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CShadowable::draw(const IWidget::SRenderData& data) {
|
bool CShadowable::draw(const IWidget::SRenderData& data) {
|
||||||
|
if (passes == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!shadowFB.isAllocated() || ignoreDraw)
|
if (!shadowFB.isAllocated() || ignoreDraw)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue