[konsole] [Bug 359662] Terminal Rows are miscalculated if Menu Bar is turned off

2019-12-02 Thread Kurt Hindenburg
https://bugs.kde.org/show_bug.cgi?id=359662

Kurt Hindenburg  changed:

   What|Removed |Added

 Resolution|--- |FIXED
  Latest Commit|http://commits.kde.org/kons |http://commits.kde.org/kons
   |ole/0a5e2b34971e339561e60c6 |ole/efb621d091c05f119598266
   |74a6fa5ec7eb941da   |7782507ffe27ed8cf
 Status|REOPENED|RESOLVED
   Version Fixed In||19.12.0

-- 
You are receiving this mail because:
You are watching all bug changes.

[konsole] [Bug 359662] Terminal Rows are miscalculated if Menu Bar is turned off

2019-11-25 Thread Oleg Girko
https://bugs.kde.org/show_bug.cgi?id=359662

--- Comment #7 from Oleg Girko  ---
Looks like this problem is fixed.

Probably, by this commit:
https://cgit.kde.org/konsole.git/commit/?id=efb621d091c05f1195982667782507ffe27ed8cf

-- 
You are receiving this mail because:
You are watching all bug changes.

[konsole] [Bug 359662] Terminal Rows are miscalculated if Menu Bar is turned off

2019-06-19 Thread Oleg Girko
https://bugs.kde.org/show_bug.cgi?id=359662

--- Comment #6 from Oleg Girko  ---
I've spent several days trying to understand what's going on, but my knowledge
of layout mechanics in Qt is not sufficient to find out the root cause. I'll
try to summarise my findings here in hope that it will be helpful for somebody
more knowledgeable than me to solve this bug.

# My setup

I have konsole5-18.12.3-2.fc30.x86_64 package installed in Fedora 30.
My laptop's screen size is 3200x1800 pixels (295x167 millimeters).
DPI is explicitly set to 192 in KDE settings.
Font in Konsole profile is set to Consolas, size 7 (yes, this is small).
Menu and tabbar in Konsole are disabled.
I've added tons of debug prints to konsole5 source code, but except of debug
print statements (using qWarning()), the source code and build procedure is
identical to this Fedora package:
https://koji.fedoraproject.org/koji/buildinfo?buildID=1247868
I've set "Use current window size on next startup" to false, and Terminal Size
in my only profile to 80x24.

# What's going on

Everything is happening in Application::newInstance() method.

1. MainWindow is created. Then MainWindow::createSession() is called that in
turn calls ViewManager::createView(Session *) that creates TabbedViewContainer.
Constructor of TabbedViewContainer calls
TabbedViewContainer::konsoleConfigChanged() that calls
tabBar()->setVisible(false);

2. Later in ViewManager::createView(Session *) another overload with the same
name is called: ViewManager::createView(Session *, TabbedViewContainer *, int)
that creates TerminalDisplay. Then it calls TerminalDisplay::setSize(80, 24) on
newly created TerminalDisplay.

I have the following before TerminalDisplay::setSize(80, 24):

ViewSplitter:
- isVisible() = false
- contentsRect() =  QRect(0,0 640x480)
- sizeHint() =  QSize(8, 8)
- size() =  QSize(640, 480)
- geometry() =  QRect(0,0 640x480)
TabbedViewContainer:
- isVisible() = false
- contentsRect() =  QRect(0,0 640x480)
- sizeHint() =  QSize(8, 8)
- size() =  QSize(640, 480)
- geometry() =  QRect(0,0 640x480)
QTabBar:
- isVisible() = false
- contentsRect() =  QRect(0,0 0x0)
- sizeHint() =  QSize(0, 0)
- size() =  QSize(0, 0)
- geometry() =  QRect(0,0 0x0)
TerminalDisplay:
- isVisible() = false
- contentsRect() =  QRect(0,0 640x480)
- sizeHint() =  QSize(-1, -1)
- size() =  QSize(640, 480)
- geometry() =  QRect(0,0 640x480)

As you see, these values are just placeholders, nothing interesting.

I have the following after TerminalDisplay::setSize(80, 24):

ViewSplitter:
- isVisible() = false
- contentsRect() =  QRect(0,0 640x480)
- sizeHint() =  QSize(8, 8)
- size() =  QSize(640, 480)
- geometry() =  QRect(0,0 640x480)
TabbedViewContainer:
- isVisible() = false
- contentsRect() =  QRect(0,0 640x480)
- sizeHint() =  QSize(8, 8)
- size() =  QSize(640, 480)
- geometry() =  QRect(0,0 640x480)
QTabBar:
- isVisible() = false
- contentsRect() =  QRect(0,0 0x0)
- sizeHint() =  QSize(0, 0)
- size() =  QSize(0, 0)
- geometry() =  QRect(0,0 0x0)
TerminalDisplay:
- isVisible() = false
- contentsRect() =  QRect(0,0 640x480)
- sizeHint() =  QSize(819, 482)
- size() =  QSize(640, 480)
- geometry() =  QRect(0,0 640x480)

What changed here is TerminalDisplay::sizeHint() changed to something that
makes sense for 80x24 display.

3. Later in ViewManager::createView(Session *, TabbedViewContainer *, int),
container->addView() is called. TabbedViewContainer::addView() method just
calls QTabWidget::addTab() method with newly created TerminalDisplay as its
first argument, but it causes geometry of widgets to be recalculated
dramatically. This is what I have after this:

