From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Mw6QK-0006gt-K3 for mharc-grub-devel@gnu.org; Thu, 08 Oct 2009 23:45:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mw6QJ-0006gg-Ct for grub-devel@gnu.org; Thu, 08 Oct 2009 23:45:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mw6QE-0006fV-Lk for grub-devel@gnu.org; Thu, 08 Oct 2009 23:45:43 -0400 Received: from [199.232.76.173] (port=51340 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mw6QE-0006fQ-Hb for grub-devel@gnu.org; Thu, 08 Oct 2009 23:45:38 -0400 Received: from mail-pz0-f192.google.com ([209.85.222.192]:39097) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mw6QD-0001s9-F5 for grub-devel@gnu.org; Thu, 08 Oct 2009 23:45:37 -0400 Received: by pzk30 with SMTP id 30so2624384pzk.24 for ; Thu, 08 Oct 2009 20:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=62o7i3OCEYep1SH/XZlpkS3hlcn4BjZmKFsz+fr34dk=; b=Iy7h5NcjQ7H/0XPdc2vHgaWomRY54nLMZgXLleM+m45iGkxQpXrSFz0PA2NjamxQD4 O73tFfshMLcPc1KHmlnBBrQOPvVEHa02ZeqtK2CabTKOX6yVz0KCFr71hFDSunLTJJGx IJ+6lQay0PZNnYfisCT7YKXX+49HGQF1BCeak= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=aKB65EnOKapD+/o/OKh/2jvgIFq4/O9d8v4RdHqjE1VglWcRnN2axulwh/BgqB9GD9 ba8juIEwOgBy4LeAvkheZeAaCmB0rompAnXkiLv9H2/Up/HU4uH+iaC4RuyLzayQV1ll 4UIwW8Q4ZfCDz9HvibD88EZIKWe3PBWOZp7Kc= MIME-Version: 1.0 Received: by 10.140.165.8 with SMTP id n8mr209946rve.289.1255059932811; Thu, 08 Oct 2009 20:45:32 -0700 (PDT) In-Reply-To: References: Date: Fri, 9 Oct 2009 11:45:32 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 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: Fri, 09 Oct 2009 03:45:43 -0000 On Fri, Oct 9, 2009 at 5:34 AM, Michal Suchanek wrote= : > 2009/10/8 Bean : >> On Thu, Oct 8, 2009 at 7:26 PM, Michal Suchanek wr= ote: >>> 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 >> { >> =A0frame { >> =A0} >> =A0padding { >> =A0} >> =A0dialog { >> =A0 =A0style=3Dframe,padding >> =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 =A0to 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 =A0this case but I > guess bitmap borders will work equally well. Hi, The main reason for style is to customized ui independent of code, for example, to show a message box, we might use something like this in code: popup { style=3Ddialog.message text { text=3D"Hello" }} Users can write a dialog.message section to customize the look of dialog box without changing the code. --=20 Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/