mirror of
https://github.com/hyprwm/Hypr.git
synced 2025-12-24 04:40:02 +01:00
Adjustable splitratio
This commit is contained in:
parent
4c1007224e
commit
7b7d0c848a
3 changed files with 10 additions and 29 deletions
16
README.md
16
README.md
|
|
@ -1,19 +1,3 @@
|
|||
<p align="center">
|
||||
end-4/hyprland-is-great-but-i-want-xorg
|
||||
</p>
|
||||
|
||||
<br/>
|
||||
As the name suggests
|
||||
|
||||
While Wayland is the future
|
||||
|
||||
I still want Xorg
|
||||
<br/>
|
||||
|
||||
# Stuff fixed/added so far
|
||||
- Workspace animation direction
|
||||
- Relative workspace switching
|
||||
|
||||
<p align="center">
|
||||
<img src="https://i.imgur.com/LtC153m.png" />
|
||||
<img src="https://github.com/vaxerski/Hypr/actions/workflows/c-cpp.yml/badge.svg" />
|
||||
|
|
|
|||
|
|
@ -2570,7 +2570,7 @@ SMonitor* CWindowManager::getMonitorFromCoord(const Vector2D coord) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
void CWindowManager::changeSplitRatioCurrent(std::string& dir) {
|
||||
void CWindowManager::changeSplitRatioCurrent(std::string dir) {
|
||||
|
||||
const auto CURRENT = getWindowFromDrawable(LastWindow);
|
||||
|
||||
|
|
@ -2586,17 +2586,14 @@ void CWindowManager::changeSplitRatioCurrent(std::string& dir) {
|
|||
return;
|
||||
}
|
||||
|
||||
switch(dir) {
|
||||
case "+":
|
||||
PARENT->setSplitRatio(PARENT->getSplitRatio() + 0.05f);
|
||||
break;
|
||||
case "-":
|
||||
PARENT->setSplitRatio(PARENT->getSplitRatio() - 0.05f);
|
||||
break;
|
||||
default:
|
||||
PARENT->setSplitRatio(PARENT->getSplitRatio() + std::stof(dir));
|
||||
// Debug::log(ERR, "changeSplitRatioCurrent called with an invalid dir!");
|
||||
return;
|
||||
if (dir == "+") {
|
||||
PARENT->setSplitRatio(PARENT->getSplitRatio() + 0.05f);
|
||||
}
|
||||
else if (dir == "-") {
|
||||
PARENT->setSplitRatio(PARENT->getSplitRatio() - 0.05f);
|
||||
}
|
||||
else {
|
||||
PARENT->setSplitRatio(PARENT->getSplitRatio() + std::stof(dir));
|
||||
}
|
||||
|
||||
PARENT->setSplitRatio(std::clamp(PARENT->getSplitRatio(), 0.1f, 1.9f));
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ public:
|
|||
|
||||
bool shouldBeManaged(const int&);
|
||||
|
||||
void changeSplitRatioCurrent(std::string& dir);
|
||||
void changeSplitRatioCurrent(std::string dir);
|
||||
|
||||
void processCursorDeltaOnWindowResizeTiled(CWindow*, const Vector2D&);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue