summaryrefslogtreecommitdiff
path: root/gtk2_ardour/option_editor.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-06-06 18:30:38 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2019-06-06 18:32:13 -0600
commit5eba2c92edaf680ff06efdd9956be622fe8d0e50 (patch)
tree63c732f0d4372288297ffc85edc05e2f452eb215 /gtk2_ardour/option_editor.cc
parent2a38833fca063b45915f7068581a447b4a96ef7f (diff)
width of sliders in the option editor is now a fixed text-relative width
Diffstat (limited to 'gtk2_ardour/option_editor.cc')
-rw-r--r--gtk2_ardour/option_editor.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc
index 9cf4920121..e76be3b7b1 100644
--- a/gtk2_ardour/option_editor.cc
+++ b/gtk2_ardour/option_editor.cc
@@ -383,6 +383,13 @@ HSliderOption::HSliderOption (
_adj.set_value (_get());
_adj.signal_value_changed().connect (sigc::mem_fun (*this, &HSliderOption::changed));
_hscale.set_update_policy (Gtk::UPDATE_DISCONTINUOUS);
+
+ /* make the slider be a fixed, font-relative width */
+
+ _hscale.ensure_style ();
+ int width, height;
+ get_pixel_size (_hscale.create_pango_layout (X_("a long piece of text that is about as wide as we want sliders to be")), width, height);
+ _hscale.set_size_request (width, -1);
}
void