Page MenuHome

UI: Proposal for Simplified Editor Menu
ClosedPublic

Authored by Harley Acheson (harley) on Jun 26 2019, 2:40 AM.

Details

Summary

Not sure if anyone would be interested in this.

I just find that the current Editor Menu is a bit more visually confusing than it has to be. I find the title to be unnecessary, and it has a line going a quarter-way across the widow. Categories are shown but they don't seem obvious enough what they are, and the close proximity to the list makes them seem horizontally misaligned. Possibly all just personal preference, but I thought I'd let mine known.

Following shows these changes affect the Editor menu, Languages, and Image File Format:

Diff Detail

Repository
rB Blender

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.Jun 26 2019, 3:05 AM

There has been discussion about removing the property name from these types of dialogs. That may be ok if we agree on it.

Doing it by removing the name of properties is not ok, all properties must have valid names.

This revision now requires changes to proceed.Jun 26 2019, 3:05 AM

This revision takes away the need to alter the property in rna_screen.c

Instead if the list contains categories then show them with rules below them and don't show the title. A bit simpler this way.

@Brecht Van Lommel (brecht) : Doing it by removing the name of properties is not ok, all properties must have valid names

Yes, I realized that was dumb when I found another multi-column list (Languages).
And then took that out before I noticed you mention it. LOL

Had to make changes to support lists with categories where the items in a section overflow to the next column

For example, the top of the following image shows the "Languages" list as it is currently. The "Starting" section is so long that it overflows and shows "Polish" on the same row as the category titles.

The bottom of the image above shows how is looks after this patch is applied. No title, and the overflowing category still looks nice.

This is definitely an improvement for cases where we have overflowing columns, as the last image shows.

If the technical side is ok, I think we should make this change.

Updated to current state of master.

A new sample:

Updating for current state of master and to simplify it a bit.

I like the changes here too. I think Campbell would be the one to check on the code side though.

source/blender/editors/interface/interface.c
4058

I would recommend an explicit comparison to 0 here so it's clear the variable is an int.

Harley Acheson (harley) edited the summary of this revision. (Show Details)

Updated to current state of master and to incorporate suggestions by @Hans Goudey (HooglyBoogly)

Updated to current state of master.

Totally forgot about this one too. +1 for sure!

I like the line dividing the categories, would this also apply do the Modifiers list? (this is master, couldn't test this patch yet)

@Pablo Vazquez (pablovazquez) - ...would this also apply do the Modifiers list? (this is master, couldn't test this patch yet)

No, that list is made in some other way (doesn't use ui_def_but_rna__menu). This change makes the other lists more like the Modifier list since it it removes the "Title" if there are categories. So, for example removing that "Editor Type" we see the top of that list.

But yes, we'd just have to add that divider line under the categories in the Modifiers list and they would look the same. Now I just have to find that thing...

@Pablo Vazquez (pablovazquez) - Added a rule inside uiItemsFullEnumO_items() so that the "Modifiers List" looks the same as the others:

You know what, I'm always wondering why the "scripting" column comes first than the "data" column (left to right)... I'd swap those two sections and make the "scripting" the last one, since it's the least used section, I think?
But hey, that's just me... lol...

@Pablo Vazquez (pablovazquez) - Added a rule inside uiItemsFullEnumO_items() so that the "Modifiers List" looks the same as the others:

Great, thanks! To me this is good to go from the UI side of things.

This revision is now accepted and ready to land.Oct 19 2020, 2:14 PM

But hey, that's just me... lol...

No, it's not just you.

@TheRedWaxPolice (TheRedWaxPolice) ... I'd swap those two sections and make the "scripting" the last one

Yes, me too. But there’s no way I’d touch that with a ten foot pole as the “muscle memory” crowd would have me in a pillory.

Yes, me too. But there’s no way I’d touch that with a ten foot pole as the “muscle memory” crowd would have me in a pillory.

I doubt people will even notice it... hehehe..

This revision was automatically updated to reflect the committed changes.
Alexander Gavrilov (angavrilov) added inline comments.
source/blender/editors/interface/interface.c
4253

Is it intentional that menus without named categories completely lose the capability to have simple separators?

@Alexander Gavrilov (angavrilov) - Is it intentional that menus without named categories completely lose the capability to have simple separators?

No, it is an unintentional change from what is seen on the left to what we now see on the right:

I'll investigate and/or make a bug report.

I already tested locally that this fixes it before even commenting here:

   uiItemS(column);
 }
+else if (categories == 0) {
+  uiItemS(column);
+}

So it's 100% caused by this patch. If you don't want to forbid anonymous separators when there are categories, you can fix this even easier by just moving the call outside of if (item->name).

@Alexander Gavrilov (angavrilov) - If you don't want to forbid anonymous separators when there are categories...

The intent of this particular patch was never to stop adding anonymous separators so I can't think of why to not allow them if there are categories. I mean it would look dumb but that's not up to me.

Wouldn't the fix just be this though? Or am I missing some detail here?

     if (!item->identifier[0]) {
       if (item->name) {
         if (item->icon) {
           uiItemL(column, item->name, item->icon);
         }
         else {
           /* Do not use uiItemL here, as our root layout is a menu one,
            * it will add a fake blank icon! */
           uiDefBut(block,
                    UI_BTYPE_LABEL,
                    0,
                    item->name,
                    0,
                    0,
                    UI_UNIT_X * 5,
                    UI_UNIT_Y,
                    NULL,
                    0.0,
                    0.0,
                    0,
                    0,
                    "");
         }
-        uiItemS(column);
       }
+      uiItemS(column);
     }
     else {

Wouldn't the fix just be this though? Or am I missing some detail here?

That's what I meant by 'move outside the if' :) I just didn't really look through the other code to see if it would interfere with categories in any way and tested a conservative fix.

@Alexander Gavrilov (angavrilov) - That's what I meant by 'move outside the if' :)

Yes, sorry for being pedantic but I totally missed this type of menu with anonymous separators so want to make sure that I'm not missing anything else. LOL. I really do appreciate your help.