Bug 475381

Summary: Add a "Tab bars" option t othe Canvas-only settings
Product: [Applications] krita Reporter: Dov Grobgeld <dov.grobgeld>
Component: * UnknownAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: halla
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Suggested user interface for hiding the tab bar in canvas mode

Description Dov Grobgeld 2023-10-08 19:10:53 UTC
Created attachment 162169 [details]
Suggested user interface for hiding the tab bar in canvas mode

SUMMARY

Currently most of the user interface can be hidden when going into canvas-only mode. However the tab bars are still visible. I suggest to add a tab bars option to Canvas-only which hides the tab bars.

STEPS TO REPRODUCE
1. Enter Settings→Configure Krita→Canvas-only settings
2. 
3. 

OBSERVED RESULT

Observe that there is no option to hide the Tab bars

EXPECTED RESULT

A check box for toggling the display of the Tab bars for canvas-only mode.

My suggested interface is shown in the attached image together with a Qt widget QtTabWidget with its Tab Bar component.

My suggestion is that if the Tab Bars option is checked, then in canvas mode the tab bar is hidden.
SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Dov Grobgeld 2023-10-08 20:04:39 UTC
Examining the Qt documentation (though not the Krita sources), if the tabs are drawn with a QTabWidget, toggling the display of the tab bar is as simple as:

```
  tabWidget = new QTabWidget();
  tabBar = tabWidget->tabBar();
:
   tabBar->setHidden(!tabBar->isHidden());

```
Comment 2 Halla Rempt 2023-10-09 11:03:25 UTC
No, it isn't that simple: the tab widget is part of the qmdi area, and we really shouldn't mess with the internals of that class.
Comment 3 Dov Grobgeld 2023-10-16 14:26:21 UTC
I still haven't managed to compile krita on my own, so I haven't tested the below. But according to the following link you can turn off the title display of a qmdi area by changing its "windows flags". 

https://stackoverflow.com/questions/20779774/hiding-qmdiareas-title-bar
Comment 4 Dov Grobgeld 2023-10-16 21:02:28 UTC
I finally managed to compile Krita! And I played around with the qmdi setting. What I found was that the FramelessWindowHint only is used in MultipleDocument subwindow mode. However in tabbed mode it is always shown. 

But that actually gives a way of implementing this feature as follows:

1. The feature should be applied only in multi document tabbed mode.
2. If in tabbed mode and entering Canvas-Only mode and  hide tab-bar is on, then behind the scenes switch to subwindow mode and "press" full screen.
3. When exiting the Canvas-Only mode then restore the tab-window mode.

It may be claimed that I can get what I want with subwindow mode, but I find subwindow mode annoying when working with multiple document. If you then go "full canvas", then there is no obvious keyboard binding for moving between documents.
Comment 5 Halla Rempt 2023-10-20 10:36:35 UTC
The standard ctrl-tab, ctrl-shift-tab (cmd on mac) will switch between documents. This shortcut was made a standard in the nineties.
Comment 6 Dov Grobgeld 2023-10-21 04:44:28 UTC
@halla Thanks for the tip! I must admit I wasn't aware of that shortcut! (even though I started my computer career in the eightees...).

However, this doesn't invalid the is issue.