}
const int text_margin = char_pixel_width();
-
// Text, if any
if (!_pixbuf && ((_elements & Text)==Text) && !_text.empty()) {
assert(_layout);
printf("%s: f:%dx%d bh:%.0f tw:%d (%dx%d) %s\"%s\"\n",
get_name().c_str(),
char_pixel_width(), char_pixel_height(),
- ceil(_text_height * BASELINESTRETCH),
+ ceil(char_pixel_height() * BASELINESTRETCH),
_text_width,
get_width(), get_height(),
layout_font ? "L:" : "W:",
_text_height = char_pixel_height ();
// if _layout does not exist, char_pixel_height() creates it,
_layout->get_pixel_size (_text_width, ignored);
- req->width += rint(1.6 * char_pixel_width()); // padding
+ req->width += rint(1.75 * char_pixel_width()); // padding
req->width += _text_width;
req->height = std::max(req->height, (int) ceil(_text_height * BASELINESTRETCH + 1.0));
} else {
if (_elements & (RecButton | CloseCross)) {
assert(!(_elements & Text));
- const int wh = std::max(char_pixel_width(), char_pixel_height()) * BASELINESTRETCH;
+ const int wh = std::max(3.5 * char_pixel_width(), ceil(char_pixel_height() * BASELINESTRETCH + 1));
req->width += wh;
- req->height = std::max(req->height, (int) wh);
+ req->height = std::max(req->height, wh);
}
if (_tweaks & Square) {
{
if (_tweaks != t) {
_tweaks = t;
- CairoWidget::set_dirty ();
+ if (is_realized()) {
+ queue_resize ();
+ }
}
}