本文整理汇总了C#中Gtk.ModifyBg方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.ModifyBg方法的具体用法?C# Gtk.ModifyBg怎么用?C# Gtk.ModifyBg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk
的用法示例。
在下文中一共展示了Gtk.ModifyBg方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: ColorsRadio
public static void ColorsRadio(Gtk.RadioButton r)
{
r.ModifyBg(StateType.Normal, WHITE);
r.ModifyBg(StateType.Active, BLUE);
r.ModifyBg(StateType.Prelight, BLUE_CLEAR);
}
示例4: ColorsCheck
public static void ColorsCheck(Gtk.CheckButton c)
{
c.ModifyBg(StateType.Normal, WHITE);
c.ModifyBg(StateType.Active, BLUE);
c.ModifyBg(StateType.Prelight, BLUE_CLEAR);
}
示例5: set_background_color
public static void set_background_color(Gtk.Widget widget, string color)
{
Gdk.Color col = new Gdk.Color();
Gdk.Color.Parse(color, ref col);
widget.ModifyBg(StateType.Normal, col);
widget.ModifyBg(StateType.Active, col);
widget.ModifyBg(StateType.Insensitive, col);
widget.ModifyBg(StateType.Prelight, col);
widget.ModifyBg(StateType.Selected, col);
}
示例6: reset_background_color
public static void reset_background_color(Gtk.Widget widget)
{
widget.ModifyBg(StateType.Normal);
}
示例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: ColorsTreeView
public static void ColorsTreeView(Gtk.Viewport v, Gtk.TreeView tv)
{
tv.ModifyBg(StateType.Active, v.Style.Background(StateType.Selected));
tv.ModifyBg(StateType.Prelight, v.Style.Background(StateType.Selected));
}
示例9: ColorsRadio
public static void ColorsRadio(Gtk.Viewport v, Gtk.RadioButton r)
{
r.ModifyBg(StateType.Active, v.Style.Background(StateType.Selected));
r.ModifyBg(StateType.Prelight, v.Style.Background(StateType.Selected));
}
示例10: ColorsCheckbox
public static void ColorsCheckbox(Gtk.Viewport v, Gtk.CheckButton c)
{
c.ModifyBg(StateType.Active, v.Style.Background(StateType.Selected));
c.ModifyBg(StateType.Prelight, v.Style.Background(StateType.Selected));
}
示例11: 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));
}
示例12: SetError
public static void SetError(Gtk.Widget widget, bool setting)
{
if (setting == true) {
widget.ModifyBase (Gtk.StateType.Normal, new Gdk.Color (0xFF, 0x85, 0x85));
widget.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (0xFF, 0x85, 0x85));
} else {
widget.ModifyBase (Gtk.StateType.Normal);
widget.ModifyBg (Gtk.StateType.Normal);
}
}
示例13: Append
public void Append(Gtk.Widget widget, Gtk.AttachOptions xoptions,
Gtk.AttachOptions yoptions, bool showArrow, Gdk.Pixbuf arrow)
{
uint row = table.NRows;
if (showArrow) {
AttachArrow(arrow);
}
table.Attach (widget, 1, 2, row, row + 1, xoptions, yoptions, 0, 0);
widget.ModifyBg (Gtk.StateType.Normal, Style.Base (Gtk.StateType.Normal));
}
示例14: styleUndoButton
private static void styleUndoButton(Gtk.Button button)
{
button.ModifyBg(StateType.Normal, _undoButtonBg);
button.ModifyBg(StateType.Prelight, _undoButtonHoverBg);
button.Child.ModifyFont(getButtonFont());
}