Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate screen size calculations #8

Closed
otsaloma opened this issue Oct 29, 2016 · 1 comment
Closed

Migrate screen size calculations #8

otsaloma opened this issue Oct 29, 2016 · 1 comment

Comments

@otsaloma
Copy link
Owner

nfoview/window.py:274: DeprecationWarning: Gdk.Screen.width is deprecated
  size[0] = min(size[0], int(0.8 * Gdk.Screen.width()))
nfoview/window.py:275: DeprecationWarning: Gdk.Screen.height is deprecated
  size[1] = min(size[1], int(0.8 * Gdk.Screen.height()))
@otsaloma
Copy link
Owner Author

otsaloma commented Nov 5, 2017

Seems to require a dependency bump to Gtk/Gdk 3.22. Closing the issue, this is likely best left to be done as part of an eventual GTK+4 migration along whatever other stuff needed.

display = Gdk.Display.get_default()
monitor = display.get_primary_monitor()
geometry = monitor.get_geometry()
scale_factor = monitor.get_scale_factor()
width = scale_factor * geometry.width
height = scale_factor * geometry.height

@otsaloma otsaloma closed this as completed Nov 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant