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: Thu, 8 Oct 2009 23:34:13 +0200

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.

Thanks

Michal




reply via email to

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