Skip to content

Commit

Permalink
gui: fix alignment when going fullscreen/tab and back
Browse files Browse the repository at this point in the history
  • Loading branch information
hanatos committed Sep 7, 2024
1 parent a0291df commit 40ffe83
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/gui/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,10 @@ dt_gui_dr_toggle_fullscreen_view()
}
else
{
vkdt.state.center_x = vkdt.style.border_frac * qvk.win_width;
vkdt.state.center_y = vkdt.style.border_frac * qvk.win_width;
vkdt.state.center_wd = qvk.win_width * (1.0f-2.0f*vkdt.style.border_frac) - vkdt.state.panel_wd;
vkdt.state.center_ht = qvk.win_height - 2*vkdt.style.border_frac * qvk.win_width;
vkdt.state.center_x = vkdt.style.border_frac * qvk.win_height;
vkdt.state.center_y = vkdt.style.border_frac * qvk.win_height;
vkdt.state.center_wd = qvk.win_width - 2.0f*vkdt.style.border_frac * qvk.win_height - vkdt.state.panel_wd;
vkdt.state.center_ht = qvk.win_height * (1.0f-2.0f*vkdt.style.border_frac);
}
}

Expand All @@ -296,17 +296,17 @@ dt_gui_dr_toggle_history()
vkdt.wstate.history_view ^= 1;
if(vkdt.wstate.history_view)
{
vkdt.state.center_x = vkdt.style.border_frac * qvk.win_width + vkdt.state.panel_wd;
vkdt.state.center_y = vkdt.style.border_frac * qvk.win_width;
vkdt.state.center_wd = qvk.win_width * (1.0f-2.0f*vkdt.style.border_frac) - 2*vkdt.state.panel_wd;
vkdt.state.center_ht = qvk.win_height - 2*vkdt.style.border_frac * qvk.win_width;
vkdt.state.center_x = vkdt.style.border_frac * qvk.win_height + vkdt.state.panel_wd;
vkdt.state.center_y = vkdt.style.border_frac * qvk.win_height;
vkdt.state.center_wd = qvk.win_width - 2.0f*vkdt.style.border_frac * qvk.win_height - 2*vkdt.state.panel_wd;
vkdt.state.center_ht = qvk.win_height * (1.0f-2.0f*vkdt.style.border_frac);
}
else
{
vkdt.state.center_x = vkdt.style.border_frac * qvk.win_width;
vkdt.state.center_y = vkdt.style.border_frac * qvk.win_width;
vkdt.state.center_wd = qvk.win_width * (1.0f-2.0f*vkdt.style.border_frac) - vkdt.state.panel_wd;
vkdt.state.center_ht = qvk.win_height - 2*vkdt.style.border_frac * qvk.win_width;
vkdt.state.center_x = vkdt.style.border_frac * qvk.win_height;
vkdt.state.center_y = vkdt.style.border_frac * qvk.win_height;
vkdt.state.center_wd = qvk.win_width - 2.0f*vkdt.style.border_frac * qvk.win_height - vkdt.state.panel_wd;
vkdt.state.center_ht = qvk.win_height * (1.0f-2.0f*vkdt.style.border_frac);
}
}

Expand Down

0 comments on commit 40ffe83

Please sign in to comment.