renderer: Add supercircular window corners (#8943)
renderer: Add supercircular shadows and borders config: Add rounding_power to default and example configs rule: add `roundingpower` window rule
This commit is contained in:
parent
b0bae15499
commit
a5c14370c1
26 changed files with 228 additions and 173 deletions
|
|
@ -139,6 +139,12 @@ inline static const std::vector<SConfigOptionDescription> CONFIG_OPTIONS = {
|
|||
.type = CONFIG_OPTION_INT,
|
||||
.data = SConfigOptionDescription::SRangeData{0, 0, 20},
|
||||
},
|
||||
SConfigOptionDescription{
|
||||
.value = "decoration:rounding_power",
|
||||
.description = "rouding power of corners (2 is a circle)",
|
||||
.type = CONFIG_OPTION_FLOAT,
|
||||
.data = SConfigOptionDescription::SFloatData{2, 2, 10},
|
||||
},
|
||||
SConfigOptionDescription{
|
||||
.value = "decoration:active_opacity",
|
||||
.description = "opacity of active windows. [0.0 - 1.0]",
|
||||
|
|
|
|||
|
|
@ -427,6 +427,7 @@ CConfigManager::CConfigManager() {
|
|||
m_pConfig->addConfigValue("debug:colored_stdout_logs", Hyprlang::INT{1});
|
||||
|
||||
m_pConfig->addConfigValue("decoration:rounding", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("decoration:rounding_power", {2.F});
|
||||
m_pConfig->addConfigValue("decoration:blur:enabled", Hyprlang::INT{1});
|
||||
m_pConfig->addConfigValue("decoration:blur:size", Hyprlang::INT{8});
|
||||
m_pConfig->addConfigValue("decoration:blur:passes", Hyprlang::INT{1});
|
||||
|
|
|
|||
|
|
@ -259,6 +259,7 @@ class CConfigManager {
|
|||
};
|
||||
|
||||
std::unordered_map<std::string, std::function<CWindowOverridableVar<float>*(PHLWINDOW)>> mfWindowProperties = {
|
||||
{"roundingpower", [](const PHLWINDOW& pWindow) { return &pWindow->m_sWindowData.roundingPower; }},
|
||||
{"scrollmouse", [](const PHLWINDOW& pWindow) { return &pWindow->m_sWindowData.scrollMouse; }},
|
||||
{"scrolltouchpad", [](const PHLWINDOW& pWindow) { return &pWindow->m_sWindowData.scrollTouchpad; }}};
|
||||
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ general {
|
|||
# https://wiki.hyprland.org/Configuring/Variables/#decoration
|
||||
decoration {
|
||||
rounding = 10
|
||||
rounding_power = 2
|
||||
|
||||
# Change transparency of focused and unfocused windows
|
||||
active_opacity = 1.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue