From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Mw0cu-0007lU-Nu for mharc-grub-devel@gnu.org; Thu, 08 Oct 2009 17:34:20 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mw0cs-0007ju-Gm for grub-devel@gnu.org; Thu, 08 Oct 2009 17:34:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mw0cp-0007gN-RO for grub-devel@gnu.org; Thu, 08 Oct 2009 17:34:17 -0400 Received: from [199.232.76.173] (port=59465 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mw0cp-0007g1-MT for grub-devel@gnu.org; Thu, 08 Oct 2009 17:34:15 -0400 Received: from fg-out-1718.google.com ([72.14.220.155]:52191) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mw0cp-0002kI-91 for grub-devel@gnu.org; Thu, 08 Oct 2009 17:34:15 -0400 Received: by fg-out-1718.google.com with SMTP id e21so123631fga.12 for ; Thu, 08 Oct 2009 14:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=1QtM+WHPsf+G3g6hGbNHeM4PImIYS0eCHKqYlYgl9so=; b=X22AhM0jhMmK9dtDF5vtTyLPWg/UnvlgZGyBayzwyraQ/OHxf8Qy8PnqYgRsPYP1CL vJFEdGSRENmxRsHJ4vu8HSknb1Rt9taKhWx53F2IGWSFUAFxeHInimBSrOnAiT0mdsH0 FQOaA8X3uNM6LskzweL8HaZ/885bpCJ7hEqfs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=nxcpsVjWIXCXqJ6JqOst51tTWdnVwUiKaPeUTiMBAKCsMCKMwJHnhQMrFqyIQkG7cn U7UoIdKf5duOyD2M7akkUp6ND2yEQm6AI9fT5DxnokBfPT7T6+W0fde6j82U4vtt3f7a Qci3HeSqCxI5W/ubNoBH1Pspav7RGc9Q/ypcE= MIME-Version: 1.0 Sender: hramrach@gmail.com Received: by 10.86.211.38 with SMTP id j38mr1643572fgg.26.1255037653086; Thu, 08 Oct 2009 14:34:13 -0700 (PDT) In-Reply-To: References: Date: Thu, 8 Oct 2009 23:34:13 +0200 X-Google-Sender-Auth: 6a0c621271e29b44 Message-ID: From: Michal Suchanek To: The development of GRUB 2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [GITGRUB] New menu interface (implementation) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2009 21:34:19 -0000 2009/10/8 Bean : > On Thu, Oct 8, 2009 at 7:26 PM, Michal Suchanek wro= te: >> I am not sure this is the right approach. >> >> Style writers should be free to style any widget without special >> support in the widget. > > Hi, > > The style property is parsed by the menu system, no special handling > for individual widgets. > >> >> If there is special styling property it should not refer to a >> particular visual representation. They should specify the purpose of >> the widget and the style should decide how widgets of that type are >> visually realized. > > In order to support this, I can just add recursive handling to the > style section, something like this: > > screen { panel { style=3Ddialog }} > > style > { > =C2=A0frame { > =C2=A0} > =C2=A0padding { > =C2=A0} > =C2=A0dialog { > =C2=A0 =C2=A0style=3Dframe,padding > =C2=A0} > } > This is backwards. At first you want some separation of model and view and now you want to apply style only to elements that are explicitly styled. Every element should have its default style which can be further modified by changing its properties through styling. There should be no need for the element to have any additional property for it to be affected by styles. There should be a way to assign additional identification to elements so that they can be affected by more specific style. In X *foreground: yellow and *background: MidnightBlue changes the color on each and every element for which there is no more specific color declaration. Similarly in CSS * { color: black ; background: white ;} changes the properties of all elements. The class is used only to target some elements more specifically. For example, in gfxterm it would be probably useful to add specific class (or similar property) to menu items that correspond to linux kernels so that they can be styled differently from the other menu items. The problem with splitting text and image into separate widgets is that the image cannot be attached as icon property in this case but I guess bitmap borders will work equally well. Thanks Michal