ViewSplitter:
- isVisible() = false
- contentsRect() =  QRect(0,0 640x480)
- sizeHint() =  QSize(827, 535)
- size() =  QSize(640, 480)
- geometry() =  QRect(0,0 640x480)
TabbedViewContainer:
- isVisible() = false
- contentsRect() =  QRect(0,0 640x480)
- sizeHint() =  QSize(827, 535)
- size() =  QSize(640, 480)
- geometry() =  QRect(0,0 640x480)
QTabBar:
- isVisible() = false
- contentsRect() =  QRect(0,0 0x0)
- sizeHint() =  QSize(129, 45)
- size() =  QSize(0, 0)
- geometry() =  QRect(0,0 0x0)
TerminalDisplay:
- isVisible() = false
- contentsRect() =  QRect(0,0 640x480)
- sizeHint() =  QSize(819, 482)
- size() =  QSize(640, 480)
- geometry() =  QRect(0,0 640x480)

Look at sizeHint() of TabbedViewContainer and ViewSplitter that encloses it.
827x535 is way bigger than 819x482 of TerminalDisplay. Height of 535 is even 8
pixels higher that 482 (height of TerminalDisplay) + 45 (height of QTabBar).

I think, the key question to understand the cause of the problem is what
happened here.

How sizeHint() of TabbedViewContainer (that is essentially QTabWidget) became
significantly bigger than one of TerminalDisplay that was just added to it,
despite its tabBar() being hidden?

Remember this size: 827x535, it is what will cause problems later.

4. In the end of Application::newInstance(),
Application::finalizeNewMainWindow(MainWindow *) is called.
First, 

[konsole] [Bug 359662] Terminal Rows are miscalculated if Menu Bar is turned off

2019-06-03 Thread Oleg Girko
https://bugs.kde.org/show_bug.cgi?id=359662

Oleg Girko  changed:

   What|Removed |Added

 CC||ol+...@infoserver.ru

-- 
You are receiving this mail because:
You are watching all bug changes.

[konsole] [Bug 359662] Terminal Rows are miscalculated if Menu Bar is turned off

2019-03-01 Thread Patrick Silva
https://bugs.kde.org/show_bug.cgi?id=359662

Patrick Silva  changed:

   What|Removed |Added

 CC||bugsefor...@gmx.com

--- Comment #5 from Patrick Silva  ---
Here konsole 18.12.2 starts up with 112x29 geometry (without menubar) after the
steps provided by reporter. I use fractional display scaling (1.2 factor).

Operating System: Arch Linux 
KDE Plasma Version: 5.15.2
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.1

-- 
You are receiving this mail because:
You are watching all bug changes.

[konsole] [Bug 359662] Terminal Rows are miscalculated if Menu Bar is turned off

2018-12-22 Thread Mariusz Glebocki
https://bugs.kde.org/show_bug.cgi?id=359662

Mariusz Glebocki  changed:

   What|Removed |Added

   See Also||https://bugs.kde.org/show_b
   ||ug.cgi?id=402446

-- 
You are receiving this mail because:
You are watching all bug changes.

[konsole] [Bug 359662] Terminal Rows are miscalculated if Menu Bar is turned off

2018-12-14 Thread Radics Péter
https://bugs.kde.org/show_bug.cgi?id=359662

Radics Péter  changed:

   What|Removed |Added

 CC||mitchnull+...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[konsole] [Bug 359662] Terminal Rows are miscalculated if Menu Bar is turned off

2018-12-14 Thread Radics Péter
https://bugs.kde.org/show_bug.cgi?id=359662

Radics Péter  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #4 from Radics Péter  ---
This happens again since the latest update (konsole 18.12.0-1 on arch linux)

-- 
You are receiving this mail because:
You are watching all bug changes.

[konsole] [Bug 359662] Terminal Rows are miscalculated if Menu Bar is turned off

2016-06-10 Thread Simon Andric via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=359662

Simon Andric  changed:

   What|Removed |Added

 CC||simonandr...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.


[konsole] [Bug 359662] Terminal Rows are miscalculated if Menu Bar is turned off

2016-05-21 Thread Kurt Hindenburg via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=359662

Kurt Hindenburg  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |CONFIRMED

--- Comment #2 from Kurt Hindenburg  ---
Yes this has always been an issue - I thought there was another old report for
this.

The patch does appear to fix it.

-- 
You are receiving this mail because:
You are watching all bug changes.


[konsole] [Bug 359662] Terminal Rows are miscalculated if Menu Bar is turned off

2016-05-01 Thread Rex Dieter via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=359662

Rex Dieter  changed:

   What|Removed |Added

 CC||rdie...@math.unl.edu

-- 
You are receiving this mail because:
You are watching all bug changes.


[konsole] [Bug 359662] Terminal Rows are miscalculated if Menu Bar is turned off

2016-05-01 Thread Roman via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=359662

Roman  changed:

   What|Removed |Added

 CC||subd...@gmail.com

--- Comment #1 from Roman  ---
FYI: https://git.reviewboard.kde.org/r/127803/

-- 
You are receiving this mail because:
You are watching all bug changes.


[konsole] [Bug 359662] Terminal Rows are miscalculated if Menu Bar is turned off

2016-04-09 Thread cpon via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=359662

cpon  changed:

   What|Removed |Added

 CC||cpigat...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.


[konsole] [Bug 359662] Terminal Rows are miscalculated if Menu Bar is turned off

2016-02-22 Thread Philip Smith via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=359662

Philip Smith  changed:

   What|Removed |Added

 CC||p...@mssl.ucl.ac.uk

-- 
You are receiving this mail because:
You are watching all bug changes.