GenericUI: rationalize Autostate button sizing
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Tue, 29 Aug 2017 09:25:38 +0000 (11:25 +0200)
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Tue, 29 Aug 2017 10:06:33 +0000 (12:06 +0200)
commit1b561446b8c4c0f1b682ec04cb44c5f53672c5fc
tree5f31144d12faebf275468b4b43ce7d88b3ff2f83
parentd4c211ef6fd7ea823963f003ec18b22c4ea39582
GenericUI: rationalize Autostate button sizing

When there was a knobtable in the ControlUI, the behavior of the
automation state button changed by displaying one-char state as in track
headers. Factor out that logic to depend on a new boolean property of
the ControlUI, which should be set with set_short_autostate().

This regroups sizing logic in a single place and avoids future
discrepancies between the actual caption and the size allocated for it,
when several use-cases for smaller buttons are added.
gtk2_ardour/generic_pluginui.cc
gtk2_ardour/plugin_ui.h