Changeset 7255 for branches/RegressionBenchmarks/HeuristicLab.Operators.Views.GraphVisualization.Views/3.3/OperatorShape.cs
- Timestamp:
- 01/02/12 11:40:31 (12 years ago)
- Location:
- branches/RegressionBenchmarks
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RegressionBenchmarks
-
branches/RegressionBenchmarks/HeuristicLab.Operators.Views.GraphVisualization.Views/3.3/OperatorShape.cs
r6036 r7255 78 78 set { title = value; } 79 79 } 80 81 public string TypeName { get; set; } 80 82 81 83 private IconMaterial iconMaterial; … … 219 221 220 222 SizeF titleSize = g.MeasureString(this.Title, ArtPalette.DefaultBoldFont, Rectangle.Width - 45); 221 if (titleSize.Height + 10 > Rectangle.Height) { 222 headerHeight = (int)titleSize.Height + 10; 223 titleSize.Height += 10; //add spacing 224 SizeF typeNameSize = g.MeasureString(this.TypeName, ArtPalette.DefaultFont, Rectangle.Width - 45); 225 typeNameSize.Height += 10; //add spacing 226 if (this.Title == this.TypeName) typeNameSize = new SizeF(0, 0); 227 228 if (titleSize.Height + typeNameSize.Height > Rectangle.Height) { 229 headerHeight = (int)titleSize.Height + (int)typeNameSize.Height; 223 230 this.UpdateLabels(); 224 231 } … … 264 271 265 272 //the title 266 g.DrawString(this.Title, ArtPalette.DefaultBoldFont, Brushes.Black, new Rectangle(Rectangle.X + 25, Rectangle.Y + 5, Rectangle.Width - 45, Rectangle.Height - 5)); 273 g.DrawString(this.Title, ArtPalette.DefaultBoldFont, Brushes.Black, 274 new Rectangle(Rectangle.X + 25, Rectangle.Y + 5, 275 Rectangle.Width - 45, Rectangle.Height - 5 - (int)typeNameSize.Height)); 276 277 //the typeName 278 if (this.Title != this.TypeName) { 279 g.DrawString(this.TypeName, ArtPalette.DefaultFont, Brushes.Black, 280 new Rectangle(Rectangle.X + 25, Rectangle.Y + (int)titleSize.Height, 281 Rectangle.Width - 45, Rectangle.Height - 5)); 282 } 267 283 268 284
Note: See TracChangeset
for help on using the changeset viewer.