projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ab052d0
)
left/right align mixer-strips
author
Robin Gareus
<robin@gareus.org>
Mon, 30 Jan 2017 10:46:55 +0000
(11:46 +0100)
committer
Robin Gareus
<robin@gareus.org>
Mon, 30 Jan 2017 10:47:06 +0000
(11:47 +0100)
gtk2_ardour/mixer_ui.cc
patch
|
blob
|
history
diff --git
a/gtk2_ardour/mixer_ui.cc
b/gtk2_ardour/mixer_ui.cc
index 3ea5b069f70f01640b9483be0313d076a5110d4c..59507b7ffcb4b2bbb6168434da7772b5a374d0f9 100644
(file)
--- a/
gtk2_ardour/mixer_ui.cc
+++ b/
gtk2_ardour/mixer_ui.cc
@@
-1601,13
+1601,11
@@
Mixer_UI::move_stripable_into_view (boost::shared_ptr<ARDOUR::Stripable> s)
Adjustment* adj = scroller.get_hscrollbar()->get_adjustment();
Adjustment* adj = scroller.get_hscrollbar()->get_adjustment();
- if ((x0 < adj->get_value()) || (x0 + alloc.get_width()) >= (adj->get_value() + adj->get_page_size())) {
- /* try to put left edge of strip in the middle */
- double half_page = adj->get_page_size() / 2.0;
- if (x0 >= half_page) {
- x0 -= half_page;
- }
+ if (x0 < adj->get_value()) {
adj->set_value (max (adj->get_lower(), min (adj->get_upper(), (double) x0)));
adj->set_value (max (adj->get_lower(), min (adj->get_upper(), (double) x0)));
+ } else if (x0 + alloc.get_width() >= adj->get_value() + adj->get_page_size()) {
+ int x1 = x0 + alloc.get_width() - adj->get_page_size();
+ adj->set_value (max (adj->get_lower(), min (adj->get_upper(), (double) x1)));
}
}
}
}