grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GITGRUB] New menu interface (implementation)


From: Michal Suchanek
Subject: Re: [GITGRUB] New menu interface (implementation)
Date: Fri, 9 Oct 2009 13:52:27 +0200

2009/10/9 Bean <address@hidden>:
> On Fri, Oct 9, 2009 at 5:34 AM, Michal Suchanek <address@hidden> wrote:
>> 2009/10/8 Bean <address@hidden>:
>>> On Thu, Oct 8, 2009 at 7:26 PM, Michal Suchanek <address@hidden> wrote:
>>>> 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=dialog }}
>>>
>>> style
>>> {
>>>  frame {
>>>  }
>>>  padding {
>>>  }
>>>  dialog {
>>>    style=frame,padding
>>>  }
>>> }
>>>
>>
>> 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.
>
> 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=dialog.message text { text="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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]