Layout list WYSIWYM

Daniel xracoonx at gmx.de
Thu Jul 30 06:54:30 UTC 2020


On 2020-07-26 19:54, Daniel wrote:
> On 2020-07-24 18:13, Daniel wrote:
>> On 2020-04-14 09:47, Daniel wrote:
>>> On 2020-04-14 09:29, Daniel wrote:
>>>> On 2020-04-14 09:23, Daniel wrote:
>>>>> If I read correctly, then drop-down list items can be styled in Qt. 
>>>>> I think it would look awesome and, more importantly, enhance 
>>>>> finding items if the layout list would provide some of the WYSIWYM 
>>>>> styles from the work area. I'd suggest font attributes and labeling.
>>>>>
>>>>> Attached is a mock-up of what this might look like.
>>>>>
>>>>> Daniel
>>>>>
>>>>
>>>> There was some grayish background color. A nicer version is attached.
>>>>
>>>> Daniel
>>>
>>> Some more thoughts on the content of the items in the list:
>>>
>>> I guess the easiest way would be to always show
>>>
>>>      label + layout-name
>>>
>>> However, in some cases this leads to non-ideal results. For example, 
>>> this would result in
>>>
>>>      Theorem 1. Theorem
>>>
>>> That's long and confusing. So, instead there needs to be an 
>>> attribute, call it "LayoutListLabel", that allows the formatting if 
>>> the layout list item should have a different content. I guess it 
>>> would be enough to have a reference to the whole label (such as 
>>> Riki's ## for PrettyFormat but more customization, which might also 
>>> come to PrettyFormat soon, might be better). So, for the theorem 
>>> environments it would be:
>>>
>>>      LayoutListLabel        "##"
>>
>> Due to popular demand ;), and for the fun of it, I have made some 
>> steps towards implementation. Attached is the visual result of these 
>> first steps. I think looks nice and helps to more quickly find what 
>> one is looking for. I'd be curious what you think?
>>
>> Next step would be to try to figure out how to get the string with 
>> counter and bullets. This would also make the stars (*) on the layout 
>> names redundant.
>>
>> Daniel
>>
>>
> 
> A first attempt is the attached patch. However, there are a couple of 
> (possible) issues:
> 
> 1. I get an ASSERTION:
> 
> support/lassert.cpp (51): ASSERTION false VIOLATED IN 
> /Users/Shared/LyX/lyx/src/frontends/qt/GuiFontLoader.cpp:132
> frontends/qt/GuiFontLoader.cpp (133): Unrealized font!
> 
> I guess I am not getting the QFont from the lyx::FontInfo correctly. But 
> I am not sure what the correct function is. It seems otherwise to work 
> as expected.
> 
> 2. I am not sure the way I get the size of an unchanged row from the 
> dropdownlist in an efficient way.
> 
> Maybe someone has a comment on any of the above or other?
> 
> Daniel
> 

Ticket is at https://www.lyx.org/trac/ticket/11914.

Daniel



More information about the lyx-devel mailing list