Bars facelift

Started by stevefal, September 28, 2013, 08:50:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

stevefal

I'd like to propose a facelift for the top and bottom LV bars. The goals are:

- better visibility in more situations
- more information displayable
- neutral coloring
- uniform layout



- Backgrounds are semi-transparent a la histogram background
- Bottom bar uses Argand 28 rather than 32 - greater density and more visible - no outlines
- Items are neutral white unless caution (yellow) or warning (red)
- Justified spacing - shifting is possible when data changes
- Using symbols is encouraged to save space
- Shoot the moon? Individually hide-able, sizable (S-23, M-28, L 32) and configurable content
Steve Falcon

a1ex

I like it, looks very elegant.

xNiNELiVES

Yes elegant but I would like to add the colored information still colored in the new theme. Just a personal opinion. Everything seems to blend together without it...

stevefal

I don't have the coding chops to build it, but I envision an API that does the generic layout and lets core ML features and modules register displayable items. The user could select which items should appear in bar N, the client feature/module would post updates (text + color + maybe minWidth), and the server would take care of layout, drawing, clearing, redrawing etc.

It would give module developers an easy way to communicate via LV and without splattering other overlays.
Steve Falcon

jose_ugs


arrinkiiii


Doyle4

Really like!!

I like the idea suggested of been able to choose the info to be coloured, but other than that i really like.

Be nice to have a mini histogram in the bar too :) can choose to have standard or mini mode? Also be nice is battery satus was % for a more accurate reading?

Stedda

Love it, ML is becoming very polished!

Thanks for all the hard work!
5D Mark III -- 7D   SOLD -- EOS M 22mm 18-55mm STM -- Fuji X-T1 18-55 F2.8-F4 & 35 F1.4
Canon Glass   100L F2.8 IS -- 70-200L F4 -- 135L F2 -- 85 F1.8 -- 17-40L --  40 F2.8 -- 35 F2 IS  Sigma Glass  120-300 F2.8 OS -- 50 F1.4 -- 85 F1.4  Tamron Glass   24-70 2.8 VC   600EX-RT X3

pravdomil

nice, and do you have idea for movie mode? Sound, buffer, time etc?
For custom content we can use flexinfo?

g3gg0

i will extend flexinfo to be usable for both photo and LV mode.
additionally i will add dynamic content support. ;)
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

pilgrim

Very beautiful, and surely useful. I like very much the battery indicator which more precise, also the Kelvin  :)  :)  indication.
The battery indicator from Canon is too simple, for safety (and cooler ARM) it's good to use the battery grip. But there is a moment I don't want to use the grip, because more discreet or because the stabilization, so accurate indicator for battery is very useful in the field. Thanks for the idea, and thank also the dev team   ;) , as always, who follow up. 

stevefal

Quotebe nice to have a mini histogram in the bar too

"Histobar":

Steve Falcon

g3gg0

Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

g3gg0

here some example implementation of your proposal.


