mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-09-23 03:38:29 +00:00
animations: add slidefade and slidefadevert styles for workspaces (#3008)
* add slidefade and slidefadevert animations * fix swiping for slidefadevert * rename minPerc to movePerc for slidefade anim styles * change default slidefade percentage to 100% * remove useless comments * findlastof + 1 * debug logging for slidefade/slidefadevert percentage
This commit is contained in:
@@ -485,6 +485,22 @@ std::string CAnimationManager::styleValidInConfigVar(const std::string& config,
|
||||
} else if (config == "workspaces" || config == "specialWorkspace") {
|
||||
if (style == "slide" || style == "slidevert" || style == "fade")
|
||||
return "";
|
||||
else if (style.find("slidefade") == 0) {
|
||||
// try parsing
|
||||
float movePerc = 0.f;
|
||||
if (style.find("%") != std::string::npos) {
|
||||
try {
|
||||
auto percstr = style.substr(style.find_last_of(' ') + 1);
|
||||
movePerc = std::stoi(percstr.substr(0, percstr.length() - 1));
|
||||
} catch (std::exception& e) { return "invalid movePerc"; }
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
movePerc; // fix warning
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
return "unknown style";
|
||||
} else if (config == "borderangle") {
|
||||
|
Reference in New Issue
Block a user