- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
void TWindowTID::SetStyle(GtkWidget* widget, const char *form, gint Red_, gint Green_, gint Blue_)
{
struct _GtkStyle *style;
GdkColor bg;
style=gtk_style_new();
bg.red = Red_;
bg.blue = Blue_;
bg.green = Green_;
if (form=="TEXT")
{
style->fg[GTK_STATE_NORMAL]=bg; //TEXT
}
else
if (form=="BORDER")
{
style->base[GTK_STATE_NORMAL]=bg; //BORDER
}
else
if (form=="ALL")
{
style->bg[GTK_STATE_NORMAL]=bg;
style->base[GTK_STATE_NORMAL]=bg; //BORDER
style->fg[GTK_STATE_NORMAL]=bg; //TEXT
}
else
if (form=="button")
{
style->bg[GTK_STATE_PRELIGHT]=bg;
style->base[GTK_STATE_PRELIGHT]=bg; //BORDER
style->bg[GTK_STATE_SELECTED]=bg;
style->base[GTK_STATE_SELECTED]=bg; //BORDER
}
else
{
style->bg[GTK_STATE_NORMAL]=bg;
}
style->font = gdk_font_load("-adobe-helvetica-*-r-*-*-12-*-*-*-*-*-*-*");
if ((GtkWidget *)widget!=NULL) gtk_widget_set_style((GtkWidget *)widget, style);
}
zaufi 12.02.2010 18:15 # 0
guest 12.02.2010 21:18 # 0
guest 12.02.2010 21:19 # +1
Highlander 13.02.2010 12:25 # 0