diff -r b227e49bcedf src/flexinfo.c
--- a/src/flexinfo.c Sat Sep 28 23:59:18 2013 +0200
+++ b/src/flexinfo.c Sun Sep 29 00:57:41 2013 +0200
@@ -93,7 +93,38 @@
info_elem_t info_config_liveview[] =
{
     { .config = { { INFO_TYPE_CONFIG } } },
-    { .text = { { INFO_TYPE_TEXT, { 150, 20, 2, .name = "Note" }}, "<FlexInfo unconfigured>", COLOR_CYAN, INFO_COL_PEEK, INFO_FONT_SMALL } },
+    /* entry 1, top bar */
+    { .fill = { { INFO_TYPE_FILL, { 10, 60, 1, .w=700, .h=30, .name = "Top bar" }}, .color = COLOR_BG } },
+    /* entry 2, bottom bar */
+    { .fill = { { INFO_TYPE_FILL, { 10, 300, 1, .w=700, .h=30, .name = "Bottom bar" }}, .color = COLOR_BG } },
+   
+   
+    /* fill top bar */
+   
+    /* entry 3, time (leftmost) */
+    { .string = { { INFO_TYPE_STRING, { 15, 5, 2, .name = "Hrs", .anchor = 1, .anchor_flags = INFO_ANCHOR_LEFT | INFO_ANCHOR_TOP,  .anchor_flags_self = INFO_ANCHOR_LEFT | INFO_ANCHOR_TOP }}, INFO_STRING_TIME_HH24, COLOR_WHITE, INFO_COL_PEEK, INFO_FONT_MEDIUM } },
+    { .text   = { { INFO_TYPE_TEXT,   {  0, 0, 2, .name = ":",   .anchor = 3, .anchor_flags = INFO_ANCHOR_RIGHT | INFO_ANCHOR_TOP, .anchor_flags_self = INFO_ANCHOR_LEFT | INFO_ANCHOR_TOP }}, ":", COLOR_WHITE, INFO_COL_PEEK, INFO_FONT_MEDIUM } },
+    { .string = { { INFO_TYPE_STRING, {  0, 0, 2, .name = "Min", .anchor = 4, .anchor_flags = INFO_ANCHOR_RIGHT | INFO_ANCHOR_TOP, .anchor_flags_self = INFO_ANCHOR_LEFT | INFO_ANCHOR_TOP }}, INFO_STRING_TIME_MM, COLOR_WHITE, INFO_COL_PEEK, INFO_FONT_MEDIUM } },
+   
+    /* entry 6, free space  (rightmost)*/
+    { .text   = { { INFO_TYPE_TEXT,   { -15, 5, 2, .name = "GB",       .anchor = 1, .anchor_flags = INFO_ANCHOR_RIGHT | INFO_ANCHOR_TOP, .anchor_flags_self = INFO_ANCHOR_RIGHT | INFO_ANCHOR_TOP }}, "GB", COLOR_WHITE, INFO_COL_PEEK, INFO_FONT_MEDIUM } },
+    { .string = { { INFO_TYPE_STRING, {  -2, 0, 2, .name = "Space GB", .anchor = 6, .anchor_flags = INFO_ANCHOR_LEFT | INFO_ANCHOR_TOP,  .anchor_flags_self = INFO_ANCHOR_RIGHT | INFO_ANCHOR_TOP }}, INFO_STRING_FREE_GB_FLOAT, COLOR_WHITE, INFO_COL_PEEK, INFO_FONT_MEDIUM } },
+   
+    /* entry 8, pictures */
+    { .string = { { INFO_TYPE_STRING, { -15, 0, 2, .name = "Pics", .anchor = 7, .anchor_flags = INFO_ANCHOR_LEFT | INFO_ANCHOR_TOP, .anchor_flags_self = INFO_ANCHOR_RIGHT | INFO_ANCHOR_TOP }}, INFO_STRING_PICTURES_AVAIL_AUTO, COLOR_WHITE, INFO_COL_PEEK, INFO_FONT_MEDIUM } },
+
+    /* entry 9, temperature */
+    { .text   = { { INFO_TYPE_TEXT,   { -15, 0, 2, .name = "°C",   .anchor = 8, .anchor_flags = INFO_ANCHOR_LEFT | INFO_ANCHOR_TOP, .anchor_flags_self = INFO_ANCHOR_RIGHT | INFO_ANCHOR_TOP }}, SYM_DEGREE"C", COLOR_WHITE, INFO_COL_PEEK, INFO_FONT_MEDIUM } },
+    { .string = { { INFO_TYPE_STRING, {  -2, 0, 2, .name = "Temp", .anchor = 9, .anchor_flags = INFO_ANCHOR_LEFT | INFO_ANCHOR_TOP, .anchor_flags_self = INFO_ANCHOR_RIGHT | INFO_ANCHOR_TOP }}, INFO_STRING_TEMPERATURE, COLOR_WHITE, INFO_COL_PEEK, INFO_FONT_MEDIUM } },
+
+   
+    /* fill bottom bar */
+   
+    /* entry 11, ISO */
+    { .string = { { INFO_TYPE_STRING, { -15, 5, 2, .name = "ISO",      .anchor = 2, .anchor_flags = INFO_ANCHOR_RIGHT | INFO_ANCHOR_TOP, .anchor_flags_self = INFO_ANCHOR_RIGHT | INFO_ANCHOR_TOP }}, INFO_STRING_ISO, COLOR_WHITE, INFO_COL_PEEK, INFO_FONT_MEDIUM } },
+    { .text   = { { INFO_TYPE_TEXT,   {  -2, 0, 2, .name = "ISO icon", .anchor = 11, .anchor_flags = INFO_ANCHOR_LEFT | INFO_ANCHOR_TOP, .anchor_flags_self = INFO_ANCHOR_RIGHT | INFO_ANCHOR_TOP }}, SYM_ISO, COLOR_WHITE, INFO_COL_PEEK, INFO_FONT_MEDIUM } },
+
+
     { .type = INFO_TYPE_END },
};

