gcanyon / navigator

The amazing small powerful plugin for Livecode that makes you a better, faster developer.
12 stars 4 forks source link

Request: Groups- separate color #19

Open madpink opened 5 years ago

madpink commented 5 years ago

I would like another color option for a group and their folded contents so a group can be more easily spotted in the list.

gcanyon commented 5 years ago

I'll leave this open because I'm thinking about adding this as a specific option.

But for now, you can add a custom list string like this, and it will cause groups to be displayed in a salmon color. Obviously, you can change the color to your taste:

iff(word 1 of the long id of tID is "group","<font color=" & Q("255,100,100") & ">","") & the name of tID && "-" && the id of tID & iff(word 1 of the long id of tID is "group","</font>","")

To edit the list strings, select Prefs... on the Actions menu, then in the lower right, click "Edit Strings"

You could also format groups, for example make them bold:

iff(word 1 of the long id of tID is "group","<b><font color=" & Q("255,100,100") & ">","") & the name of tID && "-" && the id of tID & iff(word 1 of the long id of tID is "group","</font></b>","")

Note that the default font for Navigator's list "(Message)" does not display styles, so you'll have to change to another. "(text)" works, for example.

madpink commented 5 years ago

that works well!

gcanyon commented 5 years ago

Yeah, I was particularly stoked the day I realized it would be fairly simple to make Navigator's list display pretty much completely user-definable.

gcanyon commented 5 years ago

FYI, I'm still pondering this. The current way of handling colors depends on the nature of the controls (scripted, not scripted, behaviors, etc.

Coloring by type (groups) doesn't align with that, but I'm wondering if I need to implement a more flexible/powerful styling function to the display.

In the meantime, I've added an extra indent to the " folded controls" line, which brings it in line with the indent the controls it represents would have had. I also prefixed it with three asterisks, so the line will now look like:

| | A folded group | | | *** 8 folded controls

It would be easy to do more with the text here.