From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: High-res Customize icons Date: Tue, 27 Oct 2020 19:09:02 -0400 Message-ID: <17FF276F-1E4B-4955-9781-29242C1D0CE4@gmail.com> References: <83imhre827.fsf@gnu.org> <83a733e56k.fsf@gnu.org> <834ktbe2ve.fsf@gnu.org> <83zharvkcc.fsf@gnu.org> <17B57ACD-3249-463A-9F23-7EA9B3E0C9A1@gmail.com> <83sga4izmc.fsf@gnu.org> <5AEB1CE7-D76C-4EE4-97F3-CCB86AEB6382@gmail.com> <20201027222653.GJ59267@breton.holly.idiocy.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6747"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , =?utf-8?Q?Cl=C3=A9ment_Pit-Claudel?= , chad , emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 28 00:09:42 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXY61-0001e3-SH for ged-emacs-devel@m.gmane-mx.org; Wed, 28 Oct 2020 00:09:41 +0100 Original-Received: from localhost ([::1]:49924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXY60-00086W-S0 for ged-emacs-devel@m.gmane-mx.org; Tue, 27 Oct 2020 19:09:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXY5U-0007ek-Sj for emacs-devel@gnu.org; Tue, 27 Oct 2020 19:09:08 -0400 Original-Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]:46820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXY5T-0001xO-6J; Tue, 27 Oct 2020 19:09:08 -0400 Original-Received: by mail-qt1-x82b.google.com with SMTP id r8so2325392qtp.13; Tue, 27 Oct 2020 16:09:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6DXxeICJ3jCFlZGMgMUVlLL9R1n8bv4mnjymoSNn+LA=; b=YJu4ze46SFiXdwyQLYKM8aj7BhR11vZmrALumWqC0lRrqx1ptsWqLL/5vyqVljx86/ 9DvvLUwCIxokZGfk6YN8EejI+Qu5AVk6aQByc2V4+W8694JPQXMTJ5mpFOs9OmZLDcqd gZaIFh0Rb0L9DBPyZ+ZvyEa5ZOqRBfjpmnoLqRbnX8NC8onnaPDr54q1w1pDYRF+x/JZ Z2xUnauvbvqgNB2jk4zzSjFFm5EdY9qS5jZuXjWZDTsD5H/Vugbn0WShgmznXWumAjGb FPONCBnTd4Xqd8/lMzXNsCYqPz13+lWEk5SR+Zp3S+UH2ICKU+36UcnQoCxgsL+1ZnSv +KEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6DXxeICJ3jCFlZGMgMUVlLL9R1n8bv4mnjymoSNn+LA=; b=pZqmCv34CRpCBfdQqc7hwkpuR/ZnnA/XyufsWRjtMEBZdTDHvg71QaJChAPrRDxhG6 uJPiH9h1IlgykfFOCcCV0KWFQiFZuY8fK7FguuFsIOj6uvu2dOXe2pyJ7k/C050KFkUE si5LMPDiF8iU7buqcjZ67dxNGuTTxFwOBcfS5pTH4YtADcBSllYAW/0ZurMl6zqwmqzG l7q9RR3exBku56iRIAvGG9DPdr3aWpwaxUURRZz2kXrR5alU7XAJ+MHnE6FmQL+R897/ y6kAEpNEYmWTOayWHQFNnzcrskM5HzEq2DfO79ovcDyjg5C3nir9Mf2rIyJ9kX6l+HoB BD8g== X-Gm-Message-State: AOAM53295m/n5PDojphvBGhkO/AThgX2X6AU+kU58TYhSBX7/+cRwnF3 i64YYbL1e4bCRdvPdZ4mVqI= X-Google-Smtp-Source: ABdhPJxHxw54zWoj9LXcwL67xEZwELvmEFKyen9wPXRQ0a4h7Ni7+LmoyFVnLrdu7slzYtw7T5cBhA== X-Received: by 2002:ac8:4053:: with SMTP id j19mr4682614qtl.220.1603840145538; Tue, 27 Oct 2020 16:09:05 -0700 (PDT) Original-Received: from ?IPv6:2601:98a:4200:9210:85d5:8c8b:fea7:5635? ([2601:98a:4200:9210:85d5:8c8b:fea7:5635]) by smtp.gmail.com with ESMTPSA id m22sm1776692qkk.63.2020.10.27.16.09.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Oct 2020 16:09:04 -0700 (PDT) In-Reply-To: <20201027222653.GJ59267@breton.holly.idiocy.org> X-Mailer: Apple Mail (2.3608.120.23.2.4) Received-SPF: pass client-ip=2607:f8b0:4864:20::82b; envelope-from=casouri@gmail.com; helo=mail-qt1-x82b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:258523 Archived-At: > On Oct 27, 2020, at 6:26 PM, Alan Third wrote: >=20 > On Tue, Oct 27, 2020 at 03:17:37PM -0400, Yuan Fu wrote: >>=20 >> Cocoa provides an API for querying the scaling factor, if it is 2, >> we should load the @2x image and add :scale 0.5. >>=20 >> It=E2=80=99s kind of a mess. What do you think? >>=20 >> How about exposing that Cocoa API to lisp and handle accordingly in >> find-image? Some thing like: >=20 > This sounds good to me. It should be easy to expose the scale factor > to lisp. The only potential problem is that it can change as the frame > is dragged from one screen to the other, or similar. Is there any way > to force reloading the images? At least it doesn=E2=80=99t introduce regression. And we probably = don=E2=80=99t want Emacs on Cocoa to perform better than that on Linux = anyway. (Does anyone know what happens if you move Emacs from high-res = screen to a low-res one on Linux?) How should the variable be named? There is already a variable named = image-scale-factor. I suggest something like ns-pixel-scale-factor. >=20 > Anyway, even if not it will always display something, just not > necessarily the optimal image. >=20 > Do you want me to write the C code to expose the scale factor? That=E2=80=99s marvelous! Yuan=