本文整理汇总了C#中EventBox.ModifyFg方法的典型用法代码示例。如果您正苦于以下问题:C# EventBox.ModifyFg方法的具体用法?C# EventBox.ModifyFg怎么用?C# EventBox.ModifyFg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventBox
的用法示例。
在下文中一共展示了EventBox.ModifyFg方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Build
void Build ()
{
BorderWidth = 0;
WidthRequest = 901;
HeightRequest = 632;
Name = "wizard_dialog";
Title = GettextCatalog.GetString ("New Project");
WindowPosition = WindowPosition.CenterOnParent;
TransientFor = IdeApp.Workbench.RootWindow;
projectConfigurationWidget = new GtkProjectConfigurationWidget ();
projectConfigurationWidget.Name = "projectConfigurationWidget";
// Top banner of dialog.
var topLabelEventBox = new EventBox ();
topLabelEventBox.Name = "topLabelEventBox";
topLabelEventBox.HeightRequest = 52;
topLabelEventBox.ModifyBg (StateType.Normal, bannerBackgroundColor);
topLabelEventBox.ModifyFg (StateType.Normal, whiteColor);
topLabelEventBox.BorderWidth = 0;
var topBannerTopEdgeLineEventBox = new EventBox ();
topBannerTopEdgeLineEventBox.Name = "topBannerTopEdgeLineEventBox";
topBannerTopEdgeLineEventBox.HeightRequest = 1;
topBannerTopEdgeLineEventBox.ModifyBg (StateType.Normal, bannerLineColor);
topBannerTopEdgeLineEventBox.BorderWidth = 0;
var topBannerBottomEdgeLineEventBox = new EventBox ();
topBannerBottomEdgeLineEventBox.Name = "topBannerBottomEdgeLineEventBox";
topBannerBottomEdgeLineEventBox.HeightRequest = 1;
topBannerBottomEdgeLineEventBox.ModifyBg (StateType.Normal, bannerLineColor);
topBannerBottomEdgeLineEventBox.BorderWidth = 0;
topBannerLabel = new Label ();
topBannerLabel.Name = "topBannerLabel";
Pango.FontDescription font = topBannerLabel.Style.FontDescription.Copy (); // UNDONE: VV: Use FontService?
font.Size = (int)(font.Size * 1.8);
topBannerLabel.ModifyFont (font);
topBannerLabel.ModifyFg (StateType.Normal, whiteColor);
var topLabelHBox = new HBox ();
topLabelHBox.Name = "topLabelHBox";
topLabelHBox.PackStart (topBannerLabel, false, false, 20);
topLabelEventBox.Add (topLabelHBox);
VBox.PackStart (topBannerTopEdgeLineEventBox, false, false, 0);
VBox.PackStart (topLabelEventBox, false, false, 0);
VBox.PackStart (topBannerBottomEdgeLineEventBox, false, false, 0);
// Main templates section.
centreVBox = new VBox ();
centreVBox.Name = "centreVBox";
VBox.PackStart (centreVBox, true, true, 0);
templatesHBox = new HBox ();
templatesHBox.Name = "templatesHBox";
centreVBox.PackEnd (templatesHBox, true, true, 0);
// Template categories.
var templateCategoriesBgBox = new EventBox ();
templateCategoriesBgBox.Name = "templateCategoriesVBox";
templateCategoriesBgBox.BorderWidth = 0;
templateCategoriesBgBox.ModifyBg (StateType.Normal, categoriesBackgroundColor);
templateCategoriesBgBox.WidthRequest = 220;
var templateCategoriesScrolledWindow = new ScrolledWindow ();
templateCategoriesScrolledWindow.Name = "templateCategoriesScrolledWindow";
templateCategoriesScrolledWindow.HscrollbarPolicy = PolicyType.Never;
// Template categories tree view.
templateCategoriesTreeView = new TreeView ();
templateCategoriesTreeView.Name = "templateCategoriesTreeView";
templateCategoriesTreeView.BorderWidth = 0;
templateCategoriesTreeView.HeadersVisible = false;
templateCategoriesTreeView.Model = templateCategoriesListStore;
templateCategoriesTreeView.SearchColumn = -1; // disable the interactive search
templateCategoriesTreeView.AppendColumn (CreateTemplateCategoriesTreeViewColumn ());
templateCategoriesScrolledWindow.Add (templateCategoriesTreeView);
templateCategoriesBgBox.Add (templateCategoriesScrolledWindow);
templatesHBox.PackStart (templateCategoriesBgBox, false, false, 0);
// Templates.
var templatesBgBox = new EventBox ();
templatesBgBox.ModifyBg (StateType.Normal, templateListBackgroundColor);
templatesBgBox.Name = "templatesVBox";
templatesBgBox.WidthRequest = 400;
templatesHBox.PackStart (templatesBgBox, false, false, 0);
var templatesScrolledWindow = new ScrolledWindow ();
templatesScrolledWindow.Name = "templatesScrolledWindow";
templatesScrolledWindow.HscrollbarPolicy = PolicyType.Never;
// Templates tree view.
templatesTreeView = new TreeView ();
templatesTreeView.Name = "templatesTreeView";
templatesTreeView.HeadersVisible = false;
templatesTreeView.Model = templatesListStore;
templatesTreeView.SearchColumn = -1; // disable the interactive search
templatesTreeView.AppendColumn (CreateTemplateListTreeViewColumn ());
templatesScrolledWindow.Add (templatesTreeView);
templatesBgBox.Add (templatesScrolledWindow);
// Template
//.........这里部分代码省略.........