MCPcopy
hub / github.com/PyQt5/PyQt / GetContentAreaRect

Method GetContentAreaRect

QLabel/Lib/NinePatch.py:123–127  ·  view source on GitHub ↗
(self, width, height)

Source from the content-addressed store, hash-verified

121
122 @classmethod
123 def GetContentAreaRect(self, width, height):
124 # print("GetContentAreaRect : width:%d height:%d" % (width, height))
125 return (QRect(self.ContentArea.x(), self.ContentArea.y(),
126 (width - (self.Image.width() - 2 - self.ContentArea.width())),
127 (height - (self.Image.height() - 2 - self.ContentArea.height()))))
128
129 def DrawScaledPart(self, oldRect, newRect, painter):
130 if (newRect.width() and newRect.height()):

Callers

nothing calls this directly

Calls 4

yMethod · 0.80
xMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected