Summary: | Split-view creates uneven views | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | nic.christin <nic.christin> |
Component: | split-view | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | almur.kde |
Priority: | NOR | ||
Version: | 21.12.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/utilities/konsole/commit/68d9179566828b047162b0dec718f8adf2fc1379 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
attachment-25446-0.html
attachment-4483-0.html |
Description
nic.christin@gmail.com
2021-12-16 13:38:38 UTC
I can confirm this, I have tried it on my personal machine (Konsole 21.12 on Archlinux) and on Konsole master (22.03.70). I am looking into why this happens. At a certain point I started thinking that maybe this could be intended, but the fact that the first command spilits in exactly half, and subsequent commands don´t, is to me giving away that something is odd. Created attachment 144670 [details] attachment-25446-0.html Subsequent commands splits the *current* container in exactly half. I understand the request but I think it would be complex to implement considering that the old behavior you could do only vertical *or* horizontal splits, not combine them. (so it was easy to just reorganize the screen dividing the width by the number of splits) Now we can combine splits, horizontal and vertical, so resizing all panels is not so straightforward. Le dim. 19 déc. 2021 à 09:51, Alfonso Murolo <bugzilla_noreply@kde.org> a écrit : > https://bugs.kde.org/show_bug.cgi?id=447074 > > Alfonso Murolo <almur.kde@gmail.com> changed: > > What |Removed |Added > > ---------------------------------------------------------------------------- > CC| |almur.kde@gmail.com > > --- Comment #1 from Alfonso Murolo <almur.kde@gmail.com> --- > I can confirm this, I have tried it on my personal machine (Konsole 21.12 > on > Archlinux) and on Konsole master (22.03.70). I am looking into why this > happens. At a certain point I started thinking that maybe this could be > intended, but the fact that the first command spilits in exactly half, and > subsequent commands don´t, is to me giving away that something is odd. > > -- > You are receiving this mail because: > You are the assignee for the bug. (In reply to tcanabrava from comment #2) > Created attachment 144670 [details] > attachment-25446-0.html > > Subsequent commands splits the *current* container in exactly half. > I understand the request but I think it would be complex to implement > considering that the old behavior you could do only vertical *or* > horizontal splits, not combine them. (so it was easy to just reorganize the > screen dividing the width by the number of splits) > > Now we can combine splits, horizontal and vertical, so resizing all panels > is not so straightforward. > > > Le dim. 19 déc. 2021 à 09:51, Alfonso Murolo <bugzilla_noreply@kde.org> a > écrit : > > > https://bugs.kde.org/show_bug.cgi?id=447074 > > > > Alfonso Murolo <almur.kde@gmail.com> changed: > > > > What |Removed |Added > > > > ---------------------------------------------------------------------------- > > CC| |almur.kde@gmail.com > > > > --- Comment #1 from Alfonso Murolo <almur.kde@gmail.com> --- > > I can confirm this, I have tried it on my personal machine (Konsole 21.12 > > on > > Archlinux) and on Konsole master (22.03.70). I am looking into why this > > happens. At a certain point I started thinking that maybe this could be > > intended, but the fact that the first command spilits in exactly half, and > > subsequent commands don´t, is to me giving away that something is odd. > > > > -- > > You are receiving this mail because: > > You are the assignee for the bug. As I am not very familiar with the code of the ViewSplitter, and I chose this issue as the first one ever to look at (:D), please take my words with a grain of salt: it seems from the behaviour however that the sizes of the current container are incorrectly referenced to. This results in a failure: 1. Split the views in half top/bottom. Views will be split correctly 2. Kill the bottom view. Now only one view exists, exactly identical to the first 3. Split the view in half top/bottom again. Current container should, intuitively, be exactly the same size of the original container, to be split in half. Observe the failure in splitting in half a second time. Created attachment 144677 [details] attachment-4483-0.html you are correct, there is a bug there, I have never realized it. Do you want to try to solve it? code *should* not be complex. if not, I can try later on. On Sun, Dec 19, 2021 at 10:39 AM Alfonso Murolo <bugzilla_noreply@kde.org> wrote: > https://bugs.kde.org/show_bug.cgi?id=447074 > > --- Comment #3 from Alfonso Murolo <almur.kde@gmail.com> --- > (In reply to tcanabrava from comment #2) > > Created attachment 144670 [details] > > attachment-25446-0.html > > > > Subsequent commands splits the *current* container in exactly half. > > I understand the request but I think it would be complex to implement > > considering that the old behavior you could do only vertical *or* > > horizontal splits, not combine them. (so it was easy to just reorganize > the > > screen dividing the width by the number of splits) > > > > Now we can combine splits, horizontal and vertical, so resizing all > panels > > is not so straightforward. > > > > > > Le dim. 19 déc. 2021 à 09:51, Alfonso Murolo <bugzilla_noreply@kde.org> > a > > écrit : > > > > > https://bugs.kde.org/show_bug.cgi?id=447074 > > > > > > Alfonso Murolo <almur.kde@gmail.com> changed: > > > > > > What |Removed |Added > > > > > > > ---------------------------------------------------------------------------- > > > CC| |almur.kde@gmail.com > > > > > > --- Comment #1 from Alfonso Murolo <almur.kde@gmail.com> --- > > > I can confirm this, I have tried it on my personal machine (Konsole > 21.12 > > > on > > > Archlinux) and on Konsole master (22.03.70). I am looking into why this > > > happens. At a certain point I started thinking that maybe this could be > > > intended, but the fact that the first command spilits in exactly half, > and > > > subsequent commands don´t, is to me giving away that something is odd. > > > > > > -- > > > You are receiving this mail because: > > > You are the assignee for the bug. > > As I am not very familiar with the code of the ViewSplitter, and I chose > this > issue as the first one ever to look at (:D), please take my words with a > grain > of salt: it seems from the behaviour however that the sizes of the current > container are incorrectly referenced to. > > This results in a failure: > 1. Split the views in half top/bottom. Views will be split correctly > 2. Kill the bottom view. Now only one view exists, exactly identical to the > first > 3. Split the view in half top/bottom again. Current container should, > intuitively, be exactly the same size of the original container, to be > split in > half. Observe the failure in splitting in half a second time. > > -- > You are receiving this mail because: > You are the assignee for the bug. (In reply to tcanabrava from comment #4) > Created attachment 144677 [details] > attachment-4483-0.html > > you are correct, there is a bug there, I have never realized it. > Do you want to try to solve it? code *should* not be complex. > if not, I can try later on. > > > On Sun, Dec 19, 2021 at 10:39 AM Alfonso Murolo <bugzilla_noreply@kde.org> > wrote: > > > https://bugs.kde.org/show_bug.cgi?id=447074 > > > > --- Comment #3 from Alfonso Murolo <almur.kde@gmail.com> --- > > (In reply to tcanabrava from comment #2) > > > Created attachment 144670 [details] > > > attachment-25446-0.html > > > > > > Subsequent commands splits the *current* container in exactly half. > > > I understand the request but I think it would be complex to implement > > > considering that the old behavior you could do only vertical *or* > > > horizontal splits, not combine them. (so it was easy to just reorganize > > the > > > screen dividing the width by the number of splits) > > > > > > Now we can combine splits, horizontal and vertical, so resizing all > > panels > > > is not so straightforward. > > > > > > > > > Le dim. 19 déc. 2021 à 09:51, Alfonso Murolo <bugzilla_noreply@kde.org> > > a > > > écrit : > > > > > > > https://bugs.kde.org/show_bug.cgi?id=447074 > > > > > > > > Alfonso Murolo <almur.kde@gmail.com> changed: > > > > > > > > What |Removed |Added > > > > > > > > > > ---------------------------------------------------------------------------- > > > > CC| |almur.kde@gmail.com > > > > > > > > --- Comment #1 from Alfonso Murolo <almur.kde@gmail.com> --- > > > > I can confirm this, I have tried it on my personal machine (Konsole > > 21.12 > > > > on > > > > Archlinux) and on Konsole master (22.03.70). I am looking into why this > > > > happens. At a certain point I started thinking that maybe this could be > > > > intended, but the fact that the first command spilits in exactly half, > > and > > > > subsequent commands don´t, is to me giving away that something is odd. > > > > > > > > -- > > > > You are receiving this mail because: > > > > You are the assignee for the bug. > > > > As I am not very familiar with the code of the ViewSplitter, and I chose > > this > > issue as the first one ever to look at (:D), please take my words with a > > grain > > of salt: it seems from the behaviour however that the sizes of the current > > container are incorrectly referenced to. > > > > This results in a failure: > > 1. Split the views in half top/bottom. Views will be split correctly > > 2. Kill the bottom view. Now only one view exists, exactly identical to the > > first > > 3. Split the view in half top/bottom again. Current container should, > > intuitively, be exactly the same size of the original container, to be > > split in > > half. Observe the failure in splitting in half a second time. > > > > -- > > You are receiving this mail because: > > You are the assignee for the bug. I´d like to try to fix it. As it is my first issue, it will probably take me a while to figure out how the entire splitter works, but hopefully it shouldn´t be too hard :-) A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/559 (In reply to tcanabrava from comment #4) > Created attachment 144677 [details] > attachment-4483-0.html > > you are correct, there is a bug there, I have never realized it. > Do you want to try to solve it? code *should* not be complex. > if not, I can try later on. > > > On Sun, Dec 19, 2021 at 10:39 AM Alfonso Murolo <bugzilla_noreply@kde.org> > wrote: > > > https://bugs.kde.org/show_bug.cgi?id=447074 > > > > --- Comment #3 from Alfonso Murolo <almur.kde@gmail.com> --- > > (In reply to tcanabrava from comment #2) > > > Created attachment 144670 [details] > > > attachment-25446-0.html > > > > > > Subsequent commands splits the *current* container in exactly half. > > > I understand the request but I think it would be complex to implement > > > considering that the old behavior you could do only vertical *or* > > > horizontal splits, not combine them. (so it was easy to just reorganize > > the > > > screen dividing the width by the number of splits) > > > > > > Now we can combine splits, horizontal and vertical, so resizing all > > panels > > > is not so straightforward. > > > > > > > > > Le dim. 19 déc. 2021 à 09:51, Alfonso Murolo <bugzilla_noreply@kde.org> > > a > > > écrit : > > > > > > > https://bugs.kde.org/show_bug.cgi?id=447074 > > > > > > > > Alfonso Murolo <almur.kde@gmail.com> changed: > > > > > > > > What |Removed |Added > > > > > > > > > > ---------------------------------------------------------------------------- > > > > CC| |almur.kde@gmail.com > > > > > > > > --- Comment #1 from Alfonso Murolo <almur.kde@gmail.com> --- > > > > I can confirm this, I have tried it on my personal machine (Konsole > > 21.12 > > > > on > > > > Archlinux) and on Konsole master (22.03.70). I am looking into why this > > > > happens. At a certain point I started thinking that maybe this could be > > > > intended, but the fact that the first command spilits in exactly half, > > and > > > > subsequent commands don´t, is to me giving away that something is odd. > > > > > > > > -- > > > > You are receiving this mail because: > > > > You are the assignee for the bug. > > > > As I am not very familiar with the code of the ViewSplitter, and I chose > > this > > issue as the first one ever to look at (:D), please take my words with a > > grain > > of salt: it seems from the behaviour however that the sizes of the current > > container are incorrectly referenced to. > > > > This results in a failure: > > 1. Split the views in half top/bottom. Views will be split correctly > > 2. Kill the bottom view. Now only one view exists, exactly identical to the > > first > > 3. Split the view in half top/bottom again. Current container should, > > intuitively, be exactly the same size of the original container, to be > > split in > > half. Observe the failure in splitting in half a second time. > > > > -- > > You are receiving this mail because: > > You are the assignee for the bug. I should have now correctly issued the merge request. Should I also take the assignment of this bug ticket? How is the workflow exactly? Any further guidance about this is welcome! Git commit 68d9179566828b047162b0dec718f8adf2fc1379 by Tomaz Canabrava, on behalf of Alfonso Murolo. Committed on 28/12/2021 at 10:51. Pushed by tcanabrava into branch 'master'. ViewSplitter will now consistently create even-spaced splits ViewSplitter was creating widgets of inconsistent sizes after adding/removing them in Konsole. This change forces the active splitter to always be updated with the appropriate even-spacing size for the widgets. As a drawback, manual changes to sizes will be overwritten when a new widget is added if no new splitter needs to be instantiated. M +2 -0 src/widgets/ViewSplitter.cpp https://invent.kde.org/utilities/konsole/commit/68d9179566828b047162b0dec718f8adf2fc1379 |