Skip to content

Commit

Permalink
Merge pull request #257 from jenshnielsen/fix_python_310_init
Browse files Browse the repository at this point in the history
fix call to qt api with int
  • Loading branch information
jenshnielsen committed Jan 11, 2022
2 parents c5d88aa + 6fc453d commit 4b1fb64
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plottr/apps/inspectr.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def __init__(self, parent: Optional[QtWidgets.QWidget] = None,
self.addAction(self.crossAction)

# sizing
scaledSize = 640 * rint(self.logicalDpiX() / 96.0)
scaledSize = int(640 * rint(self.logicalDpiX() / 96.0))
self.resize(scaledSize, scaledSize)

### Thread workers
Expand Down
1 change: 0 additions & 1 deletion plottr/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Common GUI widgets that are re-used across plottr.
"""
from numpy import rint
from typing import Union, List, Tuple, Optional, Type, Sequence, Dict, Any, Type

from .tools import dictToTreeWidgetItems, dpiScalingFactor
Expand Down
4 changes: 2 additions & 2 deletions plottr/node/dim_reducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def addDimension(self, name: str) -> None:
for o in opts:
combo.addItem(o)

scaling = np.rint(self.logicalDpiX() / 96.0)
scaling = int(np.rint(self.logicalDpiX() / 96.0))
combo.setMinimumSize(50*scaling, 22*scaling)
combo.setMaximumHeight(22 * scaling)
self.setItemWidget(item, 1, combo)
Expand Down Expand Up @@ -309,7 +309,7 @@ def setRole(self, dim: str, role: Optional[str] = None, **kw: Any) -> None:
w.valueChanged.connect(
lambda x: self.elementSelectionSliderChange(dim))

scaling = np.rint(self.logicalDpiX() / 96.0)
scaling = int(np.rint(self.logicalDpiX() / 96.0))
width = 150 + 50*(scaling - 1)
height = 22*scaling
w.setMinimumSize(width, height)
Expand Down

0 comments on commit 4b1fb64

Please sign in to comment.