From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Adding icon sets to Emacs -- and next steps for icons.el Date: Wed, 24 Aug 2022 13:25:40 +0200 Message-ID: <87pmgpopcb.fsf@gnus.org> References: Mime-Version: 1.0 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="35407"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 24 14:43:01 2022 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 1oQpin-00091p-67 for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Aug 2022 14:43:01 +0200 Original-Received: from localhost ([::1]:42988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQpim-0005pA-63 for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Aug 2022 08:43:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQoW5-0002LY-Uh for emacs-devel@gnu.org; Wed, 24 Aug 2022 07:25:49 -0400 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:38210) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQoW4-0001xg-9i for emacs-devel@gnu.org; Wed, 24 Aug 2022 07:25:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=CxEshchj8vmg0fEBviWwvHLiI4QKcCBYx49kgOhxXYk=; b=oGrMZeheO42cp5y6eVd451jYC/ U3DW+Bmqd0F4Bxytc4ajmjeb+3dyTTgKv7D/y7ux6FfDzAFqyzdRYyuKMVIeSUrfe7wC12+HKeguK G0Ffn2SUDKiiQu/L+tuQNduw4EQnfO9GNYCCWvPJxbbdZ95DxVkLJcRDZEcaYhnyKhTc=; Original-Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQoVz-0004nm-13; Wed, 24 Aug 2022 13:25:45 +0200 In-Reply-To: (Stefan Kangas's message of "Tue, 23 Aug 2022 23:45:43 -0700") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEU2Pj+OeFf///+r WAvDAAAAAWJLR0QCZgt8ZAAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAAd0SU1FB+YIGAsQH2KLlssA AAEeSURBVCjPTZFRjsMgDETHEv4HCe5jpObfSPj+V9kxSZtFSpqHzczgolnpAPgEcM2uBIMQIloC DrSxpqEBSlhd3Vi4diG0cAhk8AfSplc2rUEoa2xumcVproNbaDtFrxZ1mg4kFN8XxbesA5BpUnEU qDUhwmIGqQTo7g8ws0xNhfk0ZFJQJW0rQyHvVjJDVlSdpymX9ck0slOmMii9eP98QysO2BFUo3lY vtE6iqUXM6ZE4e6EsvLhhotF1rMBrtZBO1TGqHk4zzAJ2/ihH9zrwO20/YWWAoR5X/S460nXca4i p60wsXq9/AZGGn55/4J4+G2Ts9xrv57eHuDfSee4hzciYqtUfFeV5T9w2Z8f2Bnety1n+gLiPcPZ 4N/qfyafNBAw3keoAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA4LTI0VDExOjE2OjMxKzAwOjAw j5H1lAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wOC0yNFQxMToxNjozMSswMDowMP7MTSgAAAAA SUVORK5CYII= X-Now-Playing: Loma's _Don't Shy Away_: "Given a Sign" Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:294002 Archived-At: Stefan Kangas writes: > My idea is to keep Lars' idea of individual customizable icons, but > leave the choice of which image file to the code I've written. > I imagine that the `warnings-suppress' icon definition in warnings.el > should look something like: > > (define-icon warnings-suppress button > '((image "warning") ;;; <<< NEW LINE >>> > (emoji "=E2=9B=94") > (symbol " =E2=96=A0 ") > (text " stop ")) > "Suppress warnings." > :version "29.1" > :help-echo "Click to suppress this warning type") > > From here, "warning" will be fed to my `icons-get', which will be > responsible for producing, e.g., the ".../material/alert/warning.svg" > file from the "materials" icon set, based on whatever knobs we decide to > have. I don't think it's necessary to have another layer on top of the icons layer for this, because we already have theming support for icons. That is, if we want a Material theme, we'd just do: (custom-theme-set-icons 'material '(warning-suppress ((image "material/alert/warning.svg" "material/alert/w= arning.xpm")) '(outline-open ((image "material/action/open.svg" "material/action/open.x= pm"))))) And then users can just choose that theme. People that create other themes would distribute the .svg/.xpm files with the theme definition -- so the degrading from "if Material icons aren't present, then use these other icons instead" won't happen.