mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Fix missing group inset
This commit is contained in:
parent
d99f3253fb
commit
c74b108c29
3 changed files with 14 additions and 2 deletions
|
@ -38,6 +38,9 @@ plugin {
|
|||
# disable gaps when only one window is onscreen
|
||||
no_gaps_when_only = <bool>
|
||||
|
||||
# offset from group split direction when only one window is in a group
|
||||
group_inset = <int>
|
||||
|
||||
# tab group settings
|
||||
tabs {
|
||||
# height of the tab bar
|
||||
|
|
|
@ -112,6 +112,7 @@ bool Hy3Node::operator==(const Hy3Node& rhs) const {
|
|||
void Hy3Node::recalcSizePosRecursive(bool force) {
|
||||
static const auto* gaps_in = &HyprlandAPI::getConfigValue(PHANDLE, "general:gaps_in")->intValue;
|
||||
static const auto* gaps_out = &HyprlandAPI::getConfigValue(PHANDLE, "general:gaps_out")->intValue;
|
||||
static const auto* group_inset = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:group_inset")->intValue;
|
||||
|
||||
int outer_gaps = 0;
|
||||
Vector2D gap_pos_offset;
|
||||
|
@ -151,9 +152,16 @@ void Hy3Node::recalcSizePosRecursive(bool force) {
|
|||
|
||||
switch (group->layout) {
|
||||
case Hy3GroupLayout::SplitH:
|
||||
child->position.x = tpos.x;
|
||||
child->size.x = tsize.x - *group_inset;
|
||||
child->position.y = tpos.y;
|
||||
child->size.y = tsize.y;
|
||||
break;
|
||||
case Hy3GroupLayout::SplitV:
|
||||
child->position = tpos;
|
||||
child->size = tsize;
|
||||
child->position.y = tpos.y;
|
||||
child->size.y = tsize.y - *group_inset;
|
||||
child->position.x = tpos.x;
|
||||
child->size.x = tsize.x;
|
||||
break;
|
||||
case Hy3GroupLayout::Tabbed:
|
||||
child->position.y = tpos.y + tab_height_offset;
|
||||
|
|
|
@ -113,6 +113,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
|
|||
selection_hook::init();
|
||||
|
||||
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hy3:no_gaps_when_only", SConfigValue{.intValue = 0});
|
||||
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hy3:group_inset", SConfigValue{.intValue = 10});
|
||||
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hy3:tabs:height", SConfigValue{.intValue = 15});
|
||||
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hy3:tabs:padding", SConfigValue{.intValue = 5});
|
||||
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hy3:tabs:from_top", SConfigValue{.intValue = 0});
|
||||
|
|
Loading…
Add table
Reference in a new issue