#include "tooltips.h"
#include "ui_config.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
#define BASELINESTRETCH (1.25)
#define TRACKHEADERBTNW (3.10)
}
//show the "convex" or "concave" gradient
- if (!_flat_buttons) {
+ if (!_flat_buttons && (_elements & Body)==Body) {
if ( active_state() == Gtkmm2ext::ExplicitActive && ( !((_elements & Indicator)==Indicator) || use_custom_led_color) ) {
//concave
cairo_set_source (cr, concave_pattern);
}
}
- if ((_elements & Text) && !_text.empty()) {
- // if _layout does not exist, char_pixel_height() creates it,
- req->height = std::max(req->height, (int) ceil(char_pixel_height() * BASELINESTRETCH + 1.0));
- assert (_layout);
- _layout->get_pixel_size (_text_width, _text_height);
+ if (_elements & Text) {
+
+ if (_tweaks & OccasionalText) {
- req->width += rint(1.75 * char_pixel_width()); // padding
- req->width += _text_width;
+ /* size should not change based on presence or absence
+ * of text.
+ */
+
+ if (!_text.empty()) {
+ ensure_layout ();
+ _layout->set_text (_text);
+ _layout->get_pixel_size (_text_width, _text_height);
+ }
+
+ } else if (!_text.empty()) {
+
+ //if _layout does not exist, char_pixel_height() creates it,
+
+ req->height = std::max(req->height, (int) ceil(char_pixel_height() * BASELINESTRETCH + 1.0));
+ assert (_layout);
+ _layout->get_pixel_size (_text_width, _text_height);
+ req->width += rint(1.75 * char_pixel_width()); // padding
+ req->width += _text_width;
+ }
/* XXX hack (surprise). Deal with two common rotation angles */