Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9921


Ignore:
Timestamp:
09/02/13 13:38:07 (11 years ago)
Author:
ascheibe
Message:

#2100 improved handling of position of help label

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.cs

    r9920 r9921  
    104104          configurationLabel.Enabled = activeView != null && !activeView.Locked;
    105105
    106           if (activeView != null && ViewAttribute.HasHelpResourcePath(activeView.GetType())) {
    107             if (configurationLabel.Visible) {
    108               helpLabel.Top = 44;
    109             } else {
    110               helpLabel.Top = 22;
    111             }
    112             helpLabel.Visible = true;
    113           } else {
    114             helpLabel.Visible = false;
    115             helpLabel.Top = 44;
    116           }
     106          helpLabel.Visible = activeView != null && ViewAttribute.HasHelpResourcePath(activeView.GetType());
     107          helpLabel.Top = CalculateHelpLabelPosY();
    117108        }
    118109      }
     
    222213      viewsLabel.Location = new Point(Width - viewsLabel.Margin.Right - viewsLabel.Width, viewsLabel.Margin.Top);
    223214      configurationLabel.Location = new Point(Width - configurationLabel.Margin.Right - configurationLabel.Width, viewsLabel.Bottom + viewsLabel.Margin.Bottom + configurationLabel.Margin.Top);
    224 
     215      helpLabel.Location = new Point(Width - helpLabel.Margin.Right - helpLabel.Width, CalculateHelpLabelPosY());
     216    }
     217
     218    private int CalculateHelpLabelPosY() {
     219      if (activeView != null && ViewAttribute.HasHelpResourcePath(activeView.GetType()) && !configurationLabel.Visible) {
     220        return configurationLabel.Top;
     221      }
     222      return configurationLabel.Bottom + configurationLabel.Margin.Bottom + helpLabel.Margin.Top;
    225223    }
    226224
Note: See TracChangeset for help on using the changeset viewer.