TEST : color changing of menu
This commit is contained in:
parent
a497b028ca
commit
fc9b98f09e
@ -85,7 +85,7 @@ MainWindows::MainWindows(void) : MsgBroadcast("Main Windows", EDN_CAT_GUI)
|
|||||||
#else
|
#else
|
||||||
ExitIconeFile = "./data/imagesSources/delete-24px.png";
|
ExitIconeFile = "./data/imagesSources/delete-24px.png";
|
||||||
#endif
|
#endif
|
||||||
// TODO : find a good way to chenge the size of an image
|
// TODO : find a good way to change the size of an image
|
||||||
GtkWidget *myImageQuit = gtk_image_new_from_file(ExitIconeFile.c_str());
|
GtkWidget *myImageQuit = gtk_image_new_from_file(ExitIconeFile.c_str());
|
||||||
GtkIconSize mySize = GTK_ICON_SIZE_SMALL_TOOLBAR;
|
GtkIconSize mySize = GTK_ICON_SIZE_SMALL_TOOLBAR;
|
||||||
//EDN_DEBUG(" plop : " << mySize);
|
//EDN_DEBUG(" plop : " << mySize);
|
||||||
@ -100,7 +100,21 @@ MainWindows::MainWindows(void) : MsgBroadcast("Main Windows", EDN_CAT_GUI)
|
|||||||
|
|
||||||
// add the real menu bar
|
// add the real menu bar
|
||||||
gtk_box_pack_start( GTK_BOX (hboxMenu), m_MenuBar.GetWidget(), FALSE, FALSE, 0);
|
gtk_box_pack_start( GTK_BOX (hboxMenu), m_MenuBar.GetWidget(), FALSE, FALSE, 0);
|
||||||
|
GdkColor color;
|
||||||
|
GtkStateType tmpppppp = GTK_STATE_NORMAL;
|
||||||
|
//GtkStateType tmpppppp = GTK_STATE_ACTIVE;
|
||||||
|
//GtkStateType tmpppppp = GTK_STATE_PRELIGHT;
|
||||||
|
//GtkStateType tmpppppp = GTK_STATE_SELECTED;
|
||||||
|
//GtkStateType tmpppppp = GTK_STATE_INSENSITIVE;
|
||||||
|
//gdk_color_parse ("green", &color);
|
||||||
|
//gtk_widget_modify_fg(m_MenuBar.GetWidget(), tmpppppp, &color);
|
||||||
|
//gdk_color_parse ("blue", &color);
|
||||||
|
//gtk_widget_modify_bg(m_MenuBar.GetWidget(), tmpppppp, &color);
|
||||||
|
gdk_color_parse ("red", &color);
|
||||||
|
gtk_widget_modify_text(m_MenuBar.GetWidget(), tmpppppp, &color);
|
||||||
|
//gdk_color_parse ("orange", &color);
|
||||||
|
gtk_widget_modify_base(m_MenuBar.GetWidget(), tmpppppp, &color);
|
||||||
|
|
||||||
// Add title
|
// Add title
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -187,6 +187,11 @@ class MenuBarMain
|
|||||||
m_message.PushBack(message);
|
m_message.PushBack(message);
|
||||||
// create ITEM
|
// create ITEM
|
||||||
GtkWidget *tmpWidget = gtk_image_menu_item_new_from_stock( title, AccelKey::getInstance()->GetAccel() );
|
GtkWidget *tmpWidget = gtk_image_menu_item_new_from_stock( title, AccelKey::getInstance()->GetAccel() );
|
||||||
|
GdkColor color;
|
||||||
|
gdk_color_parse ("red", &color);
|
||||||
|
gtk_widget_modify_fg(tmpWidget, GTK_STATE_NORMAL, &color);
|
||||||
|
gtk_widget_modify_bg(tmpWidget, GTK_STATE_NORMAL, &color);
|
||||||
|
gtk_widget_modify_text(tmpWidget, GTK_STATE_NORMAL, &color);
|
||||||
// set grisage :
|
// set grisage :
|
||||||
gtk_widget_set_sensitive(tmpWidget, enable);
|
gtk_widget_set_sensitive(tmpWidget, enable);
|
||||||
// add to the menu :
|
// add to the menu :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user