Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Heuristics are bug ridden by definition. If they didn't have bugs, then they'd be algorithms.


devel / comp.lang.tcl / Re: tk scaling

SubjectAuthor
* tk scalingMark
`* Re: tk scalingHarald Oehlmann
 `* Re: tk scalingMark
  `* Re: tk scalingnemethi
   `* Re: tk scalingMark
    +- Re: tk scalingnemethi
    `* Re: tk scalingRich
     `* Re: tk scalingMark
      +- Re: tk scalingsaitology9
      `* Re: tk scalingnemethi
       `* Re: tk scalingMark
        `* Re: tk scalingMark
         `* Re: tk scalingHarald Oehlmann
          `* Re: tk scalingMark
           +* Re: tk scalingMark
           |`- Re: tk scalingHarald Oehlmann
           `- Re: tk scalingnemethi

1
tk scaling

<b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22191&group=comp.lang.tcl#22191

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ad4:59c7:0:b0:625:bb88:31d9 with SMTP id el7-20020ad459c7000000b00625bb8831d9mr570165qvb.10.1685950845242;
Mon, 05 Jun 2023 00:40:45 -0700 (PDT)
X-Received: by 2002:ad4:590e:0:b0:626:1b7d:aa8b with SMTP id
ez14-20020ad4590e000000b006261b7daa8bmr574022qvb.5.1685950844988; Mon, 05 Jun
2023 00:40:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Mon, 5 Jun 2023 00:40:44 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=31.125.17.241; posting-account=C1gZvwoAAAAojE_ZgHdwZjGSuZg6QpNd
NNTP-Posting-Host: 31.125.17.241
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
Subject: tk scaling
From: m.n.summerfield@googlemail.com (Mark)
Injection-Date: Mon, 05 Jun 2023 07:40:45 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1279
 by: Mark - Mon, 5 Jun 2023 07:40 UTC

I recently discovered tk scaling which I find very useful.
However, the scaling factor I need varies from computer to computer.
It is possible to set a global scaling factor for a computer (e.g., by storing a value in .Xdefaults or something like that), so that I can just set it once per computer and then rely on that?

Re: tk scaling

<u5k4bt$9nbl$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22192&group=comp.lang.tcl#22192

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wortkarg3@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: tk scaling
Date: Mon, 5 Jun 2023 09:54:36 +0200
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <u5k4bt$9nbl$1@dont-email.me>
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 5 Jun 2023 07:54:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="79ccf4e6a61653b82341c53e948a20aa";
logging-data="318837"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Soovbc3ELp3LQ3d2PFaRa"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.2
Cancel-Lock: sha1:kmiqkkYNfDd1WjUUB+4Uyu/eEc4=
In-Reply-To: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
Content-Language: en-GB
 by: Harald Oehlmann - Mon, 5 Jun 2023 07:54 UTC

Am 05.06.2023 um 09:40 schrieb Mark:
> I recently discovered tk scaling which I find very useful.
> However, the scaling factor I need varies from computer to computer.
> It is possible to set a global scaling factor for a computer (e.g., by storing a value in .Xdefaults or something like that), so that I can just set it once per computer and then rely on that?

Mark,
you may look to the work of Csaba (and maybe Brian) about initializing
tk scaling to a senseful value.

You will find this code:
- in Tk 8.7 (not released, trunk of fossil)
- in scrollutil or tablelist packages

Take care,
Harald

Re: tk scaling

<04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22193&group=comp.lang.tcl#22193

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:1929:b0:75d:553b:9fb9 with SMTP id bj41-20020a05620a192900b0075d553b9fb9mr1101743qkb.3.1685952003718;
Mon, 05 Jun 2023 01:00:03 -0700 (PDT)
X-Received: by 2002:a05:622a:387:b0:3f8:20a:1c2f with SMTP id
j7-20020a05622a038700b003f8020a1c2fmr1605663qtx.12.1685952003548; Mon, 05 Jun
2023 01:00:03 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Mon, 5 Jun 2023 01:00:03 -0700 (PDT)
In-Reply-To: <u5k4bt$9nbl$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=31.125.17.241; posting-account=C1gZvwoAAAAojE_ZgHdwZjGSuZg6QpNd
NNTP-Posting-Host: 31.125.17.241
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com> <u5k4bt$9nbl$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
Subject: Re: tk scaling
From: m.n.summerfield@googlemail.com (Mark)
Injection-Date: Mon, 05 Jun 2023 08:00:03 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2130
 by: Mark - Mon, 5 Jun 2023 08:00 UTC

On Monday, June 5, 2023 at 8:54:41 AM UTC+1, Harald Oehlmann wrote:
> Am 05.06.2023 um 09:40 schrieb Mark:
> > I recently discovered tk scaling which I find very useful.
> > However, the scaling factor I need varies from computer to computer.
> > It is possible to set a global scaling factor for a computer (e.g., by storing a value in .Xdefaults or something like that), so that I can just set it once per computer and then rely on that?
> Mark,
> you may look to the work of Csaba (and maybe Brian) about initializing
> tk scaling to a senseful value.
>
> You will find this code:
> - in Tk 8.7 (not released, trunk of fossil)
> - in scrollutil or tablelist packages
>
> Take care,
> Harald

That won't help with other people's applications. For example for tkcon I have to manually edit the tkcon file to add tk scaling _factor_. That's why I was hoping for the ability to set a system-wide setting.

Re: tk scaling

<u5kgem$ufh2$1@tota-refugium.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22195&group=comp.lang.tcl#22195

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.tota-refugium.de!.POSTED!not-for-mail
From: csaba.nemethi@t-online.de (nemethi)
Newsgroups: comp.lang.tcl
Subject: Re: tk scaling
Date: Mon, 5 Jun 2023 13:20:54 +0200
Message-ID: <u5kgem$ufh2$1@tota-refugium.de>
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
<u5k4bt$9nbl$1@dont-email.me>
<04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 5 Jun 2023 11:20:54 -0000 (UTC)
Injection-Info: tota-refugium.de;
logging-data="998946"; mail-complaints-to="abuse@news.tota-refugium.de"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:QvHihoQqQLGsvofZQO0QHQ6SiMs=
In-Reply-To: <04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
Content-Language: en-US
X-User-ID: eJwVysEBwCAIA8CVREwq6whk/xGsv3scnMb8FsEFQQcOi4PRamMVI/oxAsO5SwXYv1M5ZTkvH8MRRg==
 by: nemethi - Mon, 5 Jun 2023 11:20 UTC

Am 05.06.23 um 10:00 schrieb Mark:
> On Monday, June 5, 2023 at 8:54:41 AM UTC+1, Harald Oehlmann wrote:
>> Am 05.06.2023 um 09:40 schrieb Mark:
>>> I recently discovered tk scaling which I find very useful.
>>> However, the scaling factor I need varies from computer to computer.
>>> It is possible to set a global scaling factor for a computer (e.g., by storing a value in .Xdefaults or something like that), so that I can just set it once per computer and then rely on that?
>> Mark,
>> you may look to the work of Csaba (and maybe Brian) about initializing
>> tk scaling to a senseful value.
>>
>> You will find this code:
>> - in Tk 8.7 (not released, trunk of fossil)
>> - in scrollutil or tablelist packages
>>
>> Take care,
>> Harald
>
> That won't help with other people's applications. For example for tkcon I have to manually edit the tkcon file to add tk scaling _factor_. That's why I was hoping for the ability to set a system-wide setting.

Why do you want to change the scaling factor "for tkcon"? Once set, the
new scaling factor will apply to everything in your GUI, not only to tkcon.

The Tk engine sets the scaling factor at start time according to the
display's physical size (in mm) and its size in pixels. If you see the
need to change the scaling factor then this is probably because you want
to have bigger fonts and/or larger widgets. If this is the case then
you probably have the same problem not only with Tk scripts, but also
with most other applications, too. This is quite normal if you have a
relatively small display with high pixel density.

The recommended way to solve this (Tk-independent) issue is to increase
the display's DPI scaling percentage via the system settings. On
Windows 10+ this is quite easy, and most modern X11 desktops provide
similar capabilities, too. Once you have done this, your Tk scripts
will start with a correspondingly adapted scaling factor. On Windows
this has always been the case, and on X11 it will be the case too in Tk
8.7. For applications running an earlier Tk versions it is sufficient
to invoke "package require scrollutil" or "package require tablelist".

--
Csaba Nemethi https://www.nemethi.de mailto:csaba.nemethi@t-online.de

Re: tk scaling

<90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22196&group=comp.lang.tcl#22196

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:29d2:b0:74e:2894:7eb2 with SMTP id s18-20020a05620a29d200b0074e28947eb2mr4086221qkp.12.1685964638088;
Mon, 05 Jun 2023 04:30:38 -0700 (PDT)
X-Received: by 2002:a05:622a:100c:b0:3f6:abf3:d716 with SMTP id
d12-20020a05622a100c00b003f6abf3d716mr1240237qte.2.1685964637847; Mon, 05 Jun
2023 04:30:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Mon, 5 Jun 2023 04:30:37 -0700 (PDT)
In-Reply-To: <u5kgem$ufh2$1@tota-refugium.de>
Injection-Info: google-groups.googlegroups.com; posting-host=31.125.17.241; posting-account=C1gZvwoAAAAojE_ZgHdwZjGSuZg6QpNd
NNTP-Posting-Host: 31.125.17.241
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
<u5k4bt$9nbl$1@dont-email.me> <04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
<u5kgem$ufh2$1@tota-refugium.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>
Subject: Re: tk scaling
From: m.n.summerfield@googlemail.com (Mark)
Injection-Date: Mon, 05 Jun 2023 11:30:38 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Mark - Mon, 5 Jun 2023 11:30 UTC

On Monday, June 5, 2023 at 12:20:59 PM UTC+1, nemethi wrote:
> Am 05.06.23 um 10:00 schrieb Mark:
> > On Monday, June 5, 2023 at 8:54:41 AM UTC+1, Harald Oehlmann wrote:
> >> Am 05.06.2023 um 09:40 schrieb Mark:
> >>> I recently discovered tk scaling which I find very useful.
> >>> However, the scaling factor I need varies from computer to computer.
> >>> It is possible to set a global scaling factor for a computer (e.g., by storing a value in .Xdefaults or something like that), so that I can just set it once per computer and then rely on that?
> >> Mark,
> >> you may look to the work of Csaba (and maybe Brian) about initializing
> >> tk scaling to a senseful value.
> >>
> >> You will find this code:
> >> - in Tk 8.7 (not released, trunk of fossil)
> >> - in scrollutil or tablelist packages
> >>
> >> Take care,
> >> Harald
> >
> > That won't help with other people's applications. For example for tkcon I have to manually edit the tkcon file to add tk scaling _factor_. That's why I was hoping for the ability to set a system-wide setting.
> Why do you want to change the scaling factor "for tkcon"? Once set, the
> new scaling factor will apply to everything in your GUI, not only to tkcon.
>
> The Tk engine sets the scaling factor at start time according to the
> display's physical size (in mm) and its size in pixels. If you see the
> need to change the scaling factor then this is probably because you want
> to have bigger fonts and/or larger widgets. If this is the case then
> you probably have the same problem not only with Tk scripts, but also
> with most other applications, too. This is quite normal if you have a
> relatively small display with high pixel density.
>
> The recommended way to solve this (Tk-independent) issue is to increase
> the display's DPI scaling percentage via the system settings. On
> Windows 10+ this is quite easy, and most modern X11 desktops provide
> similar capabilities, too. Once you have done this, your Tk scripts
> will start with a correspondingly adapted scaling factor. On Windows
> this has always been the case, and on X11 it will be the case too in Tk
> 8.7. For applications running an earlier Tk versions it is sufficient
> to invoke "package require scrollutil" or "package require tablelist".
>
> --
> Csaba Nemethi https://www.nemethi.de mailto:csaba....@t-online.de

You're right that I need tkcon to show bigger fonts. Weirdly, after editing tkcon to use `tk scaling 1.5` -- and after which it was big enough -- when I then deleted the tk scaling command I'd added it somehow remembered and still show the right size. Presumably it stores this somewhere, but where I don't know.

But that doesn't help with my own tk apps. I tried adding `package require scrollutil` to a simple `hello gui` app and it had no effect; but `tk scaling 1.5` works. I'm using 8.6 on Debian on one machine and on Ubuntu on another machine.

Nor do I want to fiddle with my global font settings which work for everything else since if I change them for Tk that'll mess them up for all the other widget toolkits that other apps use.

Re: tk scaling

<u5kk1l$uhjd$1@tota-refugium.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22197&group=comp.lang.tcl#22197

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.tota-refugium.de!.POSTED!not-for-mail
From: csaba.nemethi@t-online.de (nemethi)
Newsgroups: comp.lang.tcl
Subject: Re: tk scaling
Date: Mon, 5 Jun 2023 14:22:13 +0200
Message-ID: <u5kk1l$uhjd$1@tota-refugium.de>
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
<u5k4bt$9nbl$1@dont-email.me>
<04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
<u5kgem$ufh2$1@tota-refugium.de>
<90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 5 Jun 2023 12:22:13 -0000 (UTC)
Injection-Info: tota-refugium.de;
logging-data="1001069"; mail-complaints-to="abuse@news.tota-refugium.de"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:iZBY57I57E/bD3N+4YvI3LU3ptQ=
X-User-ID: eJwNwoERwCAIBLCVUB6QcUD5/UdoLzH15Tfg5jD+FPYm9iSadYxAUaQn5aH0CGIhr+ZUsX1/HI4RMg==
In-Reply-To: <90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>
Content-Language: en-US
 by: nemethi - Mon, 5 Jun 2023 12:22 UTC

Am 05.06.23 um 13:30 schrieb Mark:
> On Monday, June 5, 2023 at 12:20:59 PM UTC+1, nemethi wrote:
>> Am 05.06.23 um 10:00 schrieb Mark:
>>> On Monday, June 5, 2023 at 8:54:41 AM UTC+1, Harald Oehlmann wrote:
>>>> Am 05.06.2023 um 09:40 schrieb Mark:
>>>>> I recently discovered tk scaling which I find very useful.
>>>>> However, the scaling factor I need varies from computer to computer.
>>>>> It is possible to set a global scaling factor for a computer (e.g., by storing a value in .Xdefaults or something like that), so that I can just set it once per computer and then rely on that?
>>>> Mark,
>>>> you may look to the work of Csaba (and maybe Brian) about initializing
>>>> tk scaling to a senseful value.
>>>>
>>>> You will find this code:
>>>> - in Tk 8.7 (not released, trunk of fossil)
>>>> - in scrollutil or tablelist packages
>>>>
>>>> Take care,
>>>> Harald
>>>
>>> That won't help with other people's applications. For example for tkcon I have to manually edit the tkcon file to add tk scaling _factor_. That's why I was hoping for the ability to set a system-wide setting.
>> Why do you want to change the scaling factor "for tkcon"? Once set, the
>> new scaling factor will apply to everything in your GUI, not only to tkcon.
>>
>> The Tk engine sets the scaling factor at start time according to the
>> display's physical size (in mm) and its size in pixels. If you see the
>> need to change the scaling factor then this is probably because you want
>> to have bigger fonts and/or larger widgets. If this is the case then
>> you probably have the same problem not only with Tk scripts, but also
>> with most other applications, too. This is quite normal if you have a
>> relatively small display with high pixel density.
>>
>> The recommended way to solve this (Tk-independent) issue is to increase
>> the display's DPI scaling percentage via the system settings. On
>> Windows 10+ this is quite easy, and most modern X11 desktops provide
>> similar capabilities, too. Once you have done this, your Tk scripts
>> will start with a correspondingly adapted scaling factor. On Windows
>> this has always been the case, and on X11 it will be the case too in Tk
>> 8.7. For applications running an earlier Tk versions it is sufficient
>> to invoke "package require scrollutil" or "package require tablelist".
>>
>> --
>> Csaba Nemethi https://www.nemethi.de mailto:csaba....@t-online.de
>
> You're right that I need tkcon to show bigger fonts. Weirdly, after editing tkcon to use `tk scaling 1.5` -- and after which it was big enough -- when I then deleted the tk scaling command I'd added it somehow remembered and still show the right size. Presumably it stores this somewhere, but where I don't know.
>
> But that doesn't help with my own tk apps. I tried adding `package require scrollutil` to a simple `hello gui` app and it had no effect; but `tk scaling 1.5` works. I'm using 8.6 on Debian on one machine and on Ubuntu on another machine.
>
> Nor do I want to fiddle with my global font settings which work for everything else since if I change them for Tk that'll mess them up for all the other widget toolkits that other apps use.

Since I have very little working experience with tkcon, I can't tell you
why it remembers the tk scaling.

What desktops are you running on Debian and Ubuntu? Have you set the
DPI scaling level via the system settings *before* starting your Tk script?

--
Csaba Nemethi https://www.nemethi.de mailto:csaba.nemethi@t-online.de

Re: tk scaling

<u5kmgh$bgsf$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22198&group=comp.lang.tcl#22198

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: tk scaling
Date: Mon, 5 Jun 2023 13:04:17 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <u5kmgh$bgsf$1@dont-email.me>
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com> <u5k4bt$9nbl$1@dont-email.me> <04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com> <u5kgem$ufh2$1@tota-refugium.de> <90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>
Injection-Date: Mon, 5 Jun 2023 13:04:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="612f433482ca2437932c1d2595c7d0e3";
logging-data="377743"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX181UBSlLIRwZkSyZF8rgutt"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.19 (x86_64))
Cancel-Lock: sha1:+12ij0vUhprG2Fv1frQXK3mN/DI=
 by: Rich - Mon, 5 Jun 2023 13:04 UTC

Mark <m.n.summerfield@googlemail.com> wrote:
> But that doesn't help with my own tk apps. I tried adding `package
> require scrollutil` to a simple `hello gui` app and it had no effect;
> but `tk scaling 1.5` works. I'm using 8.6 on Debian on one machine
> and on Ubuntu on another machine.
>
> Nor do I want to fiddle with my global font settings which work for
> everything else since if I change them for Tk that'll mess them up
> for all the other widget toolkits that other apps use.

A very simple loop at the start of your Tk apps can change the font
size used for all the default Tk fonts (any custom fonts you later
create would be at whatever size you create them):

This one keeps the same size value, but switches from 'pixels' to
'points':

foreach font [font names] {
font configure $font [expr {abs([font configure $font -size])}]
}

This variant just sets a default size value (use negative values to set
as "pixels" and positive values to set as "points"):

foreachfont [font names] {
font configure $font -size 16
}

Usually when someone wants to adjust 'tk scaling' the real underlying
reason is: "the default fonts are too small". If this is the case
here, then just adjust the defaults. Obvously in the above you would
need to adjust the "value" to suit your needs.

Re: tk scaling

<888630c1-34a0-41fb-9979-17afdd09f969n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22202&group=comp.lang.tcl#22202

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ac8:5b51:0:b0:3f7:736c:9013 with SMTP id n17-20020ac85b51000000b003f7736c9013mr1514835qtw.6.1685991744175;
Mon, 05 Jun 2023 12:02:24 -0700 (PDT)
X-Received: by 2002:a05:620a:4551:b0:75e:c3cf:faf2 with SMTP id
u17-20020a05620a455100b0075ec3cffaf2mr193480qkp.8.1685991743931; Mon, 05 Jun
2023 12:02:23 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Mon, 5 Jun 2023 12:02:23 -0700 (PDT)
In-Reply-To: <u5kmgh$bgsf$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=31.125.17.241; posting-account=C1gZvwoAAAAojE_ZgHdwZjGSuZg6QpNd
NNTP-Posting-Host: 31.125.17.241
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
<u5k4bt$9nbl$1@dont-email.me> <04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
<u5kgem$ufh2$1@tota-refugium.de> <90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>
<u5kmgh$bgsf$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <888630c1-34a0-41fb-9979-17afdd09f969n@googlegroups.com>
Subject: Re: tk scaling
From: m.n.summerfield@googlemail.com (Mark)
Injection-Date: Mon, 05 Jun 2023 19:02:24 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2430
 by: Mark - Mon, 5 Jun 2023 19:02 UTC

I'm using Debian with Xfce where tkcon seems to remember the scale (at least within one session; I'll find out tomorrow if it remembers across sessions). And I'm also using Ubuntu with Xfce on another computer where I have to manually add tk scaling to tkcon.

I know how to adjust font sizes and how to use tk scaling _inside_ an app. But the problem is that the scaling needed is different per computer (due to different screen sizes and resolutions).

For Gtk and KDE apps this can be solved with global settings. And so too for Xfce. But this only seems to work for Gtk- and Qt-based apps. For FLTK-based apps in my .bashrc I have: `export FLTK_SCALING_FACTOR=1.4` on one computer; but don't need it at all on the other. But at least it can be done and applies globally to all FLTK apps. So I'm looking for a Tk equivalent. For example, in my .Xdefaults I have `*insertofftime: 0` which stops cursor blink in Tk's non-themed widgets. So really, I'm wondering if there's a setting I could use in .Xdefaults to set the default tk scaling per computer.

Re: tk scaling

<u5ld3l$dvno$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22203&group=comp.lang.tcl#22203

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: saitology9@gmail.com (saitology9)
Newsgroups: comp.lang.tcl
Subject: Re: tk scaling
Date: Mon, 5 Jun 2023 15:29:55 -0400
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <u5ld3l$dvno$1@dont-email.me>
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
<u5k4bt$9nbl$1@dont-email.me>
<04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
<u5kgem$ufh2$1@tota-refugium.de>
<90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>
<u5kmgh$bgsf$1@dont-email.me>
<888630c1-34a0-41fb-9979-17afdd09f969n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 5 Jun 2023 19:29:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d2da4707d6764f2159958dc72b85dc6e";
logging-data="458488"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QLRJxi4z9mLjbP3HJkW3w"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:mN94r0zoVKOzgAHB7XVcTa3ViKM=
In-Reply-To: <888630c1-34a0-41fb-9979-17afdd09f969n@googlegroups.com>
Content-Language: en-US
 by: saitology9 - Mon, 5 Jun 2023 19:29 UTC

On 6/5/2023 3:02 PM, Mark wrote:
> I'm using Debian with Xfce where tkcon seems to remember the scale (at least within one session; I'll find out tomorrow if it remembers across sessions). And I'm also using Ubuntu with Xfce on another computer where I have to manually add tk scaling to tkcon.
>
> I know how to adjust font sizes and how to use tk scaling _inside_ an app. But the problem is that the scaling needed is different per computer (due to different screen sizes and resolutions).
>
> For Gtk and KDE apps this can be solved with global settings. And so too for Xfce. But this only seems to work for Gtk- and Qt-based apps. For FLTK-based apps in my .bashrc I have: `export FLTK_SCALING_FACTOR=1.4` on one computer; but don't need it at all on the other. But at least it can be done and applies globally to all FLTK apps. So I'm looking for a Tk equivalent. For example, in my .Xdefaults I have `*insertofftime: 0` which stops cursor blink in Tk's non-themed widgets. So really, I'm wondering if there's a setting I could use in .Xdefaults to set the default tk scaling per computer.

I believe tkcon uses a configuration file whereby you can customize
certain aspects of your environment. Look for a file named "tkcon.cfg"
in your home directory or one of its sub-directories. On MS Windows,
this is located in user folders named like this: "C:/Users/username"

When I add a "tk scaling" to this file, it affects all the scripts that
you start from tkcon. So maybe this will do what you want.

Re: tk scaling

<u5ms39$vlc3$1@tota-refugium.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22207&group=comp.lang.tcl#22207

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.tota-refugium.de!.POSTED!not-for-mail
From: csaba.nemethi@t-online.de (nemethi)
Newsgroups: comp.lang.tcl
Subject: Re: tk scaling
Date: Tue, 6 Jun 2023 10:51:53 +0200
Message-ID: <u5ms39$vlc3$1@tota-refugium.de>
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
<u5k4bt$9nbl$1@dont-email.me>
<04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
<u5kgem$ufh2$1@tota-refugium.de>
<90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>
<u5kmgh$bgsf$1@dont-email.me>
<888630c1-34a0-41fb-9979-17afdd09f969n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 6 Jun 2023 08:51:53 -0000 (UTC)
Injection-Info: tota-refugium.de;
logging-data="1037699"; mail-complaints-to="abuse@news.tota-refugium.de"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:/SvPP8Slx8nDY9j4tm/ha2OGQBk=
X-User-ID: eJwFwQEBwCAMAzBLg64tyGE7+JfwhNBQO0UlHx/6GtEBVdapMcnRZwLTIVMLsPat7dbnpR8IwBAT
In-Reply-To: <888630c1-34a0-41fb-9979-17afdd09f969n@googlegroups.com>
Content-Language: en-US
 by: nemethi - Tue, 6 Jun 2023 08:51 UTC

Am 05.06.23 um 21:02 schrieb Mark:
> I'm using Debian with Xfce where tkcon seems to remember the scale (at least within one session; I'll find out tomorrow if it remembers across sessions). And I'm also using Ubuntu with Xfce on another computer where I have to manually add tk scaling to tkcon.
>
> I know how to adjust font sizes and how to use tk scaling _inside_ an app. But the problem is that the scaling needed is different per computer (due to different screen sizes and resolutions).
>
> For Gtk and KDE apps this can be solved with global settings. And so too for Xfce. But this only seems to work for Gtk- and Qt-based apps. For FLTK-based apps in my .bashrc I have: `export FLTK_SCALING_FACTOR=1.4` on one computer; but don't need it at all on the other. But at least it can be done and applies globally to all FLTK apps. So I'm looking for a Tk equivalent. For example, in my .Xdefaults I have `*insertofftime: 0` which stops cursor blink in Tk's non-themed widgets. So really, I'm wondering if there's a setting I could use in .Xdefaults to set the default tk scaling per computer.

So now we know that you are running Xfce on both computers, but you
haven't answered my second question, namely whether you have set the DPI
scaling level via the system settings. Apparently not. On Xfce this is
not as simple as on GNOME, KDE, or Cinnamon, but possible:

Method 1: In the 3rd tab of the Appearance dialog set the Custom DPI
setting to, say, 144. If you then start wish and perform "package
require scrollutil" then the [tk scaling] will automatically change from
1.333... to 2.0.

Method 1: In the Display dialog set the Scale to, say, "1.5x", and in
the last tab of the Appearance dialog select "2x" as the value of the
Window Scaling. If you then start wish and perform "package require
scrollutil" then the [tk scaling] will automatically change from
1.333... to 2.666...

It is assumed that you are using the most recent Scrollutil version 1.18.

It would be helpful if you could proceed as described above and report
back the results of your tests.

--
Csaba Nemethi https://www.nemethi.de mailto:csaba.nemethi@t-online.de

Re: tk scaling

<92c646d3-9274-408f-be3e-edf8cfe7519bn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22213&group=comp.lang.tcl#22213

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:6214:1907:b0:5ef:5726:ba25 with SMTP id er7-20020a056214190700b005ef5726ba25mr199121qvb.0.1686047764226;
Tue, 06 Jun 2023 03:36:04 -0700 (PDT)
X-Received: by 2002:a05:620a:4405:b0:75b:7eea:8157 with SMTP id
v5-20020a05620a440500b0075b7eea8157mr341638qkp.14.1686047763997; Tue, 06 Jun
2023 03:36:03 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Tue, 6 Jun 2023 03:36:03 -0700 (PDT)
In-Reply-To: <u5ms39$vlc3$1@tota-refugium.de>
Injection-Info: google-groups.googlegroups.com; posting-host=31.125.17.241; posting-account=C1gZvwoAAAAojE_ZgHdwZjGSuZg6QpNd
NNTP-Posting-Host: 31.125.17.241
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
<u5k4bt$9nbl$1@dont-email.me> <04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
<u5kgem$ufh2$1@tota-refugium.de> <90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>
<u5kmgh$bgsf$1@dont-email.me> <888630c1-34a0-41fb-9979-17afdd09f969n@googlegroups.com>
<u5ms39$vlc3$1@tota-refugium.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <92c646d3-9274-408f-be3e-edf8cfe7519bn@googlegroups.com>
Subject: Re: tk scaling
From: m.n.summerfield@googlemail.com (Mark)
Injection-Date: Tue, 06 Jun 2023 10:36:04 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Mark - Tue, 6 Jun 2023 10:36 UTC

On Tuesday, June 6, 2023 at 9:51:57 AM UTC+1, nemethi wrote:
> Am 05.06.23 um 21:02 schrieb Mark:
> > I'm using Debian with Xfce where tkcon seems to remember the scale (at least within one session; I'll find out tomorrow if it remembers across sessions). And I'm also using Ubuntu with Xfce on another computer where I have to manually add tk scaling to tkcon.
> >
> > I know how to adjust font sizes and how to use tk scaling _inside_ an app. But the problem is that the scaling needed is different per computer (due to different screen sizes and resolutions).
> >
> > For Gtk and KDE apps this can be solved with global settings. And so too for Xfce. But this only seems to work for Gtk- and Qt-based apps. For FLTK-based apps in my .bashrc I have: `export FLTK_SCALING_FACTOR=1.4` on one computer; but don't need it at all on the other. But at least it can be done and applies globally to all FLTK apps. So I'm looking for a Tk equivalent. For example, in my .Xdefaults I have `*insertofftime: 0` which stops cursor blink in Tk's non-themed widgets. So really, I'm wondering if there's a setting I could use in .Xdefaults to set the default tk scaling per computer.
> So now we know that you are running Xfce on both computers, but you
> haven't answered my second question, namely whether you have set the DPI
> scaling level via the system settings. Apparently not. On Xfce this is
> not as simple as on GNOME, KDE, or Cinnamon, but possible:
>
> Method 1: In the 3rd tab of the Appearance dialog set the Custom DPI
> setting to, say, 144. If you then start wish and perform "package
> require scrollutil" then the [tk scaling] will automatically change from
> 1.333... to 2.0.
>
> Method 1: In the Display dialog set the Scale to, say, "1.5x", and in
> the last tab of the Appearance dialog select "2x" as the value of the
> Window Scaling. If you then start wish and perform "package require
> scrollutil" then the [tk scaling] will automatically change from
> 1.333... to 2.666...
>
> It is assumed that you are using the most recent Scrollutil version 1.18.
>
> It would be helpful if you could proceed as described above and report
> back the results of your tests.
> --
> Csaba Nemethi https://www.nemethi.de mailto:csaba....@t-online.de

As I mentioned before I have no wish to set my global appearance settings since this would wreck my settings for everything else. What I need is a Tk applications-specific global setting like FLTK's envvar. FWIW my DPI setting is 96 on a 1920x1200 screen.

Meanwhile I'll just have to use tk scaling in my own apps and read in a config file so that I can have per-machine scale factors.

Re: tk scaling

<eabca624-8b38-4490-a7fe-b511f8ca2803n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22217&group=comp.lang.tcl#22217

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:1925:b0:75e:b949:96d9 with SMTP id bj37-20020a05620a192500b0075eb94996d9mr364917qkb.6.1686050237469;
Tue, 06 Jun 2023 04:17:17 -0700 (PDT)
X-Received: by 2002:ad4:5a53:0:b0:61a:23ac:b0de with SMTP id
ej19-20020ad45a53000000b0061a23acb0demr209790qvb.6.1686050237245; Tue, 06 Jun
2023 04:17:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Tue, 6 Jun 2023 04:17:16 -0700 (PDT)
In-Reply-To: <92c646d3-9274-408f-be3e-edf8cfe7519bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=31.125.17.241; posting-account=C1gZvwoAAAAojE_ZgHdwZjGSuZg6QpNd
NNTP-Posting-Host: 31.125.17.241
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
<u5k4bt$9nbl$1@dont-email.me> <04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
<u5kgem$ufh2$1@tota-refugium.de> <90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>
<u5kmgh$bgsf$1@dont-email.me> <888630c1-34a0-41fb-9979-17afdd09f969n@googlegroups.com>
<u5ms39$vlc3$1@tota-refugium.de> <92c646d3-9274-408f-be3e-edf8cfe7519bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <eabca624-8b38-4490-a7fe-b511f8ca2803n@googlegroups.com>
Subject: Re: tk scaling
From: m.n.summerfield@googlemail.com (Mark)
Injection-Date: Tue, 06 Jun 2023 11:17:17 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Mark - Tue, 6 Jun 2023 11:17 UTC

Well I realised I can do this myself.
In my .bashrc I add an export, e.g.: `export TK_SCALING=1.5`
and then in every Tk app I write I start with this one-liner:

tk scaling [expr {[info exists env(TK_SCALING)] ? $env(TK_SCALING) : 1}]

Re: tk scaling

<u5n5bt$nein$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22219&group=comp.lang.tcl#22219

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wortkarg3@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: tk scaling
Date: Tue, 6 Jun 2023 13:30:06 +0200
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <u5n5bt$nein$2@dont-email.me>
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
<u5k4bt$9nbl$1@dont-email.me>
<04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
<u5kgem$ufh2$1@tota-refugium.de>
<90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>
<u5kmgh$bgsf$1@dont-email.me>
<888630c1-34a0-41fb-9979-17afdd09f969n@googlegroups.com>
<u5ms39$vlc3$1@tota-refugium.de>
<92c646d3-9274-408f-be3e-edf8cfe7519bn@googlegroups.com>
<eabca624-8b38-4490-a7fe-b511f8ca2803n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 6 Jun 2023 11:30:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="044b07f02b017c9b59569f5b432bd8a5";
logging-data="768599"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+dLLCEiJWYgkHNe7WkX9S5"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.2
Cancel-Lock: sha1:yWPtnhAerJJjt26K9/bHqP7m9Bk=
In-Reply-To: <eabca624-8b38-4490-a7fe-b511f8ca2803n@googlegroups.com>
Content-Language: en-GB
 by: Harald Oehlmann - Tue, 6 Jun 2023 11:30 UTC

Am 06.06.2023 um 13:17 schrieb Mark:
> Well I realised I can do this myself.
> In my .bashrc I add an export, e.g.: `export TK_SCALING=1.5`
> and then in every Tk app I write I start with this one-liner:
>
> tk scaling [expr {[info exists env(TK_SCALING)] ? $env(TK_SCALING) : 1}]
>
Perhaps not setting it to 1 if TK_SCALING is not present. Just leave it
untouched.
You may also read about .tclrc on the tclsh man page.

Take care,
Harald

Re: tk scaling

<8b404e4c-9f8d-4515-9496-637638dbada9n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22221&group=comp.lang.tcl#22221

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:622a:c5:b0:3e4:e17f:a544 with SMTP id p5-20020a05622a00c500b003e4e17fa544mr489043qtw.12.1686052713586;
Tue, 06 Jun 2023 04:58:33 -0700 (PDT)
X-Received: by 2002:a05:622a:116:b0:3f9:adc6:a9a7 with SMTP id
u22-20020a05622a011600b003f9adc6a9a7mr496469qtw.3.1686052713459; Tue, 06 Jun
2023 04:58:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Tue, 6 Jun 2023 04:58:33 -0700 (PDT)
In-Reply-To: <u5n5bt$nein$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=31.125.17.241; posting-account=C1gZvwoAAAAojE_ZgHdwZjGSuZg6QpNd
NNTP-Posting-Host: 31.125.17.241
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
<u5k4bt$9nbl$1@dont-email.me> <04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
<u5kgem$ufh2$1@tota-refugium.de> <90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>
<u5kmgh$bgsf$1@dont-email.me> <888630c1-34a0-41fb-9979-17afdd09f969n@googlegroups.com>
<u5ms39$vlc3$1@tota-refugium.de> <92c646d3-9274-408f-be3e-edf8cfe7519bn@googlegroups.com>
<eabca624-8b38-4490-a7fe-b511f8ca2803n@googlegroups.com> <u5n5bt$nein$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8b404e4c-9f8d-4515-9496-637638dbada9n@googlegroups.com>
Subject: Re: tk scaling
From: m.n.summerfield@googlemail.com (Mark)
Injection-Date: Tue, 06 Jun 2023 11:58:33 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Mark - Tue, 6 Jun 2023 11:58 UTC

On Tuesday, June 6, 2023 at 12:30:10 PM UTC+1, Harald Oehlmann wrote:
> Am 06.06.2023 um 13:17 schrieb Mark:
> > Well I realised I can do this myself.
> > In my .bashrc I add an export, e.g.: `export TK_SCALING=1.5`
> > and then in every Tk app I write I start with this one-liner:
> >
> > tk scaling [expr {[info exists env(TK_SCALING)] ? $env(TK_SCALING) : 1}]
> >
> Perhaps not setting it to 1 if TK_SCALING is not present. Just leave it
> untouched.
> You may also read about .tclrc on the tclsh man page.
>
> Take care,
> Harald

Good idea. I'm now using:

if {[info exists env(TK_SCALING)]} { tk scaling $env(TK_SCALING) }

Re: tk scaling

<ea971967-495a-49e7-bdc9-f0bf0ca0f6e8n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22224&group=comp.lang.tcl#22224

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:394e:b0:757:9f8f:d5d4 with SMTP id qs14-20020a05620a394e00b007579f8fd5d4mr596898qkn.3.1686064308633;
Tue, 06 Jun 2023 08:11:48 -0700 (PDT)
X-Received: by 2002:a05:6214:8e7:b0:626:1b7d:aa8b with SMTP id
dr7-20020a05621408e700b006261b7daa8bmr285778qvb.5.1686064308431; Tue, 06 Jun
2023 08:11:48 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Tue, 6 Jun 2023 08:11:48 -0700 (PDT)
In-Reply-To: <8b404e4c-9f8d-4515-9496-637638dbada9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=31.125.17.241; posting-account=C1gZvwoAAAAojE_ZgHdwZjGSuZg6QpNd
NNTP-Posting-Host: 31.125.17.241
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
<u5k4bt$9nbl$1@dont-email.me> <04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
<u5kgem$ufh2$1@tota-refugium.de> <90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>
<u5kmgh$bgsf$1@dont-email.me> <888630c1-34a0-41fb-9979-17afdd09f969n@googlegroups.com>
<u5ms39$vlc3$1@tota-refugium.de> <92c646d3-9274-408f-be3e-edf8cfe7519bn@googlegroups.com>
<eabca624-8b38-4490-a7fe-b511f8ca2803n@googlegroups.com> <u5n5bt$nein$2@dont-email.me>
<8b404e4c-9f8d-4515-9496-637638dbada9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ea971967-495a-49e7-bdc9-f0bf0ca0f6e8n@googlegroups.com>
Subject: Re: tk scaling
From: m.n.summerfield@googlemail.com (Mark)
Injection-Date: Tue, 06 Jun 2023 15:11:48 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2529
 by: Mark - Tue, 6 Jun 2023 15:11 UTC

On Tuesday, June 6, 2023 at 12:58:35 PM UTC+1, Mark wrote:
> On Tuesday, June 6, 2023 at 12:30:10 PM UTC+1, Harald Oehlmann wrote:
> > Am 06.06.2023 um 13:17 schrieb Mark:
> > > Well I realised I can do this myself.
> > > In my .bashrc I add an export, e.g.: `export TK_SCALING=1.5`
> > > and then in every Tk app I write I start with this one-liner:
> > >
> > > tk scaling [expr {[info exists env(TK_SCALING)] ? $env(TK_SCALING) : 1}]
> > >
> > Perhaps not setting it to 1 if TK_SCALING is not present. Just leave it
> > untouched.
> > You may also read about .tclrc on the tclsh man page.
> >
> > Take care,
> > Harald
> Good idea. I'm now using:
>
> if {[info exists env(TK_SCALING)]} { tk scaling $env(TK_SCALING) }

Incidentally, I can't find any docs for tclrc or .tclrc.

Re: tk scaling

<u5nj9s$ooih$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22225&group=comp.lang.tcl#22225

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wortkarg3@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: tk scaling
Date: Tue, 6 Jun 2023 17:27:56 +0200
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <u5nj9s$ooih$1@dont-email.me>
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
<u5k4bt$9nbl$1@dont-email.me>
<04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
<u5kgem$ufh2$1@tota-refugium.de>
<90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>
<u5kmgh$bgsf$1@dont-email.me>
<888630c1-34a0-41fb-9979-17afdd09f969n@googlegroups.com>
<u5ms39$vlc3$1@tota-refugium.de>
<92c646d3-9274-408f-be3e-edf8cfe7519bn@googlegroups.com>
<eabca624-8b38-4490-a7fe-b511f8ca2803n@googlegroups.com>
<u5n5bt$nein$2@dont-email.me>
<8b404e4c-9f8d-4515-9496-637638dbada9n@googlegroups.com>
<ea971967-495a-49e7-bdc9-f0bf0ca0f6e8n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 6 Jun 2023 15:27:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="044b07f02b017c9b59569f5b432bd8a5";
logging-data="811601"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+aReEkbsdcarQk3BDdKDuc"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.2
Cancel-Lock: sha1:LnP48jVfycgeyVPql88NbUJSgl4=
Content-Language: en-GB
In-Reply-To: <ea971967-495a-49e7-bdc9-f0bf0ca0f6e8n@googlegroups.com>
 by: Harald Oehlmann - Tue, 6 Jun 2023 15:27 UTC

Am 06.06.2023 um 17:11 schrieb Mark:
> On Tuesday, June 6, 2023 at 12:58:35 PM UTC+1, Mark wrote:
>> On Tuesday, June 6, 2023 at 12:30:10 PM UTC+1, Harald Oehlmann wrote:
>>> Am 06.06.2023 um 13:17 schrieb Mark:
>>>> Well I realised I can do this myself.
>>>> In my .bashrc I add an export, e.g.: `export TK_SCALING=1.5`
>>>> and then in every Tk app I write I start with this one-liner:
>>>>
>>>> tk scaling [expr {[info exists env(TK_SCALING)] ? $env(TK_SCALING) : 1}]
>>>>
>>> Perhaps not setting it to 1 if TK_SCALING is not present. Just leave it
>>> untouched.
>>> You may also read about .tclrc on the tclsh man page.
>>>
>>> Take care,
>>> Harald
>> Good idea. I'm now using:
>>
>> if {[info exists env(TK_SCALING)]} { tk scaling $env(TK_SCALING) }
>
> Incidentally, I can't find any docs for tclrc or .tclrc.

I thopught, a "man tclsh" will bring this up:

https://www.tcl.tk/man/tcl8.6/UserCmd/tclsh.html

But it is for interactive only anyway.

Take care,
Harald

Re: tk scaling

<u5nn2o$104t1$1@tota-refugium.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22226&group=comp.lang.tcl#22226

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.tota-refugium.de!.POSTED!not-for-mail
From: csaba.nemethi@t-online.de (nemethi)
Newsgroups: comp.lang.tcl
Subject: Re: tk scaling
Date: Tue, 6 Jun 2023 18:32:24 +0200
Message-ID: <u5nn2o$104t1$1@tota-refugium.de>
References: <b0c80df7-952c-4e3b-9fa2-870d0aec55a2n@googlegroups.com>
<u5k4bt$9nbl$1@dont-email.me>
<04614c04-4458-48b7-b4cc-2169775543ecn@googlegroups.com>
<u5kgem$ufh2$1@tota-refugium.de>
<90a4801f-2af1-465f-b91f-6a4376856129n@googlegroups.com>
<u5kmgh$bgsf$1@dont-email.me>
<888630c1-34a0-41fb-9979-17afdd09f969n@googlegroups.com>
<u5ms39$vlc3$1@tota-refugium.de>
<92c646d3-9274-408f-be3e-edf8cfe7519bn@googlegroups.com>
<eabca624-8b38-4490-a7fe-b511f8ca2803n@googlegroups.com>
<u5n5bt$nein$2@dont-email.me>
<8b404e4c-9f8d-4515-9496-637638dbada9n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 6 Jun 2023 16:32:24 -0000 (UTC)
Injection-Info: tota-refugium.de;
logging-data="1053601"; mail-complaints-to="abuse@news.tota-refugium.de"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:PaTqbessuPRL7sLXaV0vUAA56oo=
Content-Language: en-US
In-Reply-To: <8b404e4c-9f8d-4515-9496-637638dbada9n@googlegroups.com>
X-User-ID: eJwFwYEBwCAIA7CXJhYK5yCd/59g4jtWDBEe8Ov3prqCtDwUW21hrW95o7BHnCkk5Do0w/8AIzQRPQ==
 by: nemethi - Tue, 6 Jun 2023 16:32 UTC

Am 06.06.23 um 13:58 schrieb Mark:
> On Tuesday, June 6, 2023 at 12:30:10 PM UTC+1, Harald Oehlmann wrote:
>> Am 06.06.2023 um 13:17 schrieb Mark:
>>> Well I realised I can do this myself.
>>> In my .bashrc I add an export, e.g.: `export TK_SCALING=1.5`
>>> and then in every Tk app I write I start with this one-liner:
>>>
>>> tk scaling [expr {[info exists env(TK_SCALING)] ? $env(TK_SCALING) : 1}]
>>>
>> Perhaps not setting it to 1 if TK_SCALING is not present. Just leave it
>> untouched.
>> You may also read about .tclrc on the tclsh man page.
>>
>> Take care,
>> Harald
>
> Good idea. I'm now using:
>
> if {[info exists env(TK_SCALING)]} { tk scaling $env(TK_SCALING) }

Originally you asked whether it is possible to use the .Xdefaults file
for specifying the scaling factor. Well, this is possible: Just insert
the line

*tkScaling: 1.5

or

*TkScaling: 1.5

into your .Xdefaults or .Xresources file and start your Tk scripts with

if {[set scaling [option get . tkScaling TkScaling]] ne ""} {
catch {tk scaling $scaling}
}

The catch guards against a bad scaling value.

--
Csaba Nemethi https://www.nemethi.de mailto:csaba.nemethi@t-online.de


devel / comp.lang.tcl / Re: tk scaling

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor