mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Improve GUI HiDPI support
* scale default track heights * scale region-gain, automation lane control points * scale max. MIDI note lane height
This commit is contained in:
parent
0b055ad66e
commit
97fe05e4de
3 changed files with 14 additions and 7 deletions
|
|
@ -81,6 +81,7 @@ using namespace ArdourWidgets;
|
|||
using Gtkmm2ext::Keyboard;
|
||||
|
||||
#define TOP_LEVEL_WIDGET controls_ebox
|
||||
#define PX_SCALE(px) std::max((float)px, rintf((float)px * UIConfiguration::instance().get_ui_scale()))
|
||||
|
||||
const double trim_handle_size = 6.0; /* pixels */
|
||||
uint32_t TimeAxisView::button_height = 0;
|
||||
|
|
@ -1325,11 +1326,11 @@ TimeAxisView::preset_height (Height h)
|
|||
{
|
||||
switch (h) {
|
||||
case HeightLargest:
|
||||
return (button_height * 2) + extra_height + 260;
|
||||
return (button_height * 2) + extra_height + PX_SCALE (260);
|
||||
case HeightLarger:
|
||||
return (button_height * 2) + extra_height + 160;
|
||||
return (button_height * 2) + extra_height + PX_SCALE (160);
|
||||
case HeightLarge:
|
||||
return (button_height * 2) + extra_height + 60;
|
||||
return (button_height * 2) + extra_height + PX_SCALE (60);
|
||||
case HeightNormal:
|
||||
return (button_height * 2) + extra_height + 10;
|
||||
case HeightSmall:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue