- char buf[1024], font_buf[256], *font_ptr;
- char menu_bar_prelight_str[128];
-
- GdkColor menu_color;
- GdkColor menu_text_color;
- GdkColor tooltip_back;
- GdkColor tooltip_fore;
- GdkColor btn_fore;
- GdkColor btn_face;
- GdkColor progress_back;
-
- GdkColor fg_prelight;
- GdkColor bg_prelight;
- GdkColor base_prelight;
- GdkColor text_prelight;
-
- /* Prelight */
- sys_color_to_gtk_color (XP_THEME_CLASS_TEXT, COLOR_HIGHLIGHTTEXT,
- &fg_prelight);
- sys_color_to_gtk_color (XP_THEME_CLASS_TEXT, COLOR_HIGHLIGHT,
- &bg_prelight);
- sys_color_to_gtk_color (XP_THEME_CLASS_TEXT, COLOR_HIGHLIGHT,
- &base_prelight);
- sys_color_to_gtk_color (XP_THEME_CLASS_TEXT, COLOR_HIGHLIGHTTEXT,
- &text_prelight);
-
- sys_color_to_gtk_color (XP_THEME_CLASS_MENU, COLOR_MENUTEXT,
- &menu_text_color);
- sys_color_to_gtk_color (XP_THEME_CLASS_MENU, COLOR_MENU, &menu_color);
-
- /* tooltips */
- sys_color_to_gtk_color (XP_THEME_CLASS_TOOLTIP, COLOR_INFOTEXT,
- &tooltip_fore);
- sys_color_to_gtk_color (XP_THEME_CLASS_TOOLTIP, COLOR_INFOBK,
- &tooltip_back);
-
- /* text on push buttons. TODO: button shadows, backgrounds, and
- highlights */
- sys_color_to_gtk_color (XP_THEME_CLASS_BUTTON, COLOR_BTNTEXT, &btn_fore);
- sys_color_to_gtk_color (XP_THEME_CLASS_BUTTON, COLOR_BTNFACE, &btn_face);
-
- /* progress bar background color */
- sys_color_to_gtk_color (XP_THEME_CLASS_PROGRESS, COLOR_HIGHLIGHT,
- &progress_back);
-
- /* Enable coloring for menus. */
- font_ptr =
- sys_font_to_pango_font (XP_THEME_CLASS_MENU, XP_THEME_FONT_MENU,
- font_buf, sizeof (font_buf));
- g_snprintf (buf, sizeof (buf),
- "style \"msw-menu\" = \"msw-default\"\n" "{\n"
- "GtkMenuItem::toggle-spacing = 8\n"
- "fg[PRELIGHT] = { %d, %d, %d }\n"
- "bg[PRELIGHT] = { %d, %d, %d }\n"
- "text[PRELIGHT] = { %d, %d, %d }\n"
- "base[PRELIGHT] = { %d, %d, %d }\n"
- "fg[NORMAL] = { %d, %d, %d }\n"
- "bg[NORMAL] = { %d, %d, %d }\n" "%s = \"%s\"\n"
- "}widget_class \"*MenuItem*\" style \"msw-menu\"\n"
- "widget_class \"*GtkMenu\" style \"msw-menu\"\n"
- "widget_class \"*GtkMenuShell*\" style \"msw-menu\"\n",
- fg_prelight.red, fg_prelight.green, fg_prelight.blue,
- bg_prelight.red, bg_prelight.green, bg_prelight.blue,
- text_prelight.red, text_prelight.green, text_prelight.blue,
- base_prelight.red, base_prelight.green, base_prelight.blue,
- menu_text_color.red, menu_text_color.green,
- menu_text_color.blue, menu_color.red, menu_color.green,
- menu_color.blue, (font_ptr ? "font_name" : "#"),
- (font_ptr ? font_ptr : " font name should go here"));
- gtk_rc_parse_string (buf);
-
- if( xp_theme_is_active() ) {
- *menu_bar_prelight_str = '\0';
- }
- else {
- g_snprintf(menu_bar_prelight_str, sizeof(menu_bar_prelight_str),
- "fg[PRELIGHT] = { %d, %d, %d }\n",
- menu_text_color.red, menu_text_color.green, menu_text_color.blue);
- }
-
- /* Enable coloring for menu bars. */
- g_snprintf (buf, sizeof (buf),
- "style \"msw-menu-bar\" = \"msw-menu\"\n"
- "{\n"
- "bg[NORMAL] = { %d, %d, %d }\n"
- "%s"
- "GtkMenuBar::shadow-type = %d\n"
- /*
- FIXME: This should be enabled once gtk+ support
- GtkMenuBar::prelight-item style property.
- */
- /* "GtkMenuBar::prelight-item = 1\n" */
- "}widget_class \"*MenuBar*\" style \"msw-menu-bar\"\n",
- btn_face.red, btn_face.green, btn_face.blue,
- menu_bar_prelight_str,
- xp_theme_is_active() ? 0 : 2 );
- gtk_rc_parse_string (buf);
-
- g_snprintf (buf, sizeof (buf),
- "style \"msw-toolbar\" = \"msw-default\"\n"
- "{\n"
- "GtkHandleBox::shadow-type = %s\n"
- "GtkToolbar::shadow-type = %s\n"
- "}widget_class \"*HandleBox*\" style \"msw-toolbar\"\n",
- "etched-in", "etched-in");
- gtk_rc_parse_string (buf);
-
- /* enable tooltip fonts */
- font_ptr =
- sys_font_to_pango_font (XP_THEME_CLASS_STATUS, XP_THEME_FONT_STATUS,
- font_buf, sizeof (font_buf));
- g_snprintf (buf, sizeof (buf),
- "style \"msw-tooltips-caption\" = \"msw-default\"\n"
- "{fg[NORMAL] = { %d, %d, %d }\n" "%s = \"%s\"\n"
- "}widget \"gtk-tooltips.GtkLabel\" style \"msw-tooltips-caption\"\n",
- tooltip_fore.red, tooltip_fore.green, tooltip_fore.blue,
- (font_ptr ? "font_name" : "#"),
- (font_ptr ? font_ptr : " font name should go here"));
- gtk_rc_parse_string (buf);
-
- g_snprintf (buf, sizeof (buf),
- "style \"msw-tooltips\" = \"msw-default\"\n"
- "{bg[NORMAL] = { %d, %d, %d }\n"
- "}widget \"gtk-tooltips*\" style \"msw-tooltips\"\n",
- tooltip_back.red, tooltip_back.green, tooltip_back.blue);
- gtk_rc_parse_string (buf);
-
- /* enable font theming for status bars */
- font_ptr =
- sys_font_to_pango_font (XP_THEME_CLASS_STATUS, XP_THEME_FONT_STATUS,
- font_buf, sizeof (font_buf));
- g_snprintf (buf, sizeof (buf),
- "style \"msw-status\" = \"msw-default\"\n" "{%s = \"%s\"\n"
- "bg[NORMAL] = { %d, %d, %d }\n"
- "}widget_class \"*Status*\" style \"msw-status\"\n",
- (font_ptr ? "font_name" : "#"),
- (font_ptr ? font_ptr : " font name should go here"),
- btn_face.red, btn_face.green, btn_face.blue);
- gtk_rc_parse_string (buf);
-
- /* enable coloring for text on buttons TODO: use GetThemeMetric for the
- border and outside border */
- g_snprintf (buf, sizeof (buf),
- "style \"msw-button\" = \"msw-default\"\n"
- "{\n"
- "bg[NORMAL] = { %d, %d, %d }\n"
- "bg[PRELIGHT] = { %d, %d, %d }\n"
- "bg[INSENSITIVE] = { %d, %d, %d }\n"
- "fg[PRELIGHT] = { %d, %d, %d }\n"
- "GtkButton::default-border = { 0, 0, 0, 0 }\n"
- "GtkButton::default-outside-border = { 0, 0, 0, 0 }\n"
- "GtkButton::child-displacement-x = 1\n"
- "GtkButton::child-displacement-y = 1\n"
- "GtkButton::focus-padding = %d\n"
- "}widget_class \"*Button*\" style \"msw-button\"\n",
- btn_face.red, btn_face.green, btn_face.blue,
- btn_face.red, btn_face.green, btn_face.blue,
- btn_face.red, btn_face.green, btn_face.blue,
- btn_fore.red, btn_fore.green, btn_fore.blue,
- xp_theme_is_active() ? 1 : 2 );
- gtk_rc_parse_string (buf);
-
- /* enable coloring for progress bars */
- g_snprintf (buf, sizeof (buf),
- "style \"msw-progress\" = \"msw-default\"\n"
- "{bg[PRELIGHT] = { %d, %d, %d }\n"
- "bg[NORMAL] = { %d, %d, %d }\n"
- "}widget_class \"*Progress*\" style \"msw-progress\"\n",
- progress_back.red,
- progress_back.green,
- progress_back.blue,
- btn_face.red, btn_face.green, btn_face.blue);
- gtk_rc_parse_string (buf);
-
- /* scrollbar thumb width and height */
- g_snprintf (buf, sizeof (buf),
- "style \"msw-vscrollbar\" = \"msw-default\"\n"
- "{GtkRange::slider-width = %d\n"
- "GtkRange::stepper-size = %d\n"
- "GtkRange::stepper-spacing = 0\n"
- "GtkRange::trough_border = 0\n"
- "GtkScale::slider-length = %d\n"
- "GtkScrollbar::min-slider-length = 8\n"
- "}widget_class \"*VScrollbar*\" style \"msw-vscrollbar\"\n"
- "widget_class \"*VScale*\" style \"msw-vscrollbar\"\n",
- GetSystemMetrics (SM_CYVTHUMB),
- get_system_metric (XP_THEME_CLASS_SCROLLBAR, SM_CXVSCROLL),
- 11);
- gtk_rc_parse_string (buf);
-
- g_snprintf (buf, sizeof (buf),
- "style \"msw-hscrollbar\" = \"msw-default\"\n"
- "{GtkRange::slider-width = %d\n"
- "GtkRange::stepper-size = %d\n"
- "GtkRange::stepper-spacing = 0\n"
- "GtkRange::trough_border = 0\n"
- "GtkScale::slider-length = %d\n"
- "GtkScrollbar::min-slider-length = 8\n"
- "}widget_class \"*HScrollbar*\" style \"msw-hscrollbar\"\n"
- "widget_class \"*HScale*\" style \"msw-hscrollbar\"\n",
- GetSystemMetrics (SM_CXHTHUMB),
- get_system_metric (XP_THEME_CLASS_SCROLLBAR, SM_CYHSCROLL),
- 11);
- gtk_rc_parse_string (buf);
-
- gtk_rc_parse_string (
- "style \"msw-scrolled-window\" = \"msw-default\"\n"
- "{GtkScrolledWindow::scrollbars-within-bevel = 1}\n"
- "class \"GtkScrolledWindow\" style \"msw-scrolled-window\"\n");
-
- /* radio/check button sizes */
- g_snprintf (buf, sizeof (buf),
- "style \"msw-checkbutton\" = \"msw-button\"\n"
- "{GtkCheckButton::indicator-size = 13\n"
- "}widget_class \"*CheckButton*\" style \"msw-checkbutton\"\n"
- "widget_class \"*RadioButton*\" style \"msw-checkbutton\"\n");
- gtk_rc_parse_string (buf);
-
- /* size of combo box toggle button */
- g_snprintf (buf, sizeof(buf),
- "style \"msw-combobox-button\" = \"msw-default\"\n"
- "{\n"
- "xthickness = 0\n"
- "ythickness = 0\n"
- "GtkButton::default-border = { 0, 0, 0, 0 }\n"
- "GtkButton::default-outside-border = { 0, 0, 0, 0 }\n"
- "GtkButton::child-displacement-x = 0\n"
- "GtkButton::child-displacement-y = 0\n"
- "GtkWidget::focus-padding = 0\n"
- "GtkWidget::focus-line-width = 0\n"
- "}\n"
- "widget_class \"*ComboBox*ToggleButton*\" style \"msw-combobox-button\"\n");
- gtk_rc_parse_string (buf);
-
- g_snprintf (buf, sizeof(buf),
- "style \"msw-combobox\" = \"msw-default\"\n"
- "{\n"
- "GtkComboBox::shadow-type = in\n"
- "xthickness = %d\n"
- "ythickness = %d\n"
- "}\n"
- "class \"GtkComboBox\" style \"msw-combobox\"\n",
- GetSystemMetrics (SM_CXEDGE),
- GetSystemMetrics (SM_CYEDGE));
- gtk_rc_parse_string (buf);
-
- /* size of tree view header */
- g_snprintf (buf, sizeof(buf),
- "style \"msw-header-button\" = \"msw-default\"\n"
- "{\n"
- "xthickness = 4\n"
- "ythickness = %d\n"
- "GtkButton::default-border = { 0, 0, 0, 0 }\n"
- "GtkButton::default-outside-border = { 0, 0, 0, 0 }\n"
- "GtkButton::child-displacement-x = 1\n"
- "GtkButton::child-displacement-y = 1\n"
- "GtkWidget::focus-padding = 0\n"
- "GtkWidget::focus-line-width = 0\n"
- "}\n"
- "widget_class \"*TreeView*Button*\" style \"msw-header-button\"\n",
- xp_theme_is_active() ? 2 : 0 );
- gtk_rc_parse_string (buf);
-
- /* FIXME: This should be enabled once gtk+ support GtkNotebok::prelight-tab */
- /* enable prelight tab of GtkNotebook */
- /*
- g_snprintf (buf, sizeof (buf),
- "style \"msw-notebook\" = \"msw-default\"\n"
- "{GtkNotebook::prelight-tab=1\n"
- "}widget_class \"*Notebook*\" style \"msw-notebook\"\n");
- gtk_rc_parse_string (buf);
- */
-
- /* FIXME: This should be enabled once gtk+ support GtkTreeView::full-row-focus */
- /*
- g_snprintf (buf, sizeof (buf),
- "style \"msw-treeview\" = \"msw-default\"\n"
- "{GtkTreeView::full-row-focus=0\n"
- "}widget_class \"*TreeView*\" style \"msw-treeview\"\n");
- gtk_rc_parse_string (buf);
- */
+ char buf[1024], font_buf[256], *font_ptr;
+ char menu_bar_prelight_str[128];
+
+ GdkColor menu_color;
+ GdkColor menu_text_color;
+ GdkColor tooltip_back;
+ GdkColor tooltip_fore;
+ GdkColor btn_fore;
+ GdkColor btn_face;
+ GdkColor progress_back;
+
+ GdkColor fg_prelight;
+ GdkColor bg_prelight;
+ GdkColor base_prelight;
+ GdkColor text_prelight;
+
+ /* Prelight */
+ sys_color_to_gtk_color (get_windows_version () >= VISTA_VERSION ? XP_THEME_CLASS_MENU : XP_THEME_CLASS_TEXT,
+ get_windows_version () >= VISTA_VERSION ? COLOR_MENUTEXT : COLOR_HIGHLIGHTTEXT,
+ &fg_prelight);
+ sys_color_to_gtk_color (XP_THEME_CLASS_TEXT, COLOR_HIGHLIGHT, &bg_prelight);
+ sys_color_to_gtk_color (XP_THEME_CLASS_TEXT, COLOR_HIGHLIGHT,
+ &base_prelight);
+ sys_color_to_gtk_color (XP_THEME_CLASS_TEXT, COLOR_HIGHLIGHTTEXT,
+ &text_prelight);
+
+ sys_color_to_gtk_color (XP_THEME_CLASS_MENU, COLOR_MENUTEXT,
+ &menu_text_color);
+ sys_color_to_gtk_color (XP_THEME_CLASS_MENU, COLOR_MENU, &menu_color);
+
+ /* tooltips */
+ sys_color_to_gtk_color (XP_THEME_CLASS_TOOLTIP, COLOR_INFOTEXT,
+ &tooltip_fore);
+ sys_color_to_gtk_color (XP_THEME_CLASS_TOOLTIP, COLOR_INFOBK,
+ &tooltip_back);
+
+ /* text on push buttons. TODO: button shadows, backgrounds, and
+ highlights */
+ sys_color_to_gtk_color (XP_THEME_CLASS_BUTTON, COLOR_BTNTEXT, &btn_fore);
+ sys_color_to_gtk_color (XP_THEME_CLASS_BUTTON, COLOR_BTNFACE, &btn_face);
+
+ /* progress bar background color */
+ sys_color_to_gtk_color (XP_THEME_CLASS_PROGRESS, COLOR_HIGHLIGHT,
+ &progress_back);
+
+ /* Enable coloring for menus. */
+ font_ptr =
+ sys_font_to_pango_font (XP_THEME_CLASS_MENU, XP_THEME_FONT_MENU,
+ font_buf, sizeof (font_buf));
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-menu\" = \"msw-default\"\n" "{\n"
+ "GtkMenuItem::toggle-spacing = 8\n"
+ "fg[PRELIGHT] = { %d, %d, %d }\n"
+ "bg[PRELIGHT] = { %d, %d, %d }\n"
+ "text[PRELIGHT] = { %d, %d, %d }\n"
+ "base[PRELIGHT] = { %d, %d, %d }\n"
+ "fg[NORMAL] = { %d, %d, %d }\n"
+ "bg[NORMAL] = { %d, %d, %d }\n" "%s = \"%s\"\n"
+ "}widget_class \"*MenuItem*\" style \"msw-menu\"\n"
+ "widget_class \"*GtkMenu\" style \"msw-menu\"\n"
+ "widget_class \"*GtkMenuShell*\" style \"msw-menu\"\n",
+ fg_prelight.red, fg_prelight.green, fg_prelight.blue,
+ bg_prelight.red, bg_prelight.green, bg_prelight.blue,
+ text_prelight.red, text_prelight.green, text_prelight.blue,
+ base_prelight.red, base_prelight.green, base_prelight.blue,
+ menu_text_color.red, menu_text_color.green,
+ menu_text_color.blue, menu_color.red, menu_color.green,
+ menu_color.blue, (font_ptr ? "font_name" : "#"),
+ (font_ptr ? font_ptr : " font name should go here"));
+ gtk_rc_parse_string (buf);
+
+ if (xp_theme_is_active ())
+ {
+ *menu_bar_prelight_str = '\0';
+ }
+ else
+ {
+ g_snprintf (menu_bar_prelight_str, sizeof (menu_bar_prelight_str),
+ "fg[PRELIGHT] = { %d, %d, %d }\n",
+ menu_text_color.red, menu_text_color.green,
+ menu_text_color.blue);
+ }
+
+ /* Enable coloring for menu bars. */
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-menu-bar\" = \"msw-menu\"\n"
+ "{\n"
+ "bg[NORMAL] = { %d, %d, %d }\n"
+ "%s" "GtkMenuBar::shadow-type = %d\n"
+ /*
+ FIXME: This should be enabled once gtk+ support
+ GtkMenuBar::prelight-item style property.
+ */
+ /* "GtkMenuBar::prelight-item = 1\n" */
+ "}widget_class \"*MenuBar*\" style \"msw-menu-bar\"\n",
+ btn_face.red, btn_face.green, btn_face.blue,
+ menu_bar_prelight_str, xp_theme_is_active ()? 0 : 2);
+ gtk_rc_parse_string (buf);
+
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-toolbar\" = \"msw-default\"\n"
+ "{\n"
+ "GtkHandleBox::shadow-type = %s\n"
+ "GtkToolbar::shadow-type = %s\n"
+ "}widget_class \"*HandleBox*\" style \"msw-toolbar\"\n",
+ "etched-in", "etched-in");
+ gtk_rc_parse_string (buf);
+
+ /* enable tooltip fonts */
+ font_ptr = sys_font_to_pango_font (XP_THEME_CLASS_STATUS, XP_THEME_FONT_STATUS,
+ font_buf, sizeof (font_buf));
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-tooltips-caption\" = \"msw-default\"\n"
+ "{fg[NORMAL] = { %d, %d, %d }\n" "%s = \"%s\"\n"
+ "}widget \"gtk-tooltips.GtkLabel\" style \"msw-tooltips-caption\"\n"
+ "widget \"gtk-tooltip.GtkLabel\" style \"msw-tooltips-caption\"\n",
+ tooltip_fore.red, tooltip_fore.green, tooltip_fore.blue,
+ (font_ptr ? "font_name" : "#"),
+ (font_ptr ? font_ptr : " font name should go here"));
+ gtk_rc_parse_string (buf);
+
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-tooltips\" = \"msw-default\"\n"
+ "{bg[NORMAL] = { %d, %d, %d }\n"
+ "}widget \"gtk-tooltips*\" style \"msw-tooltips\"\n"
+ "widget \"gtk-tooltip*\" style \"msw-tooltips\"\n",
+ tooltip_back.red, tooltip_back.green, tooltip_back.blue);
+ gtk_rc_parse_string (buf);
+
+ /* enable font theming for status bars */
+ font_ptr = sys_font_to_pango_font (XP_THEME_CLASS_STATUS, XP_THEME_FONT_STATUS,
+ font_buf, sizeof (font_buf));
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-status\" = \"msw-default\"\n" "{%s = \"%s\"\n"
+ "bg[NORMAL] = { %d, %d, %d }\n"
+ "}widget_class \"*Status*\" style \"msw-status\"\n",
+ (font_ptr ? "font_name" : "#"),
+ (font_ptr ? font_ptr : " font name should go here"),
+ btn_face.red, btn_face.green, btn_face.blue);
+ gtk_rc_parse_string (buf);
+
+ /* enable coloring for text on buttons
+ * TODO: use GetThemeMetric for the border and outside border
+ * TODO: child-displacement-x & y should be 0 when XP theme is active */
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-button\" = \"msw-default\"\n"
+ "{\n"
+ "bg[NORMAL] = { %d, %d, %d }\n"
+ "bg[PRELIGHT] = { %d, %d, %d }\n"
+ "bg[INSENSITIVE] = { %d, %d, %d }\n"
+ "fg[PRELIGHT] = { %d, %d, %d }\n"
+ "GtkButton::default-border = { 0, 0, 0, 0 }\n"
+ "GtkButton::default-outside-border = { 0, 0, 0, 0 }\n"
+ "GtkButton::child-displacement-x = 1\n"
+ "GtkButton::child-displacement-y = 1\n"
+ "GtkButton::focus-padding = %d\n"
+ "}widget_class \"*Button*\" style \"msw-button\"\n",
+ btn_face.red, btn_face.green, btn_face.blue,
+ btn_face.red, btn_face.green, btn_face.blue,
+ btn_face.red, btn_face.green, btn_face.blue,
+ btn_fore.red, btn_fore.green, btn_fore.blue,
+ xp_theme_is_active ()? 1 : 2);
+ gtk_rc_parse_string (buf);
+
+ /* enable coloring for progress bars */
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-progress\" = \"msw-default\"\n"
+ "{bg[PRELIGHT] = { %d, %d, %d }\n"
+ "bg[NORMAL] = { %d, %d, %d }\n"
+ "}widget_class \"*Progress*\" style \"msw-progress\"\n",
+ progress_back.red,
+ progress_back.green,
+ progress_back.blue,
+ btn_face.red, btn_face.green, btn_face.blue);
+ gtk_rc_parse_string (buf);
+
+ /* scrollbar thumb width and height */
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-vscrollbar\" = \"msw-default\"\n"
+ "{GtkRange::slider-width = %d\n"
+ "GtkRange::stepper-size = %d\n"
+ "GtkRange::stepper-spacing = 0\n"
+ "GtkRange::trough_border = 0\n"
+ "GtkScale::slider-length = %d\n"
+ "GtkScrollbar::min-slider-length = 8\n"
+ "}widget_class \"*VScrollbar*\" style \"msw-vscrollbar\"\n"
+ "widget_class \"*VScale*\" style \"msw-vscrollbar\"\n",
+ GetSystemMetrics (SM_CYVTHUMB),
+ get_system_metric (XP_THEME_CLASS_SCROLLBAR, SM_CXVSCROLL), 11);
+ gtk_rc_parse_string (buf);
+
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-hscrollbar\" = \"msw-default\"\n"
+ "{GtkRange::slider-width = %d\n"
+ "GtkRange::stepper-size = %d\n"
+ "GtkRange::stepper-spacing = 0\n"
+ "GtkRange::trough_border = 0\n"
+ "GtkScale::slider-length = %d\n"
+ "GtkScrollbar::min-slider-length = 8\n"
+ "}widget_class \"*HScrollbar*\" style \"msw-hscrollbar\"\n"
+ "widget_class \"*HScale*\" style \"msw-hscrollbar\"\n",
+ GetSystemMetrics (SM_CXHTHUMB),
+ get_system_metric (XP_THEME_CLASS_SCROLLBAR, SM_CYHSCROLL), 11);
+ gtk_rc_parse_string (buf);
+
+ gtk_rc_parse_string ("style \"msw-scrolled-window\" = \"msw-default\"\n"
+ "{GtkScrolledWindow::scrollbars-within-bevel = 1}\n"
+ "class \"GtkScrolledWindow\" style \"msw-scrolled-window\"\n");
+
+ /* radio/check button sizes */
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-checkbutton\" = \"msw-button\"\n"
+ "{GtkCheckButton::indicator-size = 13\n"
+ "}widget_class \"*CheckButton*\" style \"msw-checkbutton\"\n"
+ "widget_class \"*RadioButton*\" style \"msw-checkbutton\"\n");
+ gtk_rc_parse_string (buf);
+
+ /* size of combo box toggle button */
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-combobox-button\" = \"msw-default\"\n"
+ "{\n"
+ "xthickness = 0\n"
+ "ythickness = 0\n"
+ "GtkButton::default-border = { 0, 0, 0, 0 }\n"
+ "GtkButton::default-outside-border = { 0, 0, 0, 0 }\n"
+ "GtkButton::child-displacement-x = 0\n"
+ "GtkButton::child-displacement-y = 0\n"
+ "GtkWidget::focus-padding = 0\n"
+ "GtkWidget::focus-line-width = 0\n"
+ "}\n"
+ "widget_class \"*ComboBox*ToggleButton*\" style \"msw-combobox-button\"\n");
+ gtk_rc_parse_string (buf);
+
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-combobox\" = \"msw-default\"\n"
+ "{\n"
+ "GtkComboBox::shadow-type = in\n"
+ "xthickness = %d\n"
+ "ythickness = %d\n"
+ "}\n"
+ "class \"GtkComboBox\" style \"msw-combobox\"\n",
+ xp_theme_is_active()? 1 : GetSystemMetrics (SM_CXEDGE),
+ xp_theme_is_active()? 1 : GetSystemMetrics (SM_CYEDGE));
+ gtk_rc_parse_string (buf);
+
+ /* size of tree view header */
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-header-button\" = \"msw-default\"\n"
+ "{\n"
+ "xthickness = 0\n"
+ "ythickness = 0\n"
+ "GtkWidget::draw-border = {0, 0, 0, 0}\n"
+ "GtkButton::default-border = { 0, 0, 0, 0 }\n"
+ "GtkButton::default-outside-border = { 0, 0, 0, 0 }\n"
+ "GtkButton::child-displacement-x = 0\n"
+ "GtkButton::child-displacement-y = 0\n"
+ "GtkWidget::focus-padding = 0\n"
+ "GtkWidget::focus-line-width = 0\n"
+ "}\n"
+ "widget_class \"*TreeView*Button*\" style \"msw-header-button\"\n");
+ gtk_rc_parse_string (buf);
+
+ /* FIXME: This should be enabled once gtk+ support GtkNotebok::prelight-tab */
+ /* enable prelight tab of GtkNotebook */
+ /*
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-notebook\" = \"msw-default\"\n"
+ "{GtkNotebook::prelight-tab=1\n"
+ "}widget_class \"*Notebook*\" style \"msw-notebook\"\n");
+ gtk_rc_parse_string (buf);
+ */
+
+ /* FIXME: This should be enabled once gtk+ support GtkTreeView::full-row-focus */
+ /*
+ g_snprintf (buf, sizeof (buf),
+ "style \"msw-treeview\" = \"msw-default\"\n"
+ "{GtkTreeView::full-row-focus=0\n"
+ "}widget_class \"*TreeView*\" style \"msw-treeview\"\n");
+ gtk_rc_parse_string (buf);
+ */