@@ -1190,7 +1221,14 @@
     {
         case INFO_STRING_ISO:
         {
-            snprintf(buffer, maxsize, "(ISO)");
+            if(lens_info.iso == 0)
+            {
+                snprintf(buffer, maxsize, "%d", lens_info.iso_auto);
+            }
+            else
+            {
+                snprintf(buffer, maxsize, "%d", lens_info.iso);
+            }
             break;
         }
         case INFO_STRING_ISO_MIN:
@@ -1508,6 +1546,11 @@
             snprintf(buffer, maxsize, "%d.%d", fsg, fsgf);
             break;
         }
+        case INFO_STRING_TEMPERATURE:
+        {
+            snprintf(buffer, maxsize, "%d", EFIC_CELSIUS);
+            break;
+        }

         /* empty string */
         case INFO_STRING_NONE:
@@ -2987,8 +3030,9 @@
     {
         if(info_config_dynamic[pos].hdr.status == INFO_STATUS_FREE)
         {
-            /* this empty entry will be the returned one */
+            /* this empty entry will be the returned one. set it to CONFIG type so it wont get handled */
             item = &info_config_dynamic[pos];
+            item->type = INFO_TYPE_CONFIG;
             item->hdr.status = INFO_STATUS_USED;
             item->hdr.config = info_config_dynamic;
             item->hdr.config_pos = pos;
diff -r b227e49bcedf src/flexinfo.h
--- a/src/flexinfo.h Sat Sep 28 23:59:18 2013 +0200
+++ b/src/flexinfo.h Sun Sep 29 00:57:41 2013 +0200
@@ -131,6 +131,7 @@
#define INFO_STRING_FREE_GB_INT          41
#define INFO_STRING_FREE_GB_FLOAT        42
#define INFO_STRING_KELVIN_ICO           43
+#define INFO_STRING_TEMPERATURE          44

#define INFO_FONT_SMALL         0
#define INFO_FONT_MEDIUM        1
@@ -228,5 +229,10 @@
     info_elem_dynamic_t dynamic;
};

+/* register a new element that is unconfigured by default. set it to the type you need it to be and care for it yourself */
+info_elem_t *info_add_item();
+/* unregister a previously registered element */
+void info_free_item(info_elem_t *item);
+
#endif
#endif

Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

jose_ugs

Thumbs up for that Histobar! Looks like something that makes the best out of a bunch of pixels in there...

a1ex

How do you define the histobar mathematically? and why not use a plain histogram?

stevefal

The histobar is meant as a simplification that strips away information that doesn't factor in (my) decision-making when using the histogram. The goal is a way to communicate only these essential facts, graphically, compactly and very plainly:

- DR of the camera (11 stops in the example)
- DR of the scene (7 stops in the example)
- range above and below the scene (empty boxes)
- highlight and shadow clipping

I'll take a crack at the math:

- The bar displays one box per stop of camera DR in the current mode:
       dual ISO = 13 or fewer, depending on settings
       optimal RAW = 11
       sub-optimal RAW < 11, depending on settings
       JPG, H.264 = 8
- If DR is non-integral, always round up. That box is not worth a full stop, but it does represent additional range.
- The user can configure bin threshold as % of pixels in a bin (B%). One threshold for all bins. Default is...1%?
- The user can configure clipping thresholds as % of pixels at min and max (C-lo%, C-hi%). Defaults are...1%?
- A box lights if B% of pixels are in that bin.
- Top/bottom boxes change red/blue if C-hi%.C-lo% pixels are at max/min.
- All boxes between the highest and lowest ON boxes are ON, regardless of empty bins in between. The span represents dynamic range.

Nice-to-haves:

- Add a "Histobar" flavor in Falscolor that uses blue and red at min and max, for consistent signals.
- Offer optional 1/2 and 1/3 stop bins - 2x and 3x as many boxes.

P.S. I envisioned it being rendered via two in-font symbols, a la □□□■■■■■. This way the same formatted string could be printed in different contexts, even different sizes, without the developer worrying much about layout. This goes along with the bar server idea I mentioned above.
Steve Falcon

CFP

I love that design and I think a histobar would be really nice!

Please implement it, if it's possible and not to much work. :D

g3gg0

thats the current state of the implementation with flexinfo.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

g3gg0

code committed - just go to line 104 in flexinfo.c and uncomment this

//#define i_want_to_test_flexinfo_bars 1

to be able to change colors of the fields, i added a new function.
some code (or module) can simply call:


extern info_elem_t *info_config_liveview;

/* get item TempBG which is a FILL element */
info_elem_t *item = info_get_by_name(info_config_liveview, "TempBG");
if(item)
{
    item->fill.color = COLOR_RED;
}
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

stevefal

I uncommented 104, but dumb question, how/where do I turn on Flexinfo? I don't find a way to see it.

Can you help me understand how flexinfo relates to the bars idea? Is flexinfo proposed as a replacement implementation of the current bars?

Are you interested in the status display server idea I mentioned above? Bar server discussion ideas:

- auto-layout as element list, a la Android LinearLayout
- element manager with config UI so user can turn on/off elements
- default element type = text. Alternate "owner-draw" type lets module draw in the element window
- modules post formatted text strings to server, server redraws only when necessary
- owner-draw elements notifie module of dirty element, for repaint
- server and layout code are totally decoupled from content - it's like a listbox widget
Steve Falcon

a1ex

Also apply this change, and the new bars will appear:

diff -r 136004f68e89 src/lens.c
--- a/src/lens.c Mon Sep 30 00:22:57 2013 +0200
+++ b/src/lens.c Mon Sep 30 08:14:34 2013 +0300
@@ -189,11 +189,7 @@
void
update_lens_display(int top, int bottom)
{
-    extern int menu_upside_down; // don't use double buffer in this mode
-    int double_buffering = !menu_upside_down && !is_canon_bottom_bar_dirty();
-
-    if (top) draw_ml_topbar(double_buffering, 1);
-    if (bottom) draw_ml_bottombar(double_buffering, 1);
+    info_print_screen();
}

int should_draw_bottom_bar()


+1 for all these points. If you ask me, I'd re-design flexinfo from scratch, with dynamic items only (no hardcoded items), automatic layout (no hard-coded xy coords, just some hints about item order) and a simplified menu interface (just on/off should be enough, but I wouldn't mind if there's a way to specify item order).

You can enable FEATURE_FLEXINFO_FULL (define it at the top of flexinfo.c) and you also get a menu (which is extremely configurable, but a bit overwhelming IMO - I highly doubt the user wants pixel-perfect control over each of the info items, and that's why I disabled it).

g3gg0

If you uncomment this line i said, it should print automatically.
maybe i missed to check in some .c file, sorry.

okay flexinfo would need some rewrite when we want to add different layout kinds.

the bars are intentionally fixed width, but anchored together.
when strings change their length, i wanted the others to position absolutely.
if you move one elements, the others move too - width is fixed
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

ItsMeLenny

I like that layout proposal, however I prefer the coloured numbers and such.

stevefal

Quote...I prefer the coloured numbers...

A few people have said this, so I want to clarify. Colored numbers are part of the proposal, but used sparingly. For example, I don't use dark green for happy numbers but do use yellow and red for sad numbers (glacier shot). This makes the alert conditions more noticeable since they are exceptions. Also, readability depends on contrast between foreground and background, so coloring should be designed carefully.
Steve Falcon