本文整理汇总了C#中Gtk.ModifyFg方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.ModifyFg方法的具体用法?C# Gtk.ModifyFg怎么用?C# Gtk.ModifyFg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk
的用法示例。
在下文中一共展示了Gtk.ModifyFg方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChangeColor
void ChangeColor (Gtk.Widget w)
{
w.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (69, 69, 94));
w.ModifyBg (Gtk.StateType.Active, new Gdk.Color (69, 69, 94));
w.ModifyFg (Gtk.StateType.Normal, new Gdk.Color (255, 255, 255));
w.ModifyFg (Gtk.StateType.Active, new Gdk.Color (255, 255, 255));
w.ModifyFg (Gtk.StateType.Prelight, new Gdk.Color (255, 255, 255));
Gtk.Container c = w as Gtk.Container;
if (c != null) {
foreach (Widget cw in c.Children)
ChangeColor (cw);
}
}
示例2: ModifyColors
public static void ModifyColors (Gtk.Widget widget)
{
try {
widget.ModifyFg (Gtk.StateType.Normal, widget.Style.TextColors [(int)Gtk.StateType.Normal]);
widget.ModifyFg (Gtk.StateType.Active, widget.Style.TextColors [(int)Gtk.StateType.Active]);
widget.ModifyFg (Gtk.StateType.Selected, widget.Style.TextColors [(int)Gtk.StateType.Selected]);
widget.ModifyBg (Gtk.StateType.Normal, widget.Style.BaseColors [(int)Gtk.StateType.Normal]);
widget.ModifyBg (Gtk.StateType.Active, widget.Style.BaseColors [(int)Gtk.StateType.Active]);
widget.ModifyBg (Gtk.StateType.Selected, widget.Style.BaseColors [(int)Gtk.StateType.Selected]);
} catch {
widget.ModifyFg (Gtk.StateType.Normal, widget.Style.Black);
widget.ModifyBg (Gtk.StateType.Normal, widget.Style.Black);
}
}
示例3: ColorsTestLabel
public static void ColorsTestLabel(Gtk.Label l)
{
l.ModifyFg(StateType.Active, UtilGtk.WHITE);
}
示例4: ColorsMenuLabel
public static void ColorsMenuLabel(Gtk.Label l)
{
l.ModifyFg(StateType.Active, UtilGtk.WHITE);
l.ModifyFg(StateType.Normal, UtilGtk.BLACK);
}
示例5: ChangeColor
void ChangeColor (Gtk.Widget w)
{
w.Realized += delegate {
w.ModifyText (StateType.Normal, Styles.BreadcrumbTextColor);
w.ModifyFg (StateType.Normal, Styles.BreadcrumbTextColor);
};
if (w is Gtk.Container) {
foreach (var c in ((Gtk.Container)w).Children)
ChangeColor (c);
}
}
示例6: set_foreground_color
public static void set_foreground_color(Gtk.Widget widget, Gdk.Color col)
{
widget.ModifyFg(StateType.Normal, col);
widget.ModifyFg(StateType.Active, col);
widget.ModifyFg(StateType.Insensitive, col);
widget.ModifyFg(StateType.Prelight, col);
widget.ModifyFg(StateType.Selected, col);
}
示例7: ChronopicColors
public static void ChronopicColors(Gtk.Viewport v, Gtk.Label l1, Gtk.Label l2, bool connected)
{
//if(! v.Style.Background(StateType.Normal).Equal(BLUE))
if(! v.Style.Background(StateType.Normal).Equal(v.Style.Background(StateType.Selected)))
chronopicViewportDefaultBg = v.Style.Background(StateType.Normal);
if(! l1.Style.Foreground(StateType.Normal).Equal(WHITE))
chronopicLabelsDefaultFg = l1.Style.Foreground(StateType.Normal);
if(connected) {
v.ModifyBg(StateType.Normal, chronopicViewportDefaultBg);
l1.ModifyFg(StateType.Normal, chronopicLabelsDefaultFg);
l2.ModifyFg(StateType.Normal, chronopicLabelsDefaultFg);
} else {
//v.ModifyBg(StateType.Normal, BLUE);
v.ModifyBg(StateType.Normal, v.Style.Background(StateType.Selected));
l1.ModifyFg(StateType.Normal, WHITE);
l2.ModifyFg(StateType.Normal, WHITE);
}
}
示例8: ColorsTestLabel
public static void ColorsTestLabel(Gtk.Viewport v, Gtk.Label l)
{
l.ModifyFg(StateType.Active, v.Style.Foreground(StateType.Selected));
l.ModifyFg(StateType.Prelight, v.Style.Foreground(StateType.Selected));
}
示例9: SetStyle
private void SetStyle (Gtk.Widget w)
{
w.ModifyFg (Gtk.StateType.Normal, new Gdk.Color (127, 127, 127));
w.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (0, 0, 0));
}