We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Axes zoom area does not resize in 0.12.4
### Short description
When a plot is first generated with a given size, say `width ` and `height` in pixels, the entire axes areas on the left and bottom of the plot are zoomable. When the plot size is resized such that the plot is larger (e.g. the window is grabbed along an edge or corner and expanded), only the top `height` portion of the y-axes or the left `width` portion of the x-axis retain the ability to zoom the plot using the scroll wheel. The axes area outside (i.e. the lower portion of the y-axis or the right portion of the x-axis) are not zoomable. If hovering over the plot, not on an axes, there is no issue with zooming. Reverting to 0.12.3 fixes issue.

I was able to reproduce this in both custom plots and many of the pyqtgraph.example scripts.

### Tested environment(s)

 * PyQtGraph version: 0.12.4
 * Qt Python binding: PySide2 5.15.2.1 Qt 5.15.2
 * Python version: 3.7
 * NumPy version: 1.21.6
 * Operating system: Windows 10 Enterprise 21H2
 * Installation method: pip


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pyqtgraph/graphicsItems/GraphicsWidget.py`
Content:
```
1 from ..Qt import QtGui, QtWidgets
2 from .GraphicsItem import GraphicsItem
3 
4 __all__ = ['GraphicsWidget']
5 
6 class GraphicsWidget(GraphicsItem, QtWidgets.QGraphicsWidget):
7     
8     _qtBaseClass = QtWidgets.QGraphicsWidget
9     def __init__(self, *args, **kargs):
10         """
11         **Bases:** :class:`GraphicsItem <pyqtgraph.GraphicsItem>`, :class:`QtWidgets.QGraphicsWidget`
12         
13         Extends QGraphicsWidget with several helpful methods and workarounds for PyQt bugs. 
14         Most of the extra functionality is inherited from :class:`GraphicsItem <pyqtgraph.GraphicsItem>`.
15         """
16         QtWidgets.QGraphicsWidget.__init__(self, *args, **kargs)
17         GraphicsItem.__init__(self)
18 
19         # cache bouding rect and geometry
20         self._boundingRectCache = self._previousGeometry = None
21         self._painterPathCache = None
22         
23         ## done by GraphicsItem init
24         #GraphicsScene.registerObject(self)  ## workaround for pyqt bug in graphicsscene.items()
25 
26     # Removed due to https://bugreports.qt-project.org/browse/PYSIDE-86
27     #def itemChange(self, change, value):
28         ## BEWARE: Calling QGraphicsWidget.itemChange can lead to crashing!
29         ##ret = QtWidgets.QGraphicsWidget.itemChange(self, change, value)  ## segv occurs here
30         ## The default behavior is just to return the value argument, so we'll do that
31         ## without calling the original method.
32         #ret = value
33         #if change in [self.ItemParentHasChanged, self.ItemSceneHasChanged]:
34             #self._updateView()
35         #return ret
36 
37     def setFixedHeight(self, h):
38         self.setMaximumHeight(h)
39         self.setMinimumHeight(h)
40 
41     def setFixedWidth(self, h):
42         self.setMaximumWidth(h)
43         self.setMinimumWidth(h)
44         
45     def height(self):
46         return self.geometry().height()
47     
48     def width(self):
49         return self.geometry().width()
50 
51     def boundingRect(self):
52         geometry = self.geometry()
53         if geometry != self._previousGeometry:
54             self._painterPathCache = None
55             
56             br = self.mapRectFromParent(geometry).normalized()
57             self._boundingRectCache = br
58             self._previousGeometry = geometry
59         else:
60             br = self._boundingRectCache
61 
62         return br
63 
64     def shape(self):  ## No idea why this is necessary, but rotated items do not receive clicks otherwise.
65         p = self._painterPathCache
66         if p is None:
67             self._painterPathCache = p = QtGui.QPainterPath()
68             p.addRect(self.boundingRect())
69 
70         return p
71
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/pyqtgraph/graphicsItems/GraphicsWidget.py b/pyqtgraph/graphicsItems/GraphicsWidget.py
--- a/pyqtgraph/graphicsItems/GraphicsWidget.py
+++ b/pyqtgraph/graphicsItems/GraphicsWidget.py
@@ -3,36 +3,43 @@
 
 __all__ = ['GraphicsWidget']
 
+
 class GraphicsWidget(GraphicsItem, QtWidgets.QGraphicsWidget):
     
     _qtBaseClass = QtWidgets.QGraphicsWidget
-    def __init__(self, *args, **kargs):
+
+    def __init__(self, *args, **kwargs):
         """
         **Bases:** :class:`GraphicsItem <pyqtgraph.GraphicsItem>`, :class:`QtWidgets.QGraphicsWidget`
         
         Extends QGraphicsWidget with several helpful methods and workarounds for PyQt bugs. 
         Most of the extra functionality is inherited from :class:`GraphicsItem <pyqtgraph.GraphicsItem>`.
         """
