Changeset 1590
- Timestamp:
- 1/19/2010 2:43:39 AM (3 years ago)
- File:
-
- 1 edited
-
branches/eraser6/CodeReview/Eraser.Util/Theming.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/CodeReview/Eraser.Util/Theming.cs
r1584 r1590 57 57 public static void ApplyTheme(Control control) 58 58 { 59 if (control is ContainerControl) 60 ((ContainerControl)control).Font = SystemFonts.MessageBoxFont; 59 ContainerControl container = control as ContainerControl; 60 ButtonBase button = control as ButtonBase; 61 ListView listview = control as ListView; 62 ToolStrip toolstrip = control as ToolStrip; 63 64 if (container != null) 65 container.Font = SystemFonts.MessageBoxFont; 61 66 else if (control.Font != SystemFonts.MessageBoxFont) 62 67 control.Font = new Font(SystemFonts.MessageBoxFont.FontFamily, 63 68 control.Font.Size, control.Font.Style); 64 69 65 if ( control is ButtonBase)66 ApplyTheme( (ButtonBase)control);67 else if ( control is ListView)68 ApplyTheme( (ListView)control);69 else if ( control is ToolStrip)70 ApplyTheme( (ToolStrip)control);70 if (button != null) 71 ApplyTheme(button); 72 else if (listview != null) 73 ApplyTheme(listview); 74 else if (toolstrip != null) 75 ApplyTheme(toolstrip); 71 76 72 77 if (control.ContextMenuStrip != null)
Note: See TracChangeset
for help on using the changeset viewer.
