mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 17:16:38 +01:00
RTA: update min window-size with scale to allow for more dB labels
This commit is contained in:
parent
635fcdc206
commit
3b8dcdcc9e
2 changed files with 6 additions and 4 deletions
|
|
@ -119,10 +119,12 @@ RTAWindow::on_theme_changed ()
|
||||||
_gridc = UIConfiguration::instance ().color (X_("gtk_background"));
|
_gridc = UIConfiguration::instance ().color (X_("gtk_background"));
|
||||||
_textc = UIConfiguration::instance ().color (X_("gtk_foreground"));
|
_textc = UIConfiguration::instance ().color (X_("gtk_foreground"));
|
||||||
|
|
||||||
_margin = 2 * ceilf (10.f * UIConfiguration::instance ().get_ui_scale ());
|
_margin = 2 * ceilf (10.f * UIConfiguration::instance ().get_ui_scale ());
|
||||||
|
_uiscale = std::max<float> (1.f, sqrtf (UIConfiguration::instance ().get_ui_scale ()));
|
||||||
|
|
||||||
_grid.clear ();
|
_grid.clear ();
|
||||||
_xpos.clear ();
|
_xpos.clear ();
|
||||||
|
_darea.queue_resize ();
|
||||||
_darea.queue_draw ();
|
_darea.queue_draw ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -381,7 +383,6 @@ RTAWindow::darea_motion_notify_event (GdkEventMotion* ev)
|
||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
_grid.clear ();
|
_grid.clear ();
|
||||||
_xpos.clear ();
|
|
||||||
_darea.queue_draw ();
|
_darea.queue_draw ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -474,7 +475,7 @@ RTAWindow::darea_size_allocate (Gtk::Allocation&)
|
||||||
void
|
void
|
||||||
RTAWindow::darea_size_request (Gtk::Requisition* req)
|
RTAWindow::darea_size_request (Gtk::Requisition* req)
|
||||||
{
|
{
|
||||||
req->width = 512 + 2 * _margin;
|
req->width = 512 *_uiscale + 2 * _margin;
|
||||||
req->height = req->width * 9 / 17;
|
req->height = req->width * 9 / 17;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -577,7 +578,7 @@ RTAWindow::darea_expose_event (GdkEventExpose* ev)
|
||||||
dashes2.push_back (2.0);
|
dashes2.push_back (2.0);
|
||||||
|
|
||||||
for (int dB = min_dB; dB <= max_dB; ++dB) {
|
for (int dB = min_dB; dB <= max_dB; ++dB) {
|
||||||
bool lbl = 0 == (dB % 18);
|
bool lbl = 0 == (dB % 12);
|
||||||
if (dB % 6 != 0) {
|
if (dB % 6 != 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@ private:
|
||||||
Gtkmm2ext::Color _gridc;
|
Gtkmm2ext::Color _gridc;
|
||||||
Gtkmm2ext::Color _textc;
|
Gtkmm2ext::Color _textc;
|
||||||
int _margin;
|
int _margin;
|
||||||
|
float _uiscale;
|
||||||
int _min_dB;
|
int _min_dB;
|
||||||
int _max_dB;
|
int _max_dB;
|
||||||
bool _hovering_dB;
|
bool _hovering_dB;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue