Forum: Ruby-Gnome 2 How to find out the resolution of the monitor before starting a Ruby-Gnome widget?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4828d528e2e46f7c8160c336eb332836?d=identicon&s=25 Robert Heiler (shevegen)
on 2015-03-27 21:53
Hi,

I wish to set the start-size of my widget to 80% of width and height.

But for this, I need to know the resolution of the computer.

Is this doable?
4828d528e2e46f7c8160c336eb332836?d=identicon&s=25 Robert Heiler (shevegen)
on 2015-03-27 21:55
Found it in the API docu:


x = Gdk::Screen.default
x.width
x.height
This topic is locked and can not be replied to.