The main change is the header hight being not included in y1.
This is important if a sub-manager gets resized, e.g. a resize while
editing the Settings or in a pickFromVector selection, and afterwards,
then the sub-manager is closed, the super-ScreenManager gets resized, it
uses the correct header hight.
The header hight might have been changed since the last resize of the
super-manager in the Settings by adding/removing some meters.
This fixes new meters being hidden after added at runtime after a resize
in the main window.
Draw the FunctionBar within Panel_draw instead of manually throughout
the code.
Add an optional PanelClass function drawFunctionBar, to allow specific
panels to override the default FunctionBar_draw call.
Rework the code on color change, to really change all colors (selection
markers and panel headers).
Closes: #402
Reasoning:
- implementation was unsound -- broke down when I added a fairly
basic macro definition expanding to a struct initializer in a *.c
file.
- made it way too easy (e.g. via otherwise totally innocuous git
commands) to end up with timestamps such that it always ran
MakeHeader.py but never used its output, leading to overbuild noise
when running what should be a null 'make'.
- but mostly: it's just an awkward way of dealing with C code.
GCC 7.x does some extended checks on fallthough for switch/case
statement. The warning looks like this:
warning: this statement may fall through [-Wimplicit-fallthrough=]
It can be told about implicit fallthough, however it does not
recognize comments within blocks, so move the comments outside.
Before:
SpaceStyle EnterMove DelDeleteEscDone |
~~~~~ ~~~~~ ~~~ ~~~ |
UpUp DnDown LtLeft RtRight EnterConfirmDelDeleteEscDone |
~~ ~~ ~~ ~~ ~~~~~ ~~~ ~~~ |
After:
SpaceStyle EnterMove DelDeleteF10Done
~~~~~ ~~~~~ ~~ ~~~ ~~~
SpaceStyle EnterLock UpUp DnDown <-Left ->Right DelDeleteF10Done
~~~~~ ~~~~~ ~~ ~~ ~~ ~~ ~~ ~~~ ~~~
* Align 'Delete' and 'Done' to the right to match functions on other
screens. (Accidental clicking is avoided as a side benefit.)
* You could change meter type while in moving mode. New bar now hints
this.
* Two Enter key functions are put in the same place and so mouse clicks
there act like functions toggle. (The wording change to 'Lock' is
also to reflect this.)
* '<-' and '->' instead of 'Lt' and 'Rt' abbreviation as the latter is
not widely seen and arrows shapes are obvious. :)
* 'Esc' key for 'Done' in this context may not be intuitive, comparing
to 'F10'. While I wish there be a Cancel/Undo function for 'Esc', it
wouldn't hurt if we write 'F10' for 'Done' on functions bar for now.