1 bug fix plus padding control for ArdourButton
This commit is contained in:
parent
be8d06f848
commit
4091ff175c
@ -78,6 +78,8 @@ ArdourButton::ArdourButton (Element e)
|
||||
, _fixed_diameter (true)
|
||||
, _distinct_led_click (false)
|
||||
, _hovering (false)
|
||||
, _xpad_request (0)
|
||||
, _ypad_request (0)
|
||||
{
|
||||
ColorsChanged.connect (sigc::mem_fun (*this, &ArdourButton::color_handler));
|
||||
}
|
||||
@ -162,7 +164,7 @@ ArdourButton::set_markup (const std::string& str)
|
||||
_layout = Pango::Layout::create (get_pango_context());
|
||||
}
|
||||
|
||||
_layout->set_text (str);
|
||||
_layout->set_markup (str);
|
||||
queue_resize ();
|
||||
}
|
||||
|
||||
@ -431,11 +433,20 @@ ArdourButton::set_corner_radius (float r)
|
||||
set_dirty ();
|
||||
}
|
||||
|
||||
void
|
||||
ArdourButton::set_padding (int x, int y)
|
||||
{
|
||||
_xpad_request = x;
|
||||
_ypad_request = y;
|
||||
|
||||
queue_resize ();
|
||||
}
|
||||
|
||||
void
|
||||
ArdourButton::on_size_request (Gtk::Requisition* req)
|
||||
{
|
||||
int xpad = 0;
|
||||
int ypad = 6;
|
||||
int xpad = 0 + _xpad_request;
|
||||
int ypad = 6 + _ypad_request;
|
||||
|
||||
CairoWidget::on_size_request (req);
|
||||
|
||||
|
@ -71,6 +71,8 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
|
||||
void set_rounded_corner_mask (int);
|
||||
void set_diameter (float);
|
||||
|
||||
void set_padding (int x, int y);
|
||||
|
||||
void set_text (const std::string&);
|
||||
void set_markup (const std::string&);
|
||||
void set_angle (const double);
|
||||
@ -157,6 +159,9 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
|
||||
bool _distinct_led_click;
|
||||
bool _hovering;
|
||||
|
||||
int _xpad_request;
|
||||
int _ypad_request;
|
||||
|
||||
static bool _flat_buttons;
|
||||
|
||||
void setup_led_rect ();
|
||||
|
Loading…
Reference in New Issue
Block a user