-        QtWidgets.QGraphicsWidget.__init__(self, *args, **kargs)
+        QtWidgets.QGraphicsWidget.__init__(self, *args, **kwargs)
         GraphicsItem.__init__(self)
 
-        # cache bouding rect and geometry
+        # cache bounding rect and geometry
         self._boundingRectCache = self._previousGeometry = None
         self._painterPathCache = None
-        
-        ## done by GraphicsItem init
-        #GraphicsScene.registerObject(self)  ## workaround for pyqt bug in graphicsscene.items()
+        self.geometryChanged.connect(self._resetCachedProperties)
+
+        # done by GraphicsItem init
+        # GraphicsScene.registerObject(self)  # workaround for pyqt bug in GraphicsScene.items()
 
     # Removed due to https://bugreports.qt-project.org/browse/PYSIDE-86
-    #def itemChange(self, change, value):
-        ## BEWARE: Calling QGraphicsWidget.itemChange can lead to crashing!
-        ##ret = QtWidgets.QGraphicsWidget.itemChange(self, change, value)  ## segv occurs here
-        ## The default behavior is just to return the value argument, so we'll do that
-        ## without calling the original method.
-        #ret = value
-        #if change in [self.ItemParentHasChanged, self.ItemSceneHasChanged]:
-            #self._updateView()
-        #return ret
+    # def itemChange(self, change, value):
+    #     # BEWARE: Calling QGraphicsWidget.itemChange can lead to crashing!
+    #     # ret = QtWidgets.QGraphicsWidget.itemChange(self, change, value)  # segv occurs here
+    #     # The default behavior is just to return the value argument, so we'll do that
+    #     # without calling the original method.
+    #     ret = value
+    #     if change in [self.ItemParentHasChanged, self.ItemSceneHasChanged]:
+    #         self._updateView()
+    #     return ret
+
+    def _resetCachedProperties(self):
+        self._boundingRectCache = self._previousGeometry = None
+        self._painterPathCache = None
 
     def setFixedHeight(self, h):
         self.setMaximumHeight(h)
@@ -41,10 +48,10 @@
     def setFixedWidth(self, h):
         self.setMaximumWidth(h)
         self.setMinimumWidth(h)
-        
+
     def height(self):
         return self.geometry().height()
-    
+
     def width(self):
         return self.geometry().width()
 
@@ -52,19 +59,16 @@
         geometry = self.geometry()
         if geometry != self._previousGeometry:
             self._painterPathCache = None
-            
             br = self.mapRectFromParent(geometry).normalized()
             self._boundingRectCache = br
             self._previousGeometry = geometry
         else:
             br = self._boundingRectCache
-
         return br
 
-    def shape(self):  ## No idea why this is necessary, but rotated items do not receive clicks otherwise.
+    def shape(self):
         p = self._painterPathCache
         if p is None:
             self._painterPathCache = p = QtGui.QPainterPath()
             p.addRect(self.boundingRect())
-
         return p

