← Back to team overview

mudlet-makers team mailing list archive

[Bug 586135] Re: getMainWindowSize fails to account for covering button bars

 

Fixed in my repository: https://github.com/SecondReality/Mudlet-
Suttonian/commit/913f4d2dac614fdf3ad8a147e89e7c6860fb2258

It took me a while to understand why this was happening, I made some
programming notes along the way:

* mpMainFrame: Contains the main buffer, it doesn't include the command bar or toolbars.
* TConsole: Contains toolbars, the command bar and mpMainFrame.

TConsole listens to when the main window's size changes (in TConsole::resizeEvent).
If the main window's size changes, it sets the mpMainFrame to be the same size as the window/TConsole.
I'm not sure why it does this, since mpMainFrame is always smaller visually than the TConsole (so some of it is usually hidden behind the command bar or just not visible) but I didn't want to change this (it could have impacted a bunch of stuff).

When a toolbar is added or removed the Qt resizes the widgets
automatically. But since the main window size hasn't changed,
TConsole::resizeEvent isn't called and the size of mpMainFrame isn't
what getMainWindowSize expects it to be, resulting in an incorrect size.

To fix it I don't rely on the size of mpMainFrame - the height is
calculated from the size of the TConsole minus the height of the command
bar.

-- 
You received this bug notification because you are a member of Mudlet
Makers, which is subscribed to Mudlet.
https://bugs.launchpad.net/bugs/586135

Title:
  getMainWindowSize fails to account for covering button bars

Status in Mudlet the MUD client:
  New

Bug description:
  getMainWindowSize will report the proper dimensions the first few
  times it's used after a button bar is enabled or disabled, but then
  will break and fail to account for it.

  See video of strange behavior.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mudlet/+bug/586135/+subscriptions


Follow ups

References