Skip to content

Commit

Permalink
Merge pull request #481 from frmdstryr/qpoint-int
Browse files Browse the repository at this point in the history
Ensure some more QPoint values are ints
  • Loading branch information
MatthieuDartiailh committed Mar 6, 2022
2 parents 7b44c4a + 3b30365 commit 48e9f9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions enaml/qt/docking/q_dock_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _computePressPos(container, coeff):
test_x = int(coeff * container.width())
new_x = max(margins.left() + 5, min(test_x, max_x))
title_bar = container.dockItem().titleBarWidget()
title_height = title_bar.height() / 2
title_height = title_bar.height() // 2
mid_title = title_bar.mapTo(container, QPoint(0, title_height))
return QPoint(new_x, mid_title.y())

Expand Down Expand Up @@ -561,7 +561,7 @@ def untab(self, pos):
self.float()
self.raiseFrame()
title_bar = self.dockItem().titleBarWidget()
title_pos = QPoint(title_bar.width() / 2, title_bar.height() / 2)
title_pos = QPoint(title_bar.width() // 2, title_bar.height() // 2)
margins = self.layout().contentsMargins()
offset = QPoint(margins.left(), margins.top())
state.press_pos = title_bar.mapTo(self, title_pos) + offset
Expand Down
2 changes: 1 addition & 1 deletion releasenotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Dates are written as DD/MM/YYYY
- fixes a bug in code generation for Pythoon 3.10 PR #476
- fixes several bugs in corner cases of the Qt dock area PR #469
- add python fstring scintilla tokens PR #470
- address PyQt deprecation of accepting float values for pixel dimensions PR #471
- address PyQt deprecation of accepting float values for pixel dimensions PR #471 and #481

0.14.0 - 21/11/2021
-------------------
Expand Down

0 comments on commit 48e9f9f

Please sign in to comment.