From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MwE1Q-0006wL-7R for mharc-grub-devel@gnu.org; Fri, 09 Oct 2009 07:52:32 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MwE1O-0006vH-Ah for grub-devel@gnu.org; Fri, 09 Oct 2009 07:52:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MwE1N-0006up-Gq for grub-devel@gnu.org; Fri, 09 Oct 2009 07:52:29 -0400 Received: from [199.232.76.173] (port=60479 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MwE1N-0006uf-Bn for grub-devel@gnu.org; Fri, 09 Oct 2009 07:52:29 -0400 Received: from fg-out-1718.google.com ([72.14.220.159]:31175) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MwE1M-0007Et-R8 for grub-devel@gnu.org; Fri, 09 Oct 2009 07:52:29 -0400 Received: by fg-out-1718.google.com with SMTP id e21so258540fga.12 for ; Fri, 09 Oct 2009 04:52:27 -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=9kdWpLHlVQVPLi4Xk8Hut92IrK+DxIiLZvNWbNA+Mpc=; b=ITjgL/1LwXK3ceNeLaXYRFxCFDA6EYrn67pV0JJDrGNT/PoTeFwnmnbaSpZmvXDts9 OTBeV8oxVODxxxxAunkPSRqzwxHcsn/NGFRegwN1LAkbkyA8317SMN2TlgqBYrUTEdk4 AM2CboZOWrehoC4M4CLu9X2l1BUL3q2AK1KpA= 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=qZnidscIqpuwku6wdjmOkXpjVQ4/5gpJny2xsqnp6qACWy8M//1jDgNOC25dl1zbyg SGSTLSNKX+LbSUPhg9JbiHK8NYsZ51DZYkGxcTOZbcClSH78FiFGzDYPaj6Hb1Rd7Q4a SY9EqzuYHj0euJeufRIgJA0zhEsGB26mMAoGE= MIME-Version: 1.0 Sender: hramrach@gmail.com Received: by 10.86.169.25 with SMTP id r25mr2249205fge.17.1255089147654; Fri, 09 Oct 2009 04:52:27 -0700 (PDT) In-Reply-To: References: Date: Fri, 9 Oct 2009 13:52:27 +0200 X-Google-Sender-Auth: decb30704f1bb1a5 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: Fri, 09 Oct 2009 11:52:30 -0000 2009/10/9 Bean : > On Fri, Oct 9, 2009 at 5:34 AM, Michal Suchanek wro= te: >> 2009/10/8 Bean : >>> On Thu, Oct 8, 2009 at 7:26 PM, Michal Suchanek w= rote: >>>> 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 =C2=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 =C2=A0this case bu= t 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. > Yes, that's nice to name the dialog so that it can be styled more easily. However, the text has no style assigned. Still the user should be able to do something like popup text { font-face: sans } or .dialog.mesasge text { font-face: sans } to override the font used in the dialog although the text element is not explicitly linked to any style. Thanks Michal