* '''middle-drag or Ctrl-left-drag horizontally''': pan left or right
* '''right-drag horizontally''': [[#Zoom region|zoom region]]
* '''click on a colored bar''': the associated process node is selected and the current time indicator is moved where the click happened
-* '''mouse wheel up/down''': zoom in or out
+* '''mouse wheel up/down''': scroll up or down
+* '''Ctrl-mouse wheel up/down''': zoom in or out
* '''drag the time ruler horizontally''': zoom in or out with fixed start time
* '''double-click the time ruler''': reset zoom to full range
if (p.x >= 0 && p.x < parentSize.x && p.y >= 0 && p.y < parentSize.y) {
// over the parent control
if (e.x > getCtrlSize().x) {
- // over the horizontal scroll bar
+ // over the vertical scroll bar
zoomScroll = false;
- } else if (e.y >= 0 && e.y < getCtrlSize().y && e.x < fTimeProvider.getNameSpace()) {
- // over the name space
- zoomScroll = false;
- } else {
+ } else if (e.y < 0 || e.y >= getCtrlSize().y) {
+ // over the time scale or horizontal scroll bar
zoomScroll = true;
+ } else {
+ if (e.x < fTimeProvider.getNameSpace()) {
+ // over the name space
+ zoomScroll = false;
+ } else {
+ // over the state area
+ if ((e.stateMask & SWT.MODIFIER_MASK) == SWT.CTRL) {
+ // over the state area, CTRL pressed
+ zoomScroll = true;
+ } else {
+ // over the state area, CTRL not pressed
+ zoomScroll = false;
+ }
+ }
}
}
if (zoomScroll && fTimeProvider.getTime0() != fTimeProvider.getTime1()) {