- Timestamp:
- 03/22/10 13:40:32 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/OperatorShape.cs
r2935 r3169 35 35 private static int LABEL_WIDTH = 180; 36 36 private static int LABEL_SPACING = 3; 37 private static int HEADER_HEIGHT= 30;37 private int headerHeight = 30; 38 38 39 39 private ExpandableIconMaterial expandIconMaterial; … … 168 168 private Size CalculateSize() { 169 169 int width = this.Rectangle.Width; 170 int height = HEADER_HEIGHT;170 int height = headerHeight; 171 171 if (!Collapsed) 172 172 height += this.labels.Count * (LABEL_HEIGHT + LABEL_SPACING); … … 189 189 190 190 //the initial size 191 this.Transform(0, 0, 200, HEADER_HEIGHT);191 this.Transform(0, 0, 200, headerHeight); 192 192 this.color = Color.LightBlue; 193 193 … … 218 218 g.SmoothingMode = SmoothingMode.HighQuality; 219 219 220 Pen pen = new Pen(lineColor,lineWidth); 220 Pen pen = new Pen(lineColor, lineWidth); 221 222 SizeF titleSize = g.MeasureString(this.Title, ArtPalette.DefaultBoldFont, Rectangle.Width - 45); 223 if (titleSize.Height + 10 > Rectangle.Height) { 224 headerHeight = (int)titleSize.Height + 10; 225 mRectangle.Height = headerHeight; 226 } 221 227 222 228 GraphicsPath path = new GraphicsPath(); … … 251 257 252 258 for (int i = 0; i < this.labels.Count; i++) { 253 rect = new Rectangle(Rectangle.X + 25, Rectangle.Y + HEADER_HEIGHT+ i * (LABEL_HEIGHT + LABEL_SPACING), LABEL_WIDTH, LABEL_HEIGHT);259 rect = new Rectangle(Rectangle.X + 25, Rectangle.Y + headerHeight + i * (LABEL_HEIGHT + LABEL_SPACING), LABEL_WIDTH, LABEL_HEIGHT); 254 260 g.DrawString(textStyle.GetFormattedText(this.labels[i]), textStyle.Font, textStyle.GetBrush(), rect, stringFormat); 255 261 } … … 260 266 261 267 //the title 262 g.DrawString(this.Title, ArtPalette.DefaultBoldFont, Brushes.Black, new Rectangle(Rectangle.X + 25, Rectangle.Y + 5, Rectangle.Width - 45, 27)); 268 g.DrawString(this.Title, ArtPalette.DefaultBoldFont, Brushes.Black, new Rectangle(Rectangle.X + 25, Rectangle.Y + 5, Rectangle.Width - 45, Rectangle.Height - 5)); 269 263 270 264 271 //the material
Note: See TracChangeset
for help on using the changeset viewer.