diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-07-14 05:56:01 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-14 05:56:01 +0200 |
commit | 170d2e7b14fcdbd88fd2839bbd3dffd00df5196b (patch) | |
tree | ce401b32db9733afafc28f57e9dca3d588e44feb /src | |
parent | dc72e253df77c9126c720e7ff5dad7f8c72bd117 (diff) |
Render tabs above body
Diffstat (limited to 'src')
-rw-r--r-- | src/Program.c | 2 | ||||
-rw-r--r-- | src/QuickMedia.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/Program.c b/src/Program.c index 65164c4..47b0e33 100644 --- a/src/Program.c +++ b/src/Program.c @@ -27,6 +27,8 @@ int exec_program(const char **args, ProgramOutputCallback output_callback, void pid_t pid = fork(); if(pid == -1) { perror("Failed to fork"); + close(fd[READ_END]); + close(fd[WRITE_END]); return -3; } else if(pid == 0) { /* child */ if(prctl(PR_SET_PDEATHSIG, SIGTERM) == -1) { diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 42e018d..99d713e 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -706,10 +706,11 @@ namespace QuickMedia { const float width_per_tab = window_size.x / tabs.size(); const float tab_y = tab_spacer_height + std::floor(search_bar->getBottomWithoutShadow() + tab_height * 0.5f - (tab_text_size + 5.0f) * 0.5f); sf::RectangleShape tab_background(sf::Vector2f(std::floor(width_per_tab), tab_height)); + + tabs[selected_tab].body->draw(window, body_pos, body_size); int i = 0; for(Tab &tab : tabs) { if(i == selected_tab) { - tab.body->draw(window, body_pos, body_size); tab_background.setFillColor(tab_selected_color); } else { tab_background.setFillColor(tab_unselected_color); |