{"golden_diff": "diff --git a/pyqtgraph/graphicsItems/GraphicsWidget.py b/pyqtgraph/graphicsItems/GraphicsWidget.py\n--- a/pyqtgraph/graphicsItems/GraphicsWidget.py\n+++ b/pyqtgraph/graphicsItems/GraphicsWidget.py\n@@ -3,36 +3,43 @@\n \n __all__ = ['GraphicsWidget']\n \n+\n class GraphicsWidget(GraphicsItem, QtWidgets.QGraphicsWidget):\n     \n     _qtBaseClass = QtWidgets.QGraphicsWidget\n-    def __init__(self, *args, **kargs):\n+\n+    def __init__(self, *args, **kwargs):\n         \"\"\"\n         **Bases:** :class:`GraphicsItem <pyqtgraph.GraphicsItem>`, :class:`QtWidgets.QGraphicsWidget`\n         \n         Extends QGraphicsWidget with several helpful methods and workarounds for PyQt bugs. \n         Most of the extra functionality is inherited from :class:`GraphicsItem <pyqtgraph.GraphicsItem>`.\n         \"\"\"\n-        QtWidgets.QGraphicsWidget.__init__(self, *args, **kargs)\n+        QtWidgets.QGraphicsWidget.__init__(self, *args, **kwargs)\n         GraphicsItem.__init__(self)\n \n-        # cache bouding rect and geometry\n+        # cache bounding rect and geometry\n         self._boundingRectCache = self._previousGeometry = None\n         self._painterPathCache = None\n-        \n-        ## done by GraphicsItem init\n-        #GraphicsScene.registerObject(self)  ## workaround for pyqt bug in graphicsscene.items()\n+        self.geometryChanged.connect(self._resetCachedProperties)\n+\n+        # done by GraphicsItem init\n+        # GraphicsScene.registerObject(self)  # workaround for pyqt bug in GraphicsScene.items()\n \n     # Removed due to https://bugreports.qt-project.org/browse/PYSIDE-86\n-    #def itemChange(self, change, value):\n-        ## BEWARE: Calling QGraphicsWidget.itemChange can lead to crashing!\n-        ##ret = QtWidgets.QGraphicsWidget.itemChange(self, change, value)  ## segv occurs here\n-        ## The default behavior is just to return the value argument, so we'll do that\n-        ## without calling the original method.\n-        #ret = value\n-        #if change in [self.ItemParentHasChanged, self.ItemSceneHasChanged]:\n-            #self._updateView()\n-        #return ret\n+    # def itemChange(self, change, value):\n+    #     # BEWARE: Calling QGraphicsWidget.itemChange can lead to crashing!\n+    #     # ret = QtWidgets.QGraphicsWidget.itemChange(self, change, value)  # segv occurs here\n+    #     # The default behavior is just to return the value argument, so we'll do that\n+    #     # without calling the original method.\n+    #     ret = value\n+    #     if change in [self.ItemParentHasChanged, self.ItemSceneHasChanged]:\n+    #         self._updateView()\n+    #     return ret\n+\n+    def _resetCachedProperties(self):\n+        self._boundingRectCache = self._previousGeometry = None\n+        self._painterPathCache = None\n \n     def setFixedHeight(self, h):\n         self.setMaximumHeight(h)\n@@ -41,10 +48,10 @@\n     def setFixedWidth(self, h):\n         self.setMaximumWidth(h)\n         self.setMinimumWidth(h)\n-        \n+\n     def height(self):\n         return self.geometry().height()\n-    \n+\n     def width(self):\n         return self.geometry().width()\n \n@@ -52,19 +59,16 @@\n         geometry = self.geometry()\n         if geometry != self._previousGeometry:\n             self._painterPathCache = None\n-            \n             br = self.mapRectFromParent(geometry).normalized()\n             self._boundingRectCache = br\n             self._previousGeometry = geometry\n         else:\n             br = self._boundingRectCache\n-\n         return br\n \n-    def shape(self):  ## No idea why this is necessary, but rotated items do not receive clicks otherwise.\n+    def shape(self):\n         p = self._painterPathCache\n         if p is None:\n             self._painterPathCache = p = QtGui.QPainterPath()\n             p.addRect(self.boundingRect())\n-\n         return p\n", "issue": "Axes zoom area does not resize in 0.12.4\n### Short description\r\nWhen a plot is first generated with a given size, say `width ` and `height` in pixels, the entire axes areas on the left and bottom of the plot are zoomable. When the plot size is resized such that the plot is larger (e.g. the window is grabbed along an edge or corner and expanded), only the top `height` portion of the y-axes or the left `width` portion of the x-axis retain the ability to zoom the plot using the scroll wheel. The axes area outside (i.e. the lower portion of the y-axis or the right portion of the x-axis) are not zoomable. If hovering over the plot, not on an axes, there is no issue with zooming. Reverting to 0.12.3 fixes issue.\r\n\r\nI was able to reproduce this in both custom plots and many of the pyqtgraph.example scripts.\r\n\r\n### Tested environment(s)\r\n\r\n * PyQtGraph version: 0.12.4\r\n * Qt Python binding: PySide2 5.15.2.1 Qt 5.15.2\r\n * Python version: 3.7\r\n * NumPy version: 1.21.6\r\n * Operating system: Windows 10 Enterprise 21H2\r\n * Installation method: pip\r\n\n", "before_files": [{"content": "from ..Qt import QtGui, QtWidgets\nfrom .GraphicsItem import GraphicsItem\n\n__all__ = ['GraphicsWidget']\n\nclass GraphicsWidget(GraphicsItem, QtWidgets.QGraphicsWidget):\n    \n    _qtBaseClass = QtWidgets.QGraphicsWidget\n    def __init__(self, *args, **kargs):\n        \"\"\"\n        **Bases:** :class:`GraphicsItem <pyqtgraph.GraphicsItem>`, :class:`QtWidgets.QGraphicsWidget`\n        \n        Extends QGraphicsWidget with several helpful methods and workarounds for PyQt bugs. \n        Most of the extra functionality is inherited from :class:`GraphicsItem <pyqtgraph.GraphicsItem>`.\n        \"\"\"\n        QtWidgets.QGraphicsWidget.__init__(self, *args, **kargs)\n        GraphicsItem.__init__(self)\n\n        # cache bouding rect and geometry\n        self._boundingRectCache = self._previousGeometry = None\n        self._painterPathCache = None\n        \n        ## done by GraphicsItem init\n        #GraphicsScene.registerObject(self)  ## workaround for pyqt bug in graphicsscene.items()\n\n    # Removed due to https://bugreports.qt-project.org/browse/PYSIDE-86\n    #def itemChange(self, change, value):\n        ## BEWARE: Calling QGraphicsWidget.itemChange can lead to crashing!\n        ##ret = QtWidgets.QGraphicsWidget.itemChange(self, change, value)  ## segv occurs here\n        ## The default behavior is just to return the value argument, so we'll do that\n        ## without calling the original method.\n        #ret = value\n        #if change in [self.ItemParentHasChanged, self.ItemSceneHasChanged]:\n            #self._updateView()\n        #return ret\n\n    def setFixedHeight(self, h):\n        self.setMaximumHeight(h)\n        self.setMinimumHeight(h)\n\n    def setFixedWidth(self, h):\n        self.setMaximumWidth(h)\n        self.setMinimumWidth(h)\n        \n    def height(self):\n        return self.geometry().height()\n    \n    def width(self):\n        return self.geometry().width()\n\n    def boundingRect(self):\n        geometry = self.geometry()\n        if geometry != self._previousGeometry:\n            self._painterPathCache = None\n            \n            br = self.mapRectFromParent(geometry).normalized()\n            self._boundingRectCache = br\n            self._previousGeometry = geometry\n        else:\n            br = self._boundingRectCache\n\n        return br\n\n    def shape(self):  ## No idea why this is necessary, but rotated items do not receive clicks otherwise.\n        p = self._painterPathCache\n        if p is None:\n            self._painterPathCache = p = QtGui.QPainterPath()\n            p.addRect(self.boundingRect())\n\n        return p\n", "path": "pyqtgraph/graphicsItems/GraphicsWidget.py"}], "after_files": [{"content": "from ..Qt import QtGui, QtWidgets\nfrom .GraphicsItem import GraphicsItem\n\n__all__ = ['GraphicsWidget']\n\n\nclass GraphicsWidget(GraphicsItem, QtWidgets.QGraphicsWidget):\n    \n    _qtBaseClass = QtWidgets.QGraphicsWidget\n\n    def __init__(self, *args, **kwargs):\n        \"\"\"\n        **Bases:** :class:`GraphicsItem <pyqtgraph.GraphicsItem>`, :class:`QtWidgets.QGraphicsWidget`\n        \n        Extends QGraphicsWidget with several helpful methods and workarounds for PyQt bugs. \n        Most of the extra functionality is inherited from :class:`GraphicsItem <pyqtgraph.GraphicsItem>`.\n        \"\"\"\n        QtWidgets.QGraphicsWidget.__init__(self, *args, **kwargs)\n        GraphicsItem.__init__(self)\n\n        # cache bounding rect and geometry\n        self._boundingRectCache = self._previousGeometry = None\n        self._painterPathCache = None\n        self.geometryChanged.connect(self._resetCachedProperties)\n\n        # done by GraphicsItem init\n        # GraphicsScene.registerObject(self)  # workaround for pyqt bug in GraphicsScene.items()\n\n    # Removed due to https://bugreports.qt-project.org/browse/PYSIDE-86\n    # def itemChange(self, change, value):\n    #     # BEWARE: Calling QGraphicsWidget.itemChange can lead to crashing!\n    #     # ret = QtWidgets.QGraphicsWidget.itemChange(self, change, value)  # segv occurs here\n    #     # The default behavior is just to return the value argument, so we'll do that\n    #     # without calling the original method.\n    #     ret = value\n    #     if change in [self.ItemParentHasChanged, self.ItemSceneHasChanged]:\n    #         self._updateView()\n    #     return ret\n\n    def _resetCachedProperties(self):\n        self._boundingRectCache = self._previousGeometry = None\n        self._painterPathCache = None\n\n    def setFixedHeight(self, h):\n        self.setMaximumHeight(h)\n        self.setMinimumHeight(h)\n\n    def setFixedWidth(self, h):\n        self.setMaximumWidth(h)\n        self.setMinimumWidth(h)\n\n    def height(self):\n        return self.geometry().height()\n\n    def width(self):\n        return self.geometry().width()\n\n    def boundingRect(self):\n        geometry = self.geometry()\n        if geometry != self._previousGeometry:\n            self._painterPathCache = None\n            br = self.mapRectFromParent(geometry).normalized()\n            self._boundingRectCache = br\n            self._previousGeometry = geometry\n        else:\n            br = self._boundingRectCache\n        return br\n\n    def shape(self):\n        p = self._painterPathCache\n        if p is None:\n            self._painterPathCache = p = QtGui.QPainterPath()\n            p.addRect(self.boundingRect())\n        return p\n", "path": "pyqtgraph/graphicsItems/GraphicsWidget.py"}]}