From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.jFK6OqqKW5bkmQ4H/i1UAQ.user.gioia.aioe.org!not-for-mail From: "Luke A. Guest" Newsgroups: comp.lang.ada Subject: Re: Different screen parameters Date: Tue, 23 Jun 2020 10:14:58 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <5ef1a1cc$0$1475$e4fe514c@news.kpn.nl> NNTP-Posting-Host: jFK6OqqKW5bkmQ4H/i1UAQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 Content-Language: en-GB X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:59181 List-Id: On 23/06/2020 07:31, ldries46 wrote: On KDE, you end up having to scale up the second window to the same resolution although it doesn't stay and I've had to use a script to reset the displays. xrandr --output DisplayPort-0 --auto --scale 1x1 --primary --output DisplayPort-1 --auto --scale 4x4 --right-of DisplayPort-0 xrandr --output DisplayPort-0 --auto --scale 1x1 --primary --output DisplayPort-1 --auto --scale 2x2 --right-of DisplayPort-0 The first scales up the screen and the second scales it back down to the correct size, this is so the KDE pager shows up correctly. You'll then need to change font sizes. You'll need to set up env vars as well for QT and GTK apps so they scale properly, even then hard coded apps won't scale. QT_AUTO_SCREEN_SCALE_FACTOR=0 GDK_SCALE=2 This whole HiDPI stuff on Linux is a mess. > I am using a high definition screen 4K (3840 * 2160 pixels) and two > computers one with a graphic card which can handle this resolution and > an older one which can handle up to 1920 * 1080. (the first on Windows > 10 the second on Linux Ubuntu). I want both computers capable of running > my programs even if I define a the window on 2000 * 1200 for a Gtk > project. On the computer that can handle the resolution the there is of > course no problem. On the other the screen is window is to big for the > resolution and is shown only partly (of course). > > My question is: > Is there an Ada library that is able to somehow read theĀ  maximum sizes > of the screen in pixels so I can firstly maximize my values for size > definition in Gtk. > > I already tried: > Maximize(Mainwindow); > Get_Size(MainWindow, Height, Width); > > The result was 200 * 200