Bug 460160 - Kate's main view can be resized by dragging the tab bar
Summary: Kate's main view can be resized by dragging the tab bar
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-09 12:33 UTC by popov895
Modified: 2023-04-16 09:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 23.04.0
Sentry Crash Report:


Attachments
Resizing main view (239.52 KB, video/mp4)
2022-10-09 12:33 UTC, popov895
Details
Still can be resized (303.48 KB, video/mp4)
2023-03-21 17:01 UTC, popov895
Details

Note You need to log in before you can comment on or make changes to this bug.
Description popov895 2022-10-09 12:33:28 UTC
Created attachment 152661 [details]
Resizing main view

SUMMARY

On first launch, Kate's main view can be resized by dragging the tab bar. See attached video for details.

STEPS TO REPRODUCE

1. Delete ~/.local/share/kate folder
2. Launch Kate
3. Move cursor to area between toolbar and tab bar; the cursor will change from an arrow to a drag
4. Drag tabbar to resize main view

SOFTWARE/OS VERSIONS

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.26.80
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Graphics Platform: X11
Comment 1 Christoph Cullmann 2023-02-26 19:45:58 UTC
I can't reproduce that with 22.12 or master.
Comment 2 popov895 2023-03-21 17:01:26 UTC
Created attachment 157498 [details]
Still can be resized

Still can be reproduced.

SOFTWARE/OS VERSIONS

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.104.0
KDE Gear Version: 23.03.70
Qt Version: 5.15.8
Graphics Platform: X11
Comment 3 popov895 2023-03-23 19:32:32 UTC
Reopen.
Comment 4 Waqar Ahmed 2023-03-23 20:05:56 UTC
> KDE Gear Version: 23.03.70

Can't reproduce. Please try with master or 23.04.
Comment 5 popov895 2023-03-23 21:02:37 UTC
Can reproduce on master.

The problem is that the sidebar isn't collapsed (i.e. m_ownSplit is visible, which allows the sidebar to be resized even if it doesn't contain any tool) if the "Start new session" option is enabled and the ~/.local/share/kate/anonymous.katesession file is missing.
Comment 6 Bug Janitor Service 2023-04-15 14:46:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1200
Comment 7 Christoph Cullmann 2023-04-15 14:47:19 UTC
Could you try my patch, should avoid the need for special casing for KWrite in the main window, too.
Comment 8 popov895 2023-04-15 17:59:48 UTC
Your patch fixes this issue for me. But I fixed it much easier, see https://invent.kde.org/epopov/kate/-/commit/ca0e0872905b4481f908042de9216b7aa7fcf72d.
Comment 9 Christoph Cullmann 2023-04-15 18:03:28 UTC
(In reply to popov895 from comment #8)
> Your patch fixes this issue for me. But I fixed it much easier, see
> https://invent.kde.org/epopov/kate/-/commit/
> ca0e0872905b4481f908042de9216b7aa7fcf72d.

That is indeed a good fix for the initial state.
I assume that allows to remove the 

    // kwrite doesn't want sidebars, we have no plugins
    if (KateApp::isKWrite()) {
        setSidebarsVisibleInternal(false, true);
    }

in the main window code, too?
Comment 10 Christoph Cullmann 2023-04-15 18:18:28 UTC
Tried it, seems fine, updated the request
Comment 11 Christoph Cullmann 2023-04-16 09:07:55 UTC
Git commit 14cf1a937d9300bbeabdbe00f9348ab0d4bc92b8 by Christoph Cullmann.
Committed on 16/04/2023 at 09:07.
Pushed by cullmann into branch 'master'.

ensure sidebars are properly collapsed

for no session data or KWrite mode we need to do some proper init
allows to remove other hack for KWrite

M  +0    -5    apps/lib/katemainwindow.cpp
M  +5    -0    apps/lib/katemdi.cpp

https://invent.kde.org/utilities/kate/commit/14cf1a937d9300bbeabdbe00f9348ab0d4bc92b8
Comment 12 Christoph Cullmann 2023-04-16 09:08:20 UTC
Git commit 605583689ce1d3a21585960744ecd9643c97274f by Christoph Cullmann.
Committed on 16/04/2023 at 09:08.
Pushed by cullmann into branch 'release/23.04'.

ensure sidebars are properly collapsed

for no session data or KWrite mode we need to do some proper init
allows to remove other hack for KWrite


(cherry picked from commit 14cf1a937d9300bbeabdbe00f9348ab0d4bc92b8)

M  +0    -5    apps/lib/katemainwindow.cpp
M  +5    -0    apps/lib/katemdi.cpp

https://invent.kde.org/utilities/kate/commit/605583689ce1d3a21585960744ecd9643c97274f