diff --git a/MUNGA_L4/L4MFDVIEW.cpp b/MUNGA_L4/L4MFDVIEW.cpp index f40d289..13d2d52 100644 --- a/MUNGA_L4/L4MFDVIEW.cpp +++ b/MUNGA_L4/L4MFDVIEW.cpp @@ -251,17 +251,19 @@ void if (button_style == MFDStrips) { //----------------------------------------------------------- - // 4 buttons above the glass, 4 below; RIO addresses descend - // from the anchor, row-major (vRIO CockpitLayout::Mfd). + // 4 buttons above the glass, 4 below, flush to the pane + // edges (no border against the viewscreen behind); RIO + // addresses descend from the anchor, row-major (vRIO + // CockpitLayout::Mfd). //----------------------------------------------------------- int strip_h = display_height / 8; if (strip_h < 18) strip_h = 18; if (strip_h > 40) strip_h = 40; - int button_w = (display_width - 5 * buttonGap) / 4; + int button_w = (display_width - 3 * buttonGap) / 4; - displayY = strip_h + 2 * buttonGap; - *client_height = display_height + 2 * (strip_h + 2 * buttonGap); + displayY = strip_h; + *client_height = display_height + 2 * strip_h; for (int i = 0; i < 8; ++i) { @@ -271,9 +273,11 @@ void ScreenButton *button = &buttons[buttonCount++]; button->unit = anchorA - i; button->amber = 0; - button->x = buttonGap + col * (button_w + buttonGap); - button->y = row ? (displayY + displayH + buttonGap) : buttonGap; - button->w = button_w; + button->x = col * (button_w + buttonGap); + button->y = row ? (displayY + displayH) : 0; + button->w = (col == 3) + ? (display_width - 3 * (button_w + buttonGap)) + : button_w; button->h = strip_h; } } @@ -281,9 +285,10 @@ void { //----------------------------------------------------------- // 6 buttons down each side of the glass, stacked contiguous - // like the pod's strips (the pod wires only 6 of each - // column's 8 addresses to buttons; the rest are Tesla - // relays). Left = anchorA ascending, right = anchorB. + // and flush to the pane edges, like the pod's strips (the + // pod wires only 6 of each column's 8 addresses to buttons; + // the rest are Tesla relays). Left = anchorA ascending, + // right = anchorB. //----------------------------------------------------------- int col_w = display_width / 8; if (col_w < 20) col_w = 20; @@ -291,26 +296,28 @@ void int button_h = display_height / 6; - displayX = col_w + 2 * buttonGap; - *client_width = display_width + 2 * (col_w + 2 * buttonGap); + displayX = col_w; + *client_width = display_width + 2 * col_w; for (int i = 0; i < 6; ++i) { + int h = (i == 5) ? (display_height - 5 * button_h) : button_h; + ScreenButton *left = &buttons[buttonCount++]; left->unit = anchorA + i; left->amber = 1; - left->x = buttonGap; + left->x = 0; left->y = i * button_h; left->w = col_w; - left->h = button_h; + left->h = h; ScreenButton *right = &buttons[buttonCount++]; right->unit = anchorB + i; right->amber = 1; - right->x = displayX + displayW + buttonGap; + right->x = displayX + displayW; right->y = left->y; right->w = col_w; - right->h = button_h; + right->h = h; } } }