You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(14) |
Sep
(36) |
Oct
(55) |
Nov
(17) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(2) |
Feb
(2) |
Mar
(5) |
Apr
|
May
(14) |
Jun
(5) |
Jul
(10) |
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
(4) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(17) |
Jul
(2) |
Aug
(1) |
Sep
(1) |
Oct
(2) |
Nov
(9) |
Dec
|
2006 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Dom L. <ci...@us...> - 2006-01-27 16:36:14
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31377/src Modified Files: msw_style.c Log Message: gnome bug 322780 Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** msw_style.c 25 Nov 2005 21:23:30 -0000 1.40 --- msw_style.c 27 Jan 2006 16:36:04 -0000 1.41 *************** *** 923,926 **** --- 923,1011 ---- } + static gboolean + is_combo_box_child (GtkWidget* w) + { + GtkWidget* tmp; + + if (w == NULL) + return FALSE; + + for (tmp = w->parent; tmp; tmp = tmp->parent) + { + if (GTK_IS_COMBO_BOX(tmp)) + return TRUE; + } + + return FALSE; + } + + static gboolean + combo_box_draw_arrow (GtkStyle * style, + GdkWindow * window, + GtkStateType state, + GdkRectangle * area, + GtkWidget * widget) + { + if (xp_theme_draw (window, XP_THEME_ELEMENT_COMBOBUTTON, + style, widget->allocation.x, widget->allocation.y, + widget->allocation.width, widget->allocation.height, + state, area)) + { + return TRUE; + } + + return FALSE; + } + + /* This is ugly because no box drawing function is invoked for the combo + box as a whole, so we draw part of the entire box in every subwidget. + We do this by finding the allocation of the combo box in the given + window's coordinates and drawing. The xp drawing routines take care + of the clipping. */ + static gboolean + combo_box_draw_box (GtkStyle * style, + GdkWindow * window, + GtkStateType state_type, + GtkShadowType shadow_type, + GdkRectangle * area, + GtkWidget * widget, + const gchar * detail, gint x, gint y, gint width, gint height) + { + GtkWidget* combo_box; + GdkRectangle combo_alloc; + + if (!widget) + return FALSE; + for (combo_box = widget->parent; combo_box; combo_box = combo_box->parent) + { + if (GTK_IS_COMBO_BOX(combo_box)) + break; + } + if (!combo_box) + return FALSE; + + combo_alloc = combo_box->allocation; + if (window != combo_box->window) + { + GtkWidget* tmp; + for (tmp = widget; tmp && tmp != combo_box; tmp = widget->parent) + { + if (tmp->parent && tmp->window != tmp->parent->window) + { + combo_alloc.x -= tmp->allocation.x; + combo_alloc.y -= tmp->allocation.y; + } + } + } + + if (xp_theme_draw (window, XP_THEME_ELEMENT_EDIT_TEXT, + style, combo_alloc.x, combo_alloc.y, + combo_alloc.width, combo_alloc.height, + state_type, area)) + return TRUE; + + return FALSE; + } + static void draw_part (GdkDrawable * drawable, *************** *** 1295,1298 **** --- 1380,1391 ---- sanitize_size (window, &width, &height); + if (GTK_IS_ARROW(widget) && is_combo_box_child(widget)) + { + if (combo_box_draw_arrow (style, window, state, area, widget)) + { + return; + } + } + if (detail && strcmp (detail, "spinbutton") == 0) { *************** *** 1492,1496 **** const gchar * detail, gint x, gint y, gint width, gint height) { ! if (detail && (!strcmp (detail, "button") || !strcmp (detail, "buttondefault"))) { --- 1585,1595 ---- const gchar * detail, gint x, gint y, gint width, gint height) { ! if (is_combo_box_child (widget) ! && combo_box_draw_box (style, window, state_type, shadow_type, ! area, widget, detail, x, y, width, height)) ! { ! return; ! } ! else if (detail && (!strcmp (detail, "button") || !strcmp (detail, "buttondefault"))) { *************** *** 1737,1741 **** return; } ! } else if (detail && (strcmp (detail, "vscrollbar") == 0 --- 1836,1840 ---- return; } ! } else if (detail && (strcmp (detail, "vscrollbar") == 0 *************** *** 2065,2068 **** --- 2164,2173 ---- gboolean is_handlebox_grippie = (detail && !strcmp (detail, "handlebox")); + if (is_combo_box_child (widget) + && combo_box_draw_box (style, window, state_type, shadow_type, + area, widget, detail, x, y, width, height)) + { + return; + } if (detail && !strcmp (detail, "entry")) { |
From: Dom L. <ci...@us...> - 2006-01-27 16:36:13
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src/Theme/gtk-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31377/src/Theme/gtk-2.0 Modified Files: gtkrc Log Message: gnome bug 322780 Index: gtkrc =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/Theme/gtk-2.0/gtkrc,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** gtkrc 21 Oct 2005 21:25:39 -0000 1.26 --- gtkrc 27 Jan 2006 16:36:05 -0000 1.27 *************** *** 24,28 **** GtkComboBox::appears-as-list = 1 ! GtkComboBox::focus-on-click = 1 GOComboBox::add_tearoffs = 0 --- 24,28 ---- GtkComboBox::appears-as-list = 1 ! GtkComboBox::focus-on-click = 0 GOComboBox::add_tearoffs = 0 *************** *** 38,39 **** --- 38,53 ---- } class "*" style "msw-default" + + style "msw-combobox-toggle" = "msw-default" + { + xthickness = 0 + ythickness = 0 + GtkButton::default-border = { 0, 0, 0, 0 } + GtkButton::default-outside-border = { 0, 0, 0, 0 } + GtkButton::child-displacement-x = 0 + GtkButton::child-displacement-y = 0 + GtkWidget::focus-padding = 0 + GtkWidget::focus-line-width = 0 + } + widget_class "*ComboBox*ToggleButton*" style "msw-combobox-toggle" + |
From: Dom L. <ci...@us...> - 2005-11-25 21:23:40
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14819 Modified Files: msw_style.c Log Message: remove some scrollbar bits Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** msw_style.c 25 Nov 2005 21:07:55 -0000 1.39 --- msw_style.c 25 Nov 2005 21:23:30 -0000 1.40 *************** *** 27,30 **** --- 27,31 ---- * http://lxr.mozilla.org/seamonkey/source/widget/src/windows/nsLookAndFeel.cpp * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/userex/functions/drawthemebackground.asp + * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdraw_4b3g.asp */ *************** *** 1741,1752 **** || strcmp (detail, "hscrollbar") == 0)) { - GtkScrollbar *scrollbar = GTK_SCROLLBAR (widget); - - if (shadow_type == GTK_SHADOW_IN) - shadow_type = GTK_SHADOW_ETCHED_IN; - if (scrollbar->range.adjustment->page_size >= - (scrollbar->range.adjustment->upper - - scrollbar->range.adjustment->lower)) - shadow_type = GTK_SHADOW_OUT; } else if (detail --- 1742,1745 ---- |
From: Dom L. <ci...@us...> - 2005-11-25 21:08:03
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11925 Modified Files: msw_style.c Log Message: fix tooltip leak; factor out some DC-related code; let win32 draw the status bar gripper Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** msw_style.c 25 Nov 2005 20:08:38 -0000 1.38 --- msw_style.c 25 Nov 2005 21:07:55 -0000 1.39 *************** *** 1442,1445 **** --- 1442,1485 ---- } + static HDC get_window_dc(GtkStyle * style, GdkWindow * window, GtkStateType state_type, gint x, gint y, gint width, gint height, RECT *rect) + { + int xoff, yoff; + GdkDrawable *drawable; + + if (!GDK_IS_WINDOW (window)) + { + xoff = 0; + yoff = 0; + drawable = window; + } + else + { + gdk_window_get_internal_paint_info (window, &drawable, &xoff, &yoff); + } + + rect->left = x - xoff; + rect->top = y - yoff; + rect->right = rect->left + width; + rect->bottom = rect->top + height; + + return gdk_win32_hdc_get (drawable, style->dark_gc[state_type], 0); + } + + static void release_window_dc(GtkStyle * style, GdkWindow * window, GtkStateType state_type) + { + GdkDrawable *drawable; + + if (!GDK_IS_WINDOW (window)) + { + drawable = window; + } + else + { + gdk_window_get_internal_paint_info (window, &drawable, NULL, NULL); + } + + gdk_win32_hdc_release (drawable, style->dark_gc[state_type], 0); + } + static void draw_box (GtkStyle * style, *************** *** 1507,1511 **** gboolean is_v = GTK_IS_VSCROLLBAR (widget); ! if (xp_theme_draw (window, is_v ? XP_THEME_ELEMENT_SCROLLBAR_V --- 1547,1551 ---- gboolean is_v = GTK_IS_VSCROLLBAR (widget); ! if (xp_theme_draw (window, is_v ? XP_THEME_ELEMENT_SCROLLBAR_V *************** *** 1739,1768 **** { HBRUSH brush; - gint xoff, yoff; - GdkDrawable *drawable; RECT rect; HDC hdc; ! if (!GDK_IS_WINDOW (window)) ! { ! xoff = 0; ! yoff = 0; ! drawable = window; ! } ! else ! { ! gdk_window_get_internal_paint_info ! (window, &drawable, &xoff, &yoff); ! } ! ! rect.left = x - xoff; ! rect.top = y - yoff; ! rect.right = rect.left + width; ! rect.bottom = rect.top + height; - hdc = - gdk_win32_hdc_get (window, - style->dark_gc[state_type], - 0); brush = GetSysColorBrush (COLOR_3DDKSHADOW); if (brush) --- 1779,1787 ---- { HBRUSH brush; RECT rect; HDC hdc; ! hdc = get_window_dc(style, window, state_type, x, y, width, height, &rect); brush = GetSysColorBrush (COLOR_3DDKSHADOW); if (brush) *************** *** 1772,1775 **** --- 1791,1796 ---- (HBRUSH) (COLOR_INFOBK + 1)); + release_window_dc (style, window, state_type); + return; } *************** *** 1974,2018 **** /* experimental tab-drawing code from mozilla */ RECT rect; - int xoff, yoff; HDC dc; ! GdkDrawable *drawable; ! GdkGC * gc = style->dark_gc[GTK_STATE_NORMAL]; ! ! if (!GDK_IS_WINDOW (window)) ! { ! xoff = 0; ! yoff = 0; ! drawable = window; ! } ! else ! { ! gdk_window_get_internal_paint_info (window, &drawable, &xoff, &yoff); ! } ! rect.left = x - xoff; ! rect.top = y - yoff; ! rect.right = rect.left + width; ! rect.bottom = rect.top + height; ! dc = gdk_win32_hdc_get (drawable, gc, 0); ! if (dc) { ! gint32 aPosition; ! if (real_gap_side == GTK_POS_TOP) ! aPosition = BF_TOP; ! else if (real_gap_side == GTK_POS_BOTTOM) ! aPosition = BF_BOTTOM; ! else if (real_gap_side == GTK_POS_LEFT) ! aPosition = BF_LEFT; ! else ! aPosition = BF_RIGHT; ! if (area) ! gdk_gc_set_clip_rectangle (gc, area); ! DrawTab (dc, rect, aPosition, state_type != GTK_STATE_PRELIGHT, (real_gap_side != GTK_POS_LEFT), (real_gap_side != GTK_POS_RIGHT)); ! if (area) ! gdk_gc_set_clip_rectangle (gc, NULL); ! gdk_win32_hdc_release (drawable, gc, 0); ! } } } --- 1995,2019 ---- /* experimental tab-drawing code from mozilla */ RECT rect; HDC dc; ! gint32 aPosition; ! dc = get_window_dc(style, window, state_type, x, y, width, height, &rect); ! if (real_gap_side == GTK_POS_TOP) ! aPosition = BF_TOP; ! else if (real_gap_side == GTK_POS_BOTTOM) ! aPosition = BF_BOTTOM; ! else if (real_gap_side == GTK_POS_LEFT) ! aPosition = BF_LEFT; ! else ! aPosition = BF_RIGHT; ! if (area) ! gdk_gc_set_clip_rectangle (style->dark_gc[state_type], area); ! DrawTab (dc, rect, aPosition, state_type != GTK_STATE_PRELIGHT, (real_gap_side != GTK_POS_LEFT), (real_gap_side != GTK_POS_RIGHT)); ! if (area) ! gdk_gc_set_clip_rectangle (style->dark_gc[state_type], NULL); ! release_window_dc (style, window, state_type); } } *************** *** 2313,2317 **** (window, XP_THEME_ELEMENT_STATUS_GRIPPER, style, x, y, width, height, state_type, area)) ! return; } --- 2314,2330 ---- (window, XP_THEME_ELEMENT_STATUS_GRIPPER, style, x, y, width, height, state_type, area)) ! return; ! else { ! RECT rect; ! HDC dc = get_window_dc(style, window, state_type, x, y, width, height, &rect); ! ! if (area) ! gdk_gc_set_clip_rectangle (style->dark_gc[state_type], area); ! DrawFrameControl(dc, &rect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP); ! release_window_dc(style, window, state_type); ! if (area) ! gdk_gc_set_clip_rectangle (style->dark_gc[state_type], NULL); ! return; ! } } |
From: Dom L. <ci...@us...> - 2005-11-25 20:08:46
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32474 Modified Files: msw_style.c Log Message: experimentally, windows uses 8 pixels between a menu icon and the text Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** msw_style.c 25 Nov 2005 18:48:08 -0000 1.37 --- msw_style.c 25 Nov 2005 20:08:38 -0000 1.38 *************** *** 662,665 **** --- 662,666 ---- 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" |
From: Dom L. <ci...@us...> - 2005-11-25 18:48:24
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14604 Modified Files: msw_style.c Log Message: better tab drawing code Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** msw_style.c 25 Nov 2005 18:26:22 -0000 1.36 --- msw_style.c 25 Nov 2005 18:48:08 -0000 1.37 *************** *** 1994,2000 **** rect.bottom = rect.top + height; - if(state_type == GTK_STATE_NORMAL) - rect.bottom += 1; - dc = gdk_win32_hdc_get (drawable, gc, 0); if (dc) { --- 1994,1997 ---- *************** *** 2012,2016 **** if (area) gdk_gc_set_clip_rectangle (gc, area); ! DrawTab (dc, rect, aPosition, state_type == GTK_STATE_ACTIVE, (real_gap_side != GTK_POS_LEFT), (real_gap_side != GTK_POS_RIGHT)); if (area) gdk_gc_set_clip_rectangle (gc, NULL); --- 2009,2013 ---- if (area) gdk_gc_set_clip_rectangle (gc, area); ! DrawTab (dc, rect, aPosition, state_type != GTK_STATE_PRELIGHT, (real_gap_side != GTK_POS_LEFT), (real_gap_side != GTK_POS_RIGHT)); if (area) gdk_gc_set_clip_rectangle (gc, NULL); |
From: Dom L. <ci...@us...> - 2005-11-25 18:26:33
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10917 Modified Files: msw_style.c Log Message: update documentation Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** msw_style.c 25 Nov 2005 18:14:57 -0000 1.35 --- msw_style.c 25 Nov 2005 18:26:22 -0000 1.36 *************** *** 24,28 **** * Useful resources: * ! * http://lxr.mozilla.org/mozilla/source/gfx/src/windows/nsNativeThemeWin.cpp * http://lxr.mozilla.org/seamonkey/source/widget/src/windows/nsLookAndFeel.cpp * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/userex/functions/drawthemebackground.asp --- 24,28 ---- * Useful resources: * ! * http://lxr.mozilla.org/seamonkey/source/widget/src/windows/nsNativeThemeWin.cpp * http://lxr.mozilla.org/seamonkey/source/widget/src/windows/nsLookAndFeel.cpp * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/userex/functions/drawthemebackground.asp |
From: Dom L. <ci...@us...> - 2005-11-25 18:15:07
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8542 Modified Files: msw_style.c xp_theme.c xp_theme.h xp_theme_defs.h Log Message: improved tab drawing Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** msw_style.c 25 Nov 2005 15:57:35 -0000 1.34 --- msw_style.c 25 Nov 2005 18:14:57 -0000 1.35 *************** *** 1852,1858 **** } ! /* this is an undefined magic value that, according to the mozilla folks, ! worked for all the various themes that they tried */ ! #define XP_EDGE_SIZE 2 static void --- 1852,1944 ---- } ! /* Draw classic Windows tab - thanks Mozilla! ! (no system API for this, but DrawEdge can draw all the parts of a tab) */ ! static void DrawTab(HDC hdc, const RECT R, gint32 aPosition, gboolean aSelected, ! gboolean aDrawLeft, gboolean aDrawRight) ! { ! gint32 leftFlag, topFlag, rightFlag, lightFlag, shadeFlag; ! RECT topRect, sideRect, bottomRect, lightRect, shadeRect; ! gint32 selectedOffset, lOffset, rOffset; ! ! selectedOffset = aSelected ? 1 : 0; ! lOffset = aDrawLeft ? 2 : 0; ! rOffset = aDrawRight ? 2 : 0; ! ! /* Get info for tab orientation/position (Left, Top, Right, Bottom) */ ! switch (aPosition) { ! case BF_LEFT: ! leftFlag = BF_TOP; topFlag = BF_LEFT; ! rightFlag = BF_BOTTOM; ! lightFlag = BF_DIAGONAL_ENDTOPRIGHT; ! shadeFlag = BF_DIAGONAL_ENDBOTTOMRIGHT; ! ! SetRect(&topRect, R.left, R.top+lOffset, R.right, R.bottom-rOffset); ! SetRect(&sideRect, R.left+2, R.top, R.right-2+selectedOffset, R.bottom); ! SetRect(&bottomRect, R.right-2, R.top, R.right, R.bottom); ! SetRect(&lightRect, R.left, R.top, R.left+3, R.top+3); ! SetRect(&shadeRect, R.left+1, R.bottom-2, R.left+2, R.bottom-1); ! break; ! case BF_TOP: ! leftFlag = BF_LEFT; topFlag = BF_TOP; ! rightFlag = BF_RIGHT; ! lightFlag = BF_DIAGONAL_ENDTOPRIGHT; ! shadeFlag = BF_DIAGONAL_ENDBOTTOMRIGHT; ! ! SetRect(&topRect, R.left+lOffset, R.top, R.right-rOffset, R.bottom); ! SetRect(&sideRect, R.left, R.top+2, R.right, R.bottom-1+selectedOffset); ! SetRect(&bottomRect, R.left, R.bottom-1, R.right, R.bottom); ! SetRect(&lightRect, R.left, R.top, R.left+3, R.top+3); ! SetRect(&shadeRect, R.right-2, R.top+1, R.right-1, R.top+2); ! break; ! case BF_RIGHT: ! leftFlag = BF_TOP; topFlag = BF_RIGHT; ! rightFlag = BF_BOTTOM; ! lightFlag = BF_DIAGONAL_ENDTOPLEFT; ! shadeFlag = BF_DIAGONAL_ENDBOTTOMLEFT; ! ! SetRect(&topRect, R.left, R.top+lOffset, R.right, R.bottom-rOffset); ! SetRect(&sideRect, R.left+2-selectedOffset, R.top, R.right-2, R.bottom); ! SetRect(&bottomRect, R.left, R.top, R.left+2, R.bottom); ! SetRect(&lightRect, R.right-3, R.top, R.right-1, R.top+2); ! SetRect(&shadeRect, R.right-2, R.bottom-3, R.right, R.bottom-1); ! break; ! case BF_BOTTOM: ! leftFlag = BF_LEFT; topFlag = BF_BOTTOM; ! rightFlag = BF_RIGHT; ! lightFlag = BF_DIAGONAL_ENDTOPLEFT; ! shadeFlag = BF_DIAGONAL_ENDBOTTOMLEFT; ! ! SetRect(&topRect, R.left+lOffset, R.top, R.right-rOffset, R.bottom); ! SetRect(&sideRect, R.left, R.top+2-selectedOffset, R.right, R.bottom-2); ! SetRect(&bottomRect, R.left, R.top, R.right, R.top+2); ! SetRect(&lightRect, R.left, R.bottom-3, R.left+2, R.bottom-1); ! SetRect(&shadeRect, R.right-2, R.bottom-3, R.right, R.bottom-1); ! break; ! } ! ! /* Background */ ! FillRect(hdc, &R, (HBRUSH) (COLOR_3DFACE+1) ); ! ! /* Tab "Top" */ ! DrawEdge(hdc, &topRect, EDGE_RAISED, BF_SOFT | topFlag); ! ! /* Tab "Bottom" */ ! if (!aSelected) ! DrawEdge(hdc, &bottomRect, EDGE_RAISED, BF_SOFT | topFlag); ! ! /* Tab "Sides" */ ! if (!aDrawLeft) ! leftFlag = 0; ! if (!aDrawRight) ! rightFlag = 0; ! DrawEdge(hdc, &sideRect, EDGE_RAISED, BF_SOFT | leftFlag | rightFlag); ! ! /* Tab Diagonal Corners */ ! if (aDrawLeft) ! DrawEdge(hdc, &lightRect, EDGE_RAISED, BF_SOFT | lightFlag); ! ! if (aDrawRight) ! DrawEdge(hdc, &shadeRect, EDGE_RAISED, BF_SOFT | shadeFlag); ! } static void *************** *** 1867,1907 **** gint y, gint width, gint height, GtkPositionType gap_side) { ! if (GTK_IS_NOTEBOOK (widget) && detail && !strcmp (detail, "tab")) { GtkNotebook *notebook = GTK_NOTEBOOK (widget); gint x2, y2, w2, h2; x2 = x; y2 = y; w2 = width; h2 = height; - if (gap_side == GTK_POS_TOP && state_type == GTK_STATE_NORMAL) - { - /* h2 += XP_EDGE_SIZE; */ - } - else if (gap_side == GTK_POS_BOTTOM - && state_type == GTK_STATE_NORMAL) - { - /* h2 += XP_EDGE_SIZE; */ - } - else if (gap_side == GTK_POS_LEFT - && state_type == GTK_STATE_NORMAL) - { - x2 += 1; - w2 -= XP_EDGE_SIZE; - } - else if (gap_side == GTK_POS_RIGHT - && state_type == GTK_STATE_NORMAL) - { - w2 -= (XP_EDGE_SIZE + 1); - } ! if (xp_theme_draw ! (window, gtk_notebook_get_current_page (notebook) == 0 ! ? XP_THEME_ELEMENT_TAB_ITEM_LEFT_EDGE ! : XP_THEME_ELEMENT_TAB_ITEM, ! style, x2, y2, w2, h2, state_type, area)) { ! return; } } --- 1953,2020 ---- gint y, gint width, gint height, GtkPositionType gap_side) { ! if (widget && GTK_IS_NOTEBOOK (widget) && detail && !strcmp (detail, "tab")) { GtkNotebook *notebook = GTK_NOTEBOOK (widget); gint x2, y2, w2, h2; + int tab_part = XP_THEME_ELEMENT_TAB_ITEM; + int real_gap_side = gtk_notebook_get_tab_pos (notebook); + /* why this differs from the above gap_side, i have no idea... */ x2 = x; y2 = y; w2 = width; h2 = height; ! if (xp_theme_draw (window, tab_part, ! style, x2, y2, w2, h2, (real_gap_side == GTK_POS_TOP ? state_type : GTK_STATE_SELECTED), area)) { ! return; ! } else if (real_gap_side == GTK_POS_TOP || real_gap_side == GTK_POS_BOTTOM) { ! /* experimental tab-drawing code from mozilla */ ! RECT rect; ! int xoff, yoff; ! HDC dc; ! GdkDrawable *drawable; ! GdkGC * gc = style->dark_gc[GTK_STATE_NORMAL]; ! ! if (!GDK_IS_WINDOW (window)) ! { ! xoff = 0; ! yoff = 0; ! drawable = window; ! } ! else ! { ! gdk_window_get_internal_paint_info (window, &drawable, &xoff, &yoff); ! } ! ! rect.left = x - xoff; ! rect.top = y - yoff; ! rect.right = rect.left + width; ! rect.bottom = rect.top + height; ! ! if(state_type == GTK_STATE_NORMAL) ! rect.bottom += 1; ! ! dc = gdk_win32_hdc_get (drawable, gc, 0); ! if (dc) { ! gint32 aPosition; ! ! if (real_gap_side == GTK_POS_TOP) ! aPosition = BF_TOP; ! else if (real_gap_side == GTK_POS_BOTTOM) ! aPosition = BF_BOTTOM; ! else if (real_gap_side == GTK_POS_LEFT) ! aPosition = BF_LEFT; ! else ! aPosition = BF_RIGHT; ! ! if (area) ! gdk_gc_set_clip_rectangle (gc, area); ! DrawTab (dc, rect, aPosition, state_type == GTK_STATE_ACTIVE, (real_gap_side != GTK_POS_LEFT), (real_gap_side != GTK_POS_RIGHT)); ! if (area) ! gdk_gc_set_clip_rectangle (gc, NULL); ! gdk_win32_hdc_release (drawable, gc, 0); ! } } } *************** *** 1920,1926 **** if (GTK_IS_NOTEBOOK (widget) && detail && !strcmp (detail, "notebook")) { ! /* FIXME: pos != TOP to be implemented */ ! if (gap_side == GTK_POS_TOP ! && xp_theme_draw (window, XP_THEME_ELEMENT_TAB_PANE, style, x, y, width, height, state_type, area)) { --- 2033,2037 ---- if (GTK_IS_NOTEBOOK (widget) && detail && !strcmp (detail, "notebook")) { ! if (xp_theme_draw (window, XP_THEME_ELEMENT_TAB_PANE, style, x, y, width, height, state_type, area)) { Index: xp_theme_defs.h =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/xp_theme_defs.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** xp_theme_defs.h 26 Jun 2005 01:41:41 -0000 1.11 --- xp_theme_defs.h 25 Nov 2005 18:14:57 -0000 1.12 *************** *** 34,159 **** #define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE) ! #define BP_PUSHBUTTON 1 ! #define BP_CHECKBOX 3 ! ! #define HP_HEADERITEM 1 ! ! #define CP_DROPDOWNBUTTON 1 ! ! #define TABP_TABITEM 1 ! #define TABP_TABITEMLEFTEDGE 2 ! #define TABP_PANE 9 ! #define TABP_BODY 10 ! ! #define SBP_ARROWBTN 1 ! #define SBP_THUMBBTNHORZ 2 ! #define SBP_THUMBBTNVERT 3 ! #define SBP_LOWERTRACKHORZ 4 ! #define SBP_UPPERTRACKHORZ 5 ! #define SBP_LOWERTRACKVERT 6 ! #define SBP_UPPERTRACKVERT 7 ! #define SBP_GRIPPERHORZ 8 ! #define SBP_GRIPPERVERT 9 ! ! #define EP_EDITTEXT 1 ! ! #define SPNP_UP 1 ! #define SPNP_DOWN 2 ! ! #define BP_RADIOBUTTON 2 ! ! #define TVP_GLYPH 2 ! ! #define PP_BAR 1 ! #define PP_BARVERT 2 ! #define PP_CHUNK 3 ! #define PP_CHUNKVERT 4 ! ! #define TTP_STANDARD 1 ! ! #define RP_GRIPPER 1 ! #define RP_GRIPPERVERT 2 ! #define RP_BAND 3 ! #define RP_CHEVRON 4 ! ! #define TP_BUTTON 1 ! #define TS_NORMAL 1 ! #define TS_HOT 2 ! #define TS_PRESSED 3 ! #define TS_DISABLED 4 ! ! #define TTSS_NORMAL 1 ! ! #define CHEVS_NORMAL 1 ! #define CHEVS_HOT 2 ! #define CHEVS_PRESSED 3 ! ! #define TIS_NORMAL 1 ! #define TIS_HOT 2 ! #define TIS_SELECTED 3 ! #define TIS_DISABLED 4 ! ! #define ETS_NORMAL 1 ! #define ETS_FOCUSED 5 ! #define ETS_READONLY 6 ! ! #define SCRBS_NORMAL 1 ! #define SCRBS_HOT 2 ! #define SCRBS_PRESSED 3 ! #define SCRBS_DISABLED 4 ! ! #define ABS_UPNORMAL 1 ! #define ABS_UPHOT 2 ! #define ABS_UPPRESSED 3 ! #define ABS_UPDISABLED 4 ! #define ABS_DOWNNORMAL 5 ! #define ABS_DOWNHOT 6 ! #define ABS_DOWNPRESSED 7 ! #define ABS_DOWNDISABLED 8 ! #define ABS_LEFTNORMAL 9 ! #define ABS_LEFTHOT 10 ! #define ABS_LEFTPRESSED 11 ! #define ABS_LEFTDISABLED 12 ! #define ABS_RIGHTNORMAL 13 ! #define ABS_RIGHTHOT 14 ! #define ABS_RIGHTPRESSED 15 ! #define ABS_RIGHTDISABLED 16 ! ! #define CBS_UNCHECKEDNORMAL 1 ! #define CBS_UNCHECKEDHOT 2 ! #define CBS_UNCHECKEDPRESSED 3 ! #define CBS_UNCHECKEDDISABLED 4 ! #define CBS_CHECKEDNORMAL 5 ! #define CBS_CHECKEDHOT 6 ! #define CBS_CHECKEDPRESSED 7 ! #define CBS_CHECKEDDISABLED 8 ! ! #define PBS_NORMAL 1 ! #define PBS_HOT 2 ! #define PBS_PRESSED 3 ! #define PBS_DISABLED 4 ! #define PBS_DEFAULTED 5 ! ! #define DNS_NORMAL 1 ! #define DNS_HOT 2 ! #define DNS_PRESSED 3 ! #define DNS_DISABLED 4 ! ! #define UPS_NORMAL 1 ! #define UPS_HOT 2 ! #define UPS_PRESSED 3 ! #define UPS_DISABLED 4 ! ! #define GLPS_CLOSED 1 ! #define GLPS_OPENED 2 ! ! #define MP_MENUITEM 1 ! #define MP_SEPARATOR 6 ! #define MS_NORMAL 1 ! #define MS_SELECTED 2 ! #define MS_DEMOTED 3 ! ! #define SP_PANE 2 ! #define SP_GRIPPER 3 #endif /* XP_THEME_DFNS_H */ --- 34,258 ---- #define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE) ! enum { ! BP_PUSHBUTTON = 1, BP_RADIOBUTTON = 2, BP_CHECKBOX = 3, BP_GROUPBOX = 4, ! BP_USERBUTTON = 5 ! }; ! enum { ! CBS_UNCHECKEDNORMAL = 1, CBS_UNCHECKEDHOT = 2, CBS_UNCHECKEDPRESSED = 3, CBS_UNCHECKEDDISABLED = 4, ! CBS_CHECKEDNORMAL = 5, CBS_CHECKEDHOT = 6, CBS_CHECKEDPRESSED = 7, CBS_CHECKEDDISABLED = 8, ! CBS_MIXEDNORMAL = 9, CBS_MIXEDHOT = 10, CBS_MIXEDPRESSED = 11, CBS_MIXEDDISABLED = 12 ! }; ! enum { GBS_NORMAL = 1, GBS_DISABLED = 2 };; ! enum { ! PBS_NORMAL = 1, PBS_HOT = 2, PBS_PRESSED = 3, PBS_DISABLED = 4, ! PBS_DEFAULTED = 5 ! }; ! enum { ! RBS_UNCHECKEDNORMAL = 1, RBS_UNCHECKEDHOT = 2, RBS_UNCHECKEDPRESSED = 3, RBS_UNCHECKEDDISABLED = 4, ! RBS_CHECKEDNORMAL = 5, RBS_CHECKEDHOT = 6, RBS_CHECKEDPRESSED = 7, RBS_CHECKEDDISABLED = 8 ! }; ! enum { CLP_TIME = 1 }; ! enum { CLS_NORMAL = 1 }; ! enum { CP_DROPDOWNBUTTON = 1 }; ! enum { CBXS_NORMAL = 1, CBXS_HOT = 2, CBXS_PRESSED = 3, CBXS_DISABLED = 4 }; ! enum { EP_EDITTEXT = 1, EP_CARET = 2 }; ! enum { ! ETS_NORMAL = 1, ETS_HOT = 2, ETS_SELECTED = 3, ETS_DISABLED = 4, ! ETS_FOCUSED = 5, ETS_READONLY = 6, ETS_ASSIST = 7 ! }; ! enum { ! EBP_HEADERBACKGROUND = 1, EBP_HEADERCLOSE = 2, EBP_HEADERPIN = 3, EBP_IEBARMENU = 4, ! EBP_NORMALGROUPBACKGROUND = 5, EBP_NORMALGROUPCOLLAPSE = 6, EBP_NORMALGROUPEXPAND = 7, EBP_NORMALGROUPHEAD = 8, ! EBP_SPECIALGROUPBACKGROUND = 9, EBP_SPECIALGROUPCOLLAPSE = 10, EBP_SPECIALGROUPEXPAND = 11, EBP_SPECIALGROUPHEAD = 12 ! }; ! enum { EBHC_NORMAL = 1, EBHC_HOT = 2, EBHC_PRESSED = 3 }; ! enum { ! EBHP_NORMAL = 1, EBHP_HOT = 2, EBHP_PRESSED = 3, EBHP_SELECTEDNORMAL = 4, ! EBHP_SELECTEDHOT = 5, EBHP_SELECTEDPRESSED = 6 ! }; ! enum { EBM_NORMAL = 1, EBM_HOT = 2, EBM_PRESSED = 3 }; ! enum { EBNGC_NORMAL = 1, EBNGC_HOT = 2, EBNGC_PRESSED = 3 }; ! enum { EBNGE_NORMAL = 1, EBNGE_HOT = 2, EBNGE_PRESSED = 3 }; ! enum { EBSGC_NORMAL = 1, EBSGC_HOT = 2, EBSGC_PRESSED = 3 }; ! enum { EBSGE_NORMAL = 1, EBSGE_HOT = 2, EBSGE_PRESSED = 3 }; ! enum { HP_HEADERITEM = 1, HP_HEADERITEMLEFT = 2, HP_HEADERITEMRIGHT = 3, HP_HEADERSORTARROW = 4 }; ! enum { HIS_NORMAL = 1, HIS_HOT = 2, HIS_PRESSED = 3 }; ! enum { HILS_NORMAL = 1, HILS_HOT = 2, HILS_PRESSED = 3 }; ! enum { HIRS_NORMAL = 1, HIRS_HOT = 2, HIRS_PRESSED = 3 }; ! enum { HSAS_SORTEDUP = 1, HSAS_SORTEDDOWN = 2 }; ! enum { ! LVP_LISTITEM = 1, LVP_LISTGROUP = 2, LVP_LISTDETAIL = 3, LVP_LISTSORTEDDETAIL = 4, ! LVP_EMPTYTEXT = 5 ! }; ! enum { ! LIS_NORMAL = 1, LIS_HOT = 2, LIS_SELECTED = 3, LIS_DISABLED = 4, ! LIS_SELECTEDNOTFOCUS = 5 ! }; ! enum { ! MP_MENUITEM = 1, MP_MENUDROPDOWN = 2, MP_MENUBARITEM = 3, MP_MENUBARDROPDOWN = 4, ! MP_CHEVRON = 5, MP_SEPARATOR = 6 ! }; ! enum { MS_NORMAL = 1, MS_SELECTED = 2, MS_DEMOTED = 3 }; ! enum { MDP_NEWAPPBUTTON = 1, MDP_SEPERATOR = 2 }; ! enum { ! MDS_NORMAL = 1, MDS_HOT = 2, MDS_PRESSED = 3, MDS_DISABLED = 4, ! MDS_CHECKED = 5, MDS_HOTCHECKED = 6 ! }; ! enum { PGRP_UP = 1, PGRP_DOWN = 2, PGRP_UPHORZ = 3, PGRP_DOWNHORZ = 4 }; ! enum { DNS_NORMAL = 1, DNS_HOT = 2, DNS_PRESSED = 3, DNS_DISABLED = 4 }; ! enum { DNHZS_NORMAL = 1, DNHZS_HOT = 2, DNHZS_PRESSED = 3, DNHZS_DISABLED = 4 }; ! enum { UPS_NORMAL = 1, UPS_HOT = 2, UPS_PRESSED = 3, UPS_DISABLED = 4 }; ! enum { UPHZS_NORMAL = 1, UPHZS_HOT = 2, UPHZS_PRESSED = 3, UPHZS_DISABLED = 4 }; ! enum { PP_BAR = 1, PP_BARVERT = 2, PP_CHUNK = 3, PP_CHUNKVERT = 4 }; ! enum { ! RP_GRIPPER = 1, RP_GRIPPERVERT = 2, RP_BAND = 3, RP_CHEVRON = 4, ! RP_CHEVRONVERT = 5 ! }; ! enum { CHEVS_NORMAL = 1, CHEVS_HOT = 2, CHEVS_PRESSED = 3 }; ! enum { ! SBP_ARROWBTN = 1, SBP_THUMBBTNHORZ = 2, SBP_THUMBBTNVERT = 3, SBP_LOWERTRACKHORZ = 4, ! SBP_UPPERTRACKHORZ = 5, SBP_LOWERTRACKVERT = 6, SBP_UPPERTRACKVERT = 7, SBP_GRIPPERHORZ = 8, ! SBP_GRIPPERVERT = 9, SBP_SIZEBOX = 10 ! }; ! enum { ! ABS_UPNORMAL = 1, ABS_UPHOT = 2, ABS_UPPRESSED = 3, ABS_UPDISABLED = 4, ! ABS_DOWNNORMAL = 5, ABS_DOWNHOT = 6, ABS_DOWNPRESSED = 7, ABS_DOWNDISABLED = 8, ! ABS_LEFTNORMAL = 9, ABS_LEFTHOT = 10, ABS_LEFTPRESSED = 11, ABS_LEFTDISABLED = 12, ! ABS_RIGHTNORMAL = 13, ABS_RIGHTHOT = 14, ABS_RIGHTPRESSED = 15, ABS_RIGHTDISABLED = 16 ! }; ! enum { SCRBS_NORMAL = 1, SCRBS_HOT = 2, SCRBS_PRESSED = 3, SCRBS_DISABLED = 4 }; ! enum { SZB_RIGHTALIGN = 1, SZB_LEFTALIGN = 2 }; ! enum { SPNP_UP = 1, SPNP_DOWN = 2, SPNP_UPHORZ = 3, SPNP_DOWNHORZ = 4 }; ! enum { ! SPP_USERPANE = 1, SPP_MOREPROGRAMS = 2, SPP_MOREPROGRAMSARROW = 3, SPP_PROGLIST = 4, ! SPP_PROGLISTSEPARATOR = 5, SPP_PLACESLIST = 6, SPP_PLACESLISTSEPARATOR = 7, SPP_LOGOFF = 8, ! SPP_LOGOFFBUTTONS = 9, SPP_USERPICTURE = 10, SPP_PREVIEW = 11 ! }; ! enum { SPLS_NORMAL = 1, SPLS_HOT = 2, SPLS_PRESSED = 3 }; ! enum { SPS_NORMAL = 1, SPS_HOT = 2, SPS_PRESSED = 3 }; ! enum { SP_PANE = 1, SP_GRIPPERPANE = 2, SP_GRIPPER = 3 }; ! enum { ! TABP_TABITEM = 1, TABP_TABITEMLEFTEDGE = 2, TABP_TABITEMRIGHTEDGE = 3, TABP_TABITEMBOTHEDGE = 4, ! TABP_TOPTABITEM = 5, TABP_TOPTABITEMLEFTEDGE = 6, TABP_TOPTABITEMRIGHTEDGE = 7, TABP_TOPTABITEMBOTHEDGE = 8, ! TABP_PANE = 9, TABP_BODY = 10 ! }; ! enum { ! TIS_NORMAL = 1, TIS_HOT = 2, TIS_SELECTED = 3, TIS_DISABLED = 4, ! TIS_FOCUSED = 5 ! }; ! enum { ! TIBES_NORMAL = 1, TIBES_HOT = 2, TIBES_SELECTED = 3, TIBES_DISABLED = 4, ! TIBES_FOCUSED = 5 ! }; ! enum { ! TILES_NORMAL = 1, TILES_HOT = 2, TILES_SELECTED = 3, TILES_DISABLED = 4, ! TILES_FOCUSED = 5 ! }; ! enum { ! TIRES_NORMAL = 1, TIRES_HOT = 2, TIRES_SELECTED = 3, TIRES_DISABLED = 4, ! TIRES_FOCUSED = 5 ! }; ! enum { ! TTIS_NORMAL = 1, TTIS_HOT = 2, TTIS_SELECTED = 3, TTIS_DISABLED = 4, ! TTIS_FOCUSED = 5 ! }; ! enum { ! TTIBES_NORMAL = 1, TTIBES_HOT = 2, TTIBES_SELECTED = 3, TTIBES_DISABLED = 4, ! TTIBES_FOCUSED = 5 ! }; ! enum { ! TTILES_NORMAL = 1, TTILES_HOT = 2, TTILES_SELECTED = 3, TTILES_DISABLED = 4, ! TTILES_FOCUSED = 5 ! }; ! enum { ! TTIRES_NORMAL = 1, TTIRES_HOT = 2, TTIRES_SELECTED = 3, TTIRES_DISABLED = 4, ! TTIRES_FOCUSED = 5 ! }; ! enum { TDP_GROUPCOUNT = 1, TDP_FLASHBUTTON = 2, TDP_FLASHBUTTONGROUPMENU = 3 }; ! enum { ! TBP_BACKGROUNDBOTTOM = 1, TBP_BACKGROUNDRIGHT = 2, TBP_BACKGROUNDTOP = 3, TBP_BACKGROUNDLEFT = 4, ! TBP_SIZINGBARBOTTOM = 5, TBP_SIZINGBARRIGHT = 6, TBP_SIZINGBARTOP = 7, TBP_SIZINGBARLEFT = 8 ! }; ! enum { ! TP_BUTTON = 1, TP_DROPDOWNBUTTON = 2, TP_SPLITBUTTON = 3, TP_SPLITBUTTONDROPDOWN = 4, ! TP_SEPARATOR = 5, TP_SEPARATORVERT = 6 ! }; ! enum { ! TS_NORMAL = 1, TS_HOT = 2, TS_PRESSED = 3, TS_DISABLED = 4, ! TS_CHECKED = 5, TS_HOTCHECKED = 6 ! }; ! enum { ! TTP_STANDARD = 1, TTP_STANDARDTITLE = 2, TTP_BALLOON = 3, TTP_BALLOONTITLE = 4, ! TTP_CLOSE = 5 ! }; ! enum { TTBS_NORMAL = 1, TTBS_LINK = 2 }; ! enum { TTCS_NORMAL = 1, TTCS_HOT = 2, TTCS_PRESSED = 3 }; ! enum { TTSS_NORMAL = 1, TTSS_LINK = 2 }; ! enum { ! TKP_TRACK = 1, TKP_TRACKVERT = 2, TKP_THUMB = 3, TKP_THUMBBOTTOM = 4, ! TKP_THUMBTOP = 5, TKP_THUMBVERT = 6, TKP_THUMBLEFT = 7, TKP_THUMBRIGHT = 8, ! TKP_TICS = 9, TKP_TICSVERT = 10 ! }; ! enum { ! TUS_NORMAL = 1, TUS_HOT = 2, TUS_PRESSED = 3, TUS_FOCUSED = 4, ! TUS_DISABLED = 5 ! }; ! enum { ! TUBS_NORMAL = 1, TUBS_HOT = 2, TUBS_PRESSED = 3, TUBS_FOCUSED = 4, ! TUBS_DISABLED = 5 ! }; ! enum { ! TUVLS_NORMAL = 1, TUVLS_HOT = 2, TUVLS_PRESSED = 3, TUVLS_FOCUSED = 4, ! TUVLS_DISABLED = 5 ! }; ! enum { ! TUVRS_NORMAL = 1, TUVRS_HOT = 2, TUVRS_PRESSED = 3, TUVRS_FOCUSED = 4, ! TUVRS_DISABLED = 5 ! }; ! enum { ! TUTS_NORMAL = 1, TUTS_HOT = 2, TUTS_PRESSED = 3, TUTS_FOCUSED = 4, ! TUTS_DISABLED = 5 ! }; ! enum { ! TUVS_NORMAL = 1, TUVS_HOT = 2, TUVS_PRESSED = 3, TUVS_FOCUSED = 4, ! TUVS_DISABLED = 5 ! }; ! enum { TSS_NORMAL = 1 }; ! enum { TSVS_NORMAL = 1 }; ! enum { TRS_NORMAL = 1 }; ! enum { TRVS_NORMAL = 1 }; ! enum { TNP_BACKGROUND = 1, TNP_ANIMBACKGROUND = 2 }; ! enum { TVP_TREEITEM = 1, TVP_GLYPH = 2, TVP_BRANCH = 3 }; ! enum { GLPS_CLOSED = 1, GLPS_OPENED = 2 }; ! enum { ! TREIS_NORMAL = 1, TREIS_HOT = 2, TREIS_SELECTED = 3, TREIS_DISABLED = 4, ! TREIS_SELECTEDNOTFOCUS = 5 ! }; ! enum { ! WP_CAPTION = 1, WP_SMALLCAPTION = 2, WP_MINCAPTION = 3, WP_SMALLMINCAPTION = 4, ! WP_MAXCAPTION = 5, WP_SMALLMAXCAPTION = 6, WP_FRAMELEFT = 7, WP_FRAMERIGHT = 8, ! WP_FRAMEBOTTOM = 9, WP_SMALLFRAMELEFT = 10, WP_SMALLFRAMERIGHT = 11, WP_SMALLFRAMEBOTTOM = 12, ! WP_SYSBUTTON = 13, WP_MDISYSBUTTON = 14, WP_MINBUTTON = 15, WP_MDIMINBUTTON = 16, ! WP_MAXBUTTON = 17, WP_CLOSEBUTTON = 18, WP_SMALLCLOSEBUTTON = 19, WP_MDICLOSEBUTTON = 20, ! WP_RESTOREBUTTON = 21, WP_MDIRESTOREBUTTON = 22, WP_HELPBUTTON = 23, WP_MDIHELPBUTTON = 24, ! WP_HORZSCROLL = 25, WP_HORZTHUMB = 26, WP_VERTSCROLL = 27, WP_VERTTHUMB = 28, ! WP_DIALOG = 29, WP_CAPTIONSIZINGTEMPLATE = 30, WP_SMALLCAPTIONSIZINGTEMPLATE = 31, WP_FRAMELEFTSIZINGTEMPLATE = 32, ! WP_SMALLFRAMELEFTSIZINGTEMPLATE = 33, WP_FRAMERIGHTSIZINGTEMPLATE = 34, WP_SMALLFRAMERIGHTSIZINGTEMPLATE = 35, WP_FRAMEBOTTOMSIZINGTEMPLATE = 36, ! WP_SMALLFRAMEBOTTOMSIZINGTEMPLATE = 37 ! }; ! enum { CS_ACTIVE = 1, CS_INACTIVE = 2, CS_DISABLED = 3 }; ! enum { CBS_NORMAL = 1, CBS_HOT = 2, CBS_PUSHED = 3, CBS_DISABLED = 4 }; ! enum { FS_ACTIVE = 1, FS_INACTIVE = 2 }; ! enum { HBS_NORMAL = 1, HBS_HOT = 2, HBS_PUSHED = 3, HBS_DISABLED = 4 }; ! enum { HSS_NORMAL = 1, HSS_HOT = 2, HSS_PUSHED = 3, HSS_DISABLED = 4 }; ! enum { HTS_NORMAL = 1, HTS_HOT = 2, HTS_PUSHED = 3, HTS_DISABLED = 4 }; ! enum { MAXBS_NORMAL = 1, MAXBS_HOT = 2, MAXBS_PUSHED = 3, MAXBS_DISABLED = 4 }; ! enum { MXCS_ACTIVE = 1, MXCS_INACTIVE = 2, MXCS_DISABLED = 3 }; ! enum { MINBS_NORMAL = 1, MINBS_HOT = 2, MINBS_PUSHED = 3, MINBS_DISABLED = 4 }; ! enum { RBS_NORMAL = 1, RBS_HOT = 2, RBS_PUSHED = 3, RBS_DISABLED = 4 }; ! enum { SBS_NORMAL = 1, SBS_HOT = 2, SBS_PUSHED = 3, SBS_DISABLED = 4 }; ! enum { MNCS_ACTIVE = 1, MNCS_INACTIVE = 2, MNCS_DISABLED = 3 }; ! enum { VSS_NORMAL = 1, VSS_HOT = 2, VSS_PUSHED = 3, VSS_DISABLED = 4 }; ! enum { VTS_NORMAL = 1, VTS_HOT = 2, VTS_PUSHED = 3, VTS_DISABLED = 4 }; #endif /* XP_THEME_DFNS_H */ Index: xp_theme.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/xp_theme.c,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** xp_theme.c 12 Nov 2005 14:09:10 -0000 1.41 --- xp_theme.c 25 Nov 2005 18:14:57 -0000 1.42 *************** *** 34,43 **** #include "gdk/gdkwin32.h" - #ifdef HAVE_UXTHEME_H - #include <uxtheme.h> - #include <tmschema.h> - #else #include "xp_theme_defs.h" - #endif #ifndef TMT_CAPTIONFONT --- 34,38 ---- *************** *** 86,90 **** L"Header", /* XP_THEME_CLASS_HEADER */ L"ComboBox", /* XP_THEME_CLASS_COMBOBOX */ ! L"Tab", /* XP_THEME_CLASS_TAB */ L"Edit", /* XP_THEME_CLASS_EDIT */ L"TreeView", /* XP_THEME_CLASS_TREEVIEW */ --- 81,85 ---- L"Header", /* XP_THEME_CLASS_HEADER */ L"ComboBox", /* XP_THEME_CLASS_COMBOBOX */ ! L"Tab", /* XP_THEME_CLASS_TAB */ L"Edit", /* XP_THEME_CLASS_EDIT */ L"TreeView", /* XP_THEME_CLASS_TREEVIEW */ *************** *** 110,113 **** --- 105,109 ---- TABP_TABITEM, TABP_TABITEMLEFTEDGE, + TABP_TABITEMRIGHTEDGE, TABP_PANE, SBP_THUMBBTNHORZ, *************** *** 365,368 **** --- 361,365 ---- case XP_THEME_ELEMENT_TAB_ITEM: case XP_THEME_ELEMENT_TAB_ITEM_LEFT_EDGE: + case XP_THEME_ELEMENT_TAB_ITEM_RIGHT_EDGE: case XP_THEME_ELEMENT_TAB_PANE: klazz = XP_THEME_CLASS_TAB; *************** *** 486,489 **** --- 483,487 ---- case XP_THEME_ELEMENT_TAB_ITEM_LEFT_EDGE: + case XP_THEME_ELEMENT_TAB_ITEM_RIGHT_EDGE: case XP_THEME_ELEMENT_TAB_ITEM: switch (state) Index: xp_theme.h =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/xp_theme.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** xp_theme.h 27 Jun 2005 14:54:40 -0000 1.19 --- xp_theme.h 25 Nov 2005 18:14:57 -0000 1.20 *************** *** 58,61 **** --- 58,62 ---- XP_THEME_ELEMENT_TAB_ITEM, XP_THEME_ELEMENT_TAB_ITEM_LEFT_EDGE, + XP_THEME_ELEMENT_TAB_ITEM_RIGHT_EDGE, XP_THEME_ELEMENT_TAB_PANE, XP_THEME_ELEMENT_SCROLLBAR_H, |
From: Dom L. <ci...@us...> - 2005-11-25 15:57:47
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8258 Modified Files: msw_style.c Log Message: sf.net bug 1289631 - expander arrow glitch Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** msw_style.c 12 Nov 2005 14:09:10 -0000 1.33 --- msw_style.c 25 Nov 2005 15:57:35 -0000 1.34 *************** *** 291,297 **** size_t i, l, nbytes; ! /* If lfFaceName is ASCII, assume it is the common (English) name for the font. Is this valid? Do some TrueType fonts have different names in ! French, German, etc, and does the system return these if the locale is set to use French, German, etc? */ l = strlen (lfp->lfFaceName); --- 291,297 ---- size_t i, l, nbytes; ! /* If lfFaceName is ASCII, assume it is the common (English) name for the font. Is this valid? Do some TrueType fonts have different names in ! French, German, etc, and does the system return these if the locale is set to use French, German, etc? */ l = strlen (lfp->lfFaceName); *************** *** 330,334 **** record.platform_id == ISO_PLATFORM_ID) unicode_ix = i; ! else if (record.platform_id == MACINTOSH_PLATFORM_ID && record.encoding_id == 0 && /* Roman */ record.language_id == 0) /* English */ --- 330,334 ---- record.platform_id == ISO_PLATFORM_ID) unicode_ix = i; ! else if (record.platform_id == MACINTOSH_PLATFORM_ID && record.encoding_id == 0 && /* Roman */ record.language_id == 0) /* English */ *************** *** 561,565 **** setup_menu_settings (settings); ! /* http://developer.gnome.org/doc/API/2.0/gtk/GtkSettings.html http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/systemparametersinfo.asp --- 561,565 ---- setup_menu_settings (settings); ! /* http://developer.gnome.org/doc/API/2.0/gtk/GtkSettings.html http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/systemparametersinfo.asp *************** *** 1058,1062 **** gdk_draw_line (window, style->fg_gc[state], x + 2, y + expander_semi_size, ! x + expander_size - 2, y + expander_semi_size); switch (expander_style) --- 1058,1062 ---- gdk_draw_line (window, style->fg_gc[state], x + 2, y + expander_semi_size, ! x + expander_size - 3, y + expander_semi_size); switch (expander_style) *************** *** 1067,1071 **** (window, style->fg_gc[state], x + expander_semi_size, y + 2, x + expander_semi_size, ! y + expander_size - 2); break; --- 1067,1071 ---- (window, style->fg_gc[state], x + expander_semi_size, y + 2, x + expander_semi_size, ! y + expander_size - 3); break; *************** *** 1518,1522 **** /* Do not display grippers on tiny scroll bars, ! the limit imposed is rather arbitrary, perhaps we can fetch the gripper geometry from somewhere and use that... */ --- 1518,1522 ---- /* Do not display grippers on tiny scroll bars, ! the limit imposed is rather arbitrary, perhaps we can fetch the gripper geometry from somewhere and use that... */ |
From: Dom L. <ci...@us...> - 2005-11-12 14:09:18
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18750 Modified Files: msw_rc_style.c msw_style.c msw_theme_main.c xp_theme.c Log Message: indentation fixes to be more in line with the GTK+ style Index: msw_rc_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_rc_style.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** msw_rc_style.c 3 May 2005 20:06:36 -0000 1.2 --- msw_rc_style.c 12 Nov 2005 14:09:10 -0000 1.3 *************** *** 1,78 **** ! /* MS-Windows Engine (aka GTK-Wimp) ! * ! * Copyright (C) 2003, 2004 Raymond Penners <ra...@do...> ! * Includes code adapted from redmond95 by Owen Taylor, and ! * gtk-nativewin by Evan Martin ! * ! * This library is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Library General Public ! * License as published by the Free Software Foundation; either ! * version 2 of the License, or (at your option) any later version. ! * ! * This library is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Library General Public License for more details. ! * ! * You should have received a copy of the GNU Library General Public ! * License along with this library; if not, write to the ! * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! * Boston, MA 02111-1307, USA. ! */ ! ! #include "msw_style.h" ! #include "msw_rc_style.h" ! ! static void msw_rc_style_init (MswRcStyle *style); ! static void msw_rc_style_class_init (MswRcStyleClass *klass); ! static GtkStyle *msw_rc_style_create_style (GtkRcStyle *rc_style); ! ! static GtkRcStyleClass *parent_class; ! ! GType msw_type_rc_style = 0; ! ! void ! msw_rc_style_register_type (GTypeModule *module) ! { ! static const GTypeInfo object_info = ! { ! sizeof (MswRcStyleClass), ! (GBaseInitFunc) NULL, ! (GBaseFinalizeFunc) NULL, ! (GClassInitFunc) msw_rc_style_class_init, ! NULL, /* class_finalize */ ! NULL, /* class_data */ ! sizeof (MswRcStyle), ! 0, /* n_preallocs */ ! (GInstanceInitFunc) msw_rc_style_init, ! }; ! ! msw_type_rc_style = g_type_module_register_type (module, ! GTK_TYPE_RC_STYLE, ! "MswRcStyle", ! &object_info, 0); ! } ! ! static void ! msw_rc_style_init (MswRcStyle *style) ! { ! } ! ! static void ! msw_rc_style_class_init (MswRcStyleClass *klass) ! { ! GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass); ! ! parent_class = g_type_class_peek_parent (klass); ! ! rc_style_class->create_style = msw_rc_style_create_style; ! } ! ! /* Create an empty style suitable to this RC style ! */ ! static GtkStyle * ! msw_rc_style_create_style (GtkRcStyle *rc_style) ! { ! return g_object_new (MSW_TYPE_STYLE, NULL); ! } ! --- 1,76 ---- ! /* MS-Windows Engine (aka GTK-Wimp) ! * ! * Copyright (C) 2003, 2004 Raymond Penners <ra...@do...> ! * Includes code adapted from redmond95 by Owen Taylor, and ! * gtk-nativewin by Evan Martin ! * ! * This library is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Library General Public ! * License as published by the Free Software Foundation; either ! * version 2 of the License, or (at your option) any later version. ! * ! * This library is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Library General Public License for more details. ! * ! * You should have received a copy of the GNU Library General Public ! * License along with this library; if not, write to the ! * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! * Boston, MA 02111-1307, USA. ! */ ! ! #include "msw_style.h" ! #include "msw_rc_style.h" ! ! static void msw_rc_style_init (MswRcStyle * style); ! static void msw_rc_style_class_init (MswRcStyleClass * klass); ! static GtkStyle *msw_rc_style_create_style (GtkRcStyle * rc_style); ! ! static GtkRcStyleClass *parent_class; ! ! GType msw_type_rc_style = 0; ! ! void ! msw_rc_style_register_type (GTypeModule * module) ! { ! static const GTypeInfo object_info = { ! sizeof (MswRcStyleClass), ! (GBaseInitFunc) NULL, ! (GBaseFinalizeFunc) NULL, ! (GClassInitFunc) msw_rc_style_class_init, ! NULL, /* class_finalize */ ! NULL, /* class_data */ ! sizeof (MswRcStyle), ! 0, /* n_preallocs */ ! (GInstanceInitFunc) msw_rc_style_init, ! }; ! ! msw_type_rc_style = g_type_module_register_type (module, ! GTK_TYPE_RC_STYLE, ! "MswRcStyle", ! &object_info, 0); ! } ! ! static void ! msw_rc_style_init (MswRcStyle * style) ! { ! } ! ! static void ! msw_rc_style_class_init (MswRcStyleClass * klass) ! { ! GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass); ! ! parent_class = g_type_class_peek_parent (klass); ! ! rc_style_class->create_style = msw_rc_style_create_style; ! } ! ! /* Create an empty style suitable to this RC style ! */ ! static GtkStyle * ! msw_rc_style_create_style (GtkRcStyle * rc_style) ! { ! return g_object_new (MSW_TYPE_STYLE, NULL); ! } Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** msw_style.c 12 Nov 2005 04:15:17 -0000 1.32 --- msw_style.c 12 Nov 2005 14:09:10 -0000 1.33 *************** *** 40,43 **** --- 40,44 ---- #include "gtk/gtk.h" #include <gdk/gdkwin32.h> + /* #include "gdk/win32/gdkwin32.h" */ *************** *** 50,67 **** static GtkStyleClass *parent_class; [...4342 lines suppressed...] ! GTK_TYPE_STYLE, ! "MswStyle", ! &object_info, 0); } *************** *** 2182,2187 **** msw_style_init (void) { ! xp_theme_init (); ! msw_style_setup_system_settings (); ! setup_msw_rc_style (); } --- 2362,2367 ---- msw_style_init (void) { ! xp_theme_init (); ! msw_style_setup_system_settings (); ! setup_msw_rc_style (); } Index: xp_theme.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/xp_theme.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** xp_theme.c 27 Jun 2005 14:54:40 -0000 1.40 --- xp_theme.c 12 Nov 2005 14:09:10 -0000 1.41 *************** *** 42,45 **** --- 42,46 ---- #ifndef TMT_CAPTIONFONT + /* These aren't in mingw's "w32api" headers, nor in the Platform SDK * headers. *************** *** 80,157 **** #define TRS_NORMAL 1 [...1642 lines suppressed...] ! } ! ! return FALSE; } gboolean ! xp_theme_get_system_metric (XpThemeClass klazz, int metricId, OUT int *pVal) { ! if (xp_theme_is_active () && get_theme_sys_metric_func != NULL) ! { ! HTHEME theme = xp_theme_get_handle_by_class (klazz); ! /* if theme is NULL, it will just return the GetSystemMetrics() ! value */ ! *pVal = (*get_theme_sys_metric_func) (theme, metricId); ! return TRUE; ! } ! ! return FALSE; } Index: msw_theme_main.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_theme_main.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** msw_theme_main.c 3 May 2005 20:06:36 -0000 1.6 --- msw_theme_main.c 12 Nov 2005 14:09:10 -0000 1.7 *************** *** 1,119 **** ! /* MS-Windows Engine (aka GTK-Wimp) ! * ! * Copyright (C) 2003, 2004 Raymond Penners <ra...@do...> ! * Includes code adapted from redmond95 by Owen Taylor, and ! * gtk-nativewin by Evan Martin ! * ! * This library is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Library General Public ! * License as published by the Free Software Foundation; either ! * version 2 of the License, or (at your option) any later version. ! * ! * This library is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Library General Public License for more details. ! * ! * You should have received a copy of the GNU Library General Public ! * License along with this library; if not, write to the ! * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! * Boston, MA 02111-1307, USA. ! */ ! ! #include <windows.h> ! ! #include <gmodule.h> ! ! #include "gtk/gtk.h" ! ! #include "msw_style.h" ! #include "msw_rc_style.h" ! #include "xp_theme.h" ! ! #ifndef WM_THEMECHANGED ! #define WM_THEMECHANGED 0x031A /* winxp only */ ! #endif ! ! static GModule * this_module = NULL; ! static void (*msw_rc_reset_styles) (GtkSettings * settings) = NULL; ! ! static GdkFilterReturn ! global_filter_func (void *xevent, ! GdkEvent *event, ! gpointer data) ! { ! MSG *msg = (MSG *) xevent; ! ! switch (msg->message) ! { ! /* catch theme changes */ ! case WM_THEMECHANGED: ! case WM_SYSCOLORCHANGE: ! ! if(msw_rc_reset_styles != NULL) { ! xp_theme_reset (); ! msw_style_init (); ! ! /* force all gtkwidgets to redraw */ ! (*msw_rc_reset_styles) (gtk_settings_get_default()); ! } ! ! return GDK_FILTER_REMOVE; ! ! case WM_SETTINGCHANGE: ! /* catch cursor blink, etc... changes */ ! msw_style_setup_system_settings (); ! return GDK_FILTER_REMOVE; ! ! default: ! return GDK_FILTER_CONTINUE; ! } ! } ! ! G_MODULE_EXPORT void ! theme_init (GTypeModule *module) ! { ! msw_rc_style_register_type (module); ! msw_style_register_type (module); ! ! /* this craziness is required because only gtk 2.4.x and later have ! gtk_rc_reset_styles(). But we want to be able to run acceptly well ! on any GTK 2.x.x platform. */ ! if(gtk_check_version(2,4,0) == NULL) { ! this_module = g_module_open(NULL, 0); ! ! if(this_module) ! g_module_symbol (this_module, "gtk_rc_reset_styles", ! (gpointer *)(&msw_rc_reset_styles)); ! } ! ! msw_style_init (); ! gdk_window_add_filter (NULL, global_filter_func, NULL); ! } ! ! G_MODULE_EXPORT void ! theme_exit (void) ! { ! gdk_window_remove_filter (NULL, global_filter_func, NULL); ! ! if(this_module) { ! g_module_close(this_module); ! this_module = NULL; ! } ! } ! ! G_MODULE_EXPORT GtkRcStyle * ! theme_create_rc_style (void) ! { ! return g_object_new (MSW_TYPE_RC_STYLE, NULL); ! } ! ! /* The following function will be called by GTK+ when the module ! * is loaded and checks to see if we are compatible with the ! * version of GTK+ that loads us. ! */ ! G_MODULE_EXPORT const gchar* ! g_module_check_init (GModule *module) ! { ! return gtk_check_version (2,0,0); ! } --- 1,120 ---- ! /* MS-Windows Engine (aka GTK-Wimp) ! * ! * Copyright (C) 2003, 2004 Raymond Penners <ra...@do...> ! * Includes code adapted from redmond95 by Owen Taylor, and ! * gtk-nativewin by Evan Martin ! * ! * This library is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Library General Public ! * License as published by the Free Software Foundation; either ! * version 2 of the License, or (at your option) any later version. ! * ! * This library is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Library General Public License for more details. ! * ! * You should have received a copy of the GNU Library General Public ! * License along with this library; if not, write to the ! * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! * Boston, MA 02111-1307, USA. ! */ ! ! #include <windows.h> ! ! #include <gmodule.h> ! ! #include "gtk/gtk.h" ! ! #include "msw_style.h" ! #include "msw_rc_style.h" ! #include "xp_theme.h" ! ! #ifndef WM_THEMECHANGED ! #define WM_THEMECHANGED 0x031A /* winxp only */ ! #endif ! ! static GModule *this_module = NULL; ! static void (*msw_rc_reset_styles) (GtkSettings * settings) = NULL; ! ! static GdkFilterReturn ! global_filter_func (void *xevent, GdkEvent * event, gpointer data) ! { ! MSG *msg = (MSG *) xevent; ! ! switch (msg->message) ! { ! /* catch theme changes */ ! case WM_THEMECHANGED: ! case WM_SYSCOLORCHANGE: ! ! if (msw_rc_reset_styles != NULL) ! { ! xp_theme_reset (); ! msw_style_init (); ! ! /* force all gtkwidgets to redraw */ ! (*msw_rc_reset_styles) (gtk_settings_get_default ()); ! } ! ! return GDK_FILTER_REMOVE; ! ! case WM_SETTINGCHANGE: ! /* catch cursor blink, etc... changes */ ! msw_style_setup_system_settings (); ! return GDK_FILTER_REMOVE; ! ! default: ! return GDK_FILTER_CONTINUE; ! } ! } ! ! G_MODULE_EXPORT void ! theme_init (GTypeModule * module) ! { ! msw_rc_style_register_type (module); ! msw_style_register_type (module); ! ! /* this craziness is required because only gtk 2.4.x and later have ! gtk_rc_reset_styles(). But we want to be able to run acceptly well on ! any GTK 2.x.x platform. */ ! if (gtk_check_version (2, 4, 0) == NULL) ! { ! this_module = g_module_open (NULL, 0); ! ! if (this_module) ! g_module_symbol (this_module, "gtk_rc_reset_styles", ! (gpointer *) (&msw_rc_reset_styles)); ! } ! ! msw_style_init (); ! gdk_window_add_filter (NULL, global_filter_func, NULL); ! } ! ! G_MODULE_EXPORT void ! theme_exit (void) ! { ! gdk_window_remove_filter (NULL, global_filter_func, NULL); ! ! if (this_module) ! { ! g_module_close (this_module); ! this_module = NULL; ! } ! } ! ! G_MODULE_EXPORT GtkRcStyle * ! theme_create_rc_style (void) ! { ! return g_object_new (MSW_TYPE_RC_STYLE, NULL); ! } ! ! /* The following function will be called by GTK+ when the module ! * is loaded and checks to see if we are compatible with the ! * version of GTK+ that loads us. ! */ ! G_MODULE_EXPORT const gchar * ! g_module_check_init (GModule * module) ! { ! return gtk_check_version (2, 0, 0); ! } |
From: Dom L. <ci...@us...> - 2005-11-12 04:15:33
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26261/src Modified Files: msw_style.c Log Message: make menubars and toolbars look more IE-ish Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** msw_style.c 21 Oct 2005 21:25:39 -0000 1.31 --- msw_style.c 12 Nov 2005 04:15:17 -0000 1.32 *************** *** 569,574 **** GdkColor text_prelight; - gboolean xp_theme = xp_theme_is_active(); - /* Prelight */ sys_color_to_gtk_color(XP_THEME_CLASS_TEXT, COLOR_HIGHLIGHTTEXT, &fg_prelight); --- 569,572 ---- *************** *** 638,642 **** btn_face.green, btn_face.blue, ! (xp_theme ? "etched-in" : "out")); gtk_rc_parse_string(buf); --- 636,640 ---- btn_face.green, btn_face.blue, ! "etched-in"); gtk_rc_parse_string(buf); *************** *** 647,652 **** "GtkToolbar::shadow-type = %s\n" "}widget_class \"*HandleBox*\" style \"msw-toolbar\"\n", ! (xp_theme ? "none" : "out"), ! (xp_theme ? "none" : "out")); gtk_rc_parse_string(buf); --- 645,650 ---- "GtkToolbar::shadow-type = %s\n" "}widget_class \"*HandleBox*\" style \"msw-toolbar\"\n", ! "etched-in", ! "etched-in"); gtk_rc_parse_string(buf); *************** *** 1814,1817 **** --- 1812,1817 ---- gint height) { + gboolean is_handlebox_grippie = (detail && !strcmp(detail, "handlebox")); + if(detail && ! strcmp(detail, "entry")) { *************** *** 1822,1825 **** --- 1822,1966 ---- } } + + if(is_handlebox_grippie || (widget && (shadow_type == GTK_SHADOW_ETCHED_IN) && (GTK_IS_MENU_BAR(widget) || GTK_IS_TOOLBAR(widget) || GTK_IS_HANDLE_BOX(widget)))) { + GdkGC *gc1 = NULL; + GdkGC *gc2 = NULL; + gint thickness_light; + gint thickness_dark; + gint i; + + gc1 = style->light_gc[state_type]; + gc2 = style->dark_gc[state_type]; + + sanitize_size (window, &width, &height); + + if (area) + { + gdk_gc_set_clip_rectangle (gc1, area); + gdk_gc_set_clip_rectangle (gc2, area); + if (shadow_type == GTK_SHADOW_IN || + shadow_type == GTK_SHADOW_OUT) + { + gdk_gc_set_clip_rectangle (style->black_gc, area); + gdk_gc_set_clip_rectangle (style->bg_gc[state_type], area); + } + } + + if (style->xthickness > 0) + { + if (style->xthickness > 1) + { + thickness_light = 1; + thickness_dark = 1; + + for (i = 0; i < thickness_dark; i++) + { + if(!is_handlebox_grippie) + gdk_draw_line (window, gc1, + x + width - i - 1, + y + i, + x + width - i - 1, + y + height - i - 1); + if(is_handlebox_grippie || (widget && GTK_IS_MENU_BAR(widget))) + gdk_draw_line (window, gc2, + x + i, + y + i, + x + i, + y + height - i - 1); + } + + for (i = 0; i < thickness_light; i++) + { + if(is_handlebox_grippie || (widget && GTK_IS_MENU_BAR(widget))) + gdk_draw_line (window, gc1, + x + thickness_dark + i, + y + thickness_dark + i, + x + thickness_dark + i, + y + height - thickness_dark - i - 1); + if(!is_handlebox_grippie) + gdk_draw_line (window, gc2, + x + width - thickness_light - i - 1, + y + thickness_dark + i, + x + width - thickness_light - i - 1, + y + height - thickness_light - 1); + } + } + else + { + gdk_draw_line (window, + style->dark_gc[state_type], + x, y, x, y + height); + gdk_draw_line (window, + style->dark_gc[state_type], + x + width, y, x + width, y + height); + } + } + + if (style->ythickness > 0) + { + if (style->ythickness > 1) + { + thickness_light = 1; + thickness_dark = 1; + + for (i = 0; i < thickness_dark; i++) + { + gdk_draw_line (window, gc1, + x + i, + y + height - i - 1, + x + width - i - 1, + y + height - i - 1); + + if(widget && GTK_IS_MENU_BAR(widget)) + gdk_draw_line (window, gc2, + x + i, + y + i, + x + width - i - 2, + y + i); + } + + for (i = 0; i < thickness_light; i++) + { + gdk_draw_line (window, gc2, + x + thickness_dark + i, + y + height - thickness_light - i - 1, + x + width - thickness_light - 1, + y + height - thickness_light - i - 1); + + if(widget && GTK_IS_MENU_BAR(widget)) + gdk_draw_line (window, gc1, + x + thickness_dark + i, + y + thickness_dark + i, + x + width - thickness_dark - i - 2, + y + thickness_dark + i); + } + } + else + { + gdk_draw_line (window, + style->dark_gc[state_type], + x, y, x + width, y); + + gdk_draw_line (window, + style->dark_gc[state_type], + x, y + height, x + width, y + height); + + } + } + + if (area) + { + gdk_gc_set_clip_rectangle (gc1, NULL); + gdk_gc_set_clip_rectangle (gc2, NULL); + if (shadow_type == GTK_SHADOW_IN || + shadow_type == GTK_SHADOW_OUT) + { + gdk_gc_set_clip_rectangle (style->black_gc, NULL); + gdk_gc_set_clip_rectangle (style->bg_gc[state_type], NULL); + } + } + + return; + } parent_class->draw_shadow (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); *************** *** 1837,1857 **** gint y) { - #if 0 - if (detail && !strcmp(detail, "menuitem")) { - if (xp_theme_draw(window, XP_THEME_ELEMENT_MENU_SEPARATOR, style, - x1, y, x2, style->ythickness, state_type, area)) { - return; - } - } else if (detail && !strcmp(detail, "toolbar")) { - if (xp_theme_draw(window, XP_THEME_ELEMENT_TOOLBAR_SEPARATOR_H, style, - x1, y, x2, style->ythickness, state_type, area)) { - return; - } - } - - if(xp_theme_draw(window, XP_THEME_ELEMENT_LINE_H, style, x1, y, x2, style->ythickness, state_type, area)) - return; - #endif - parent_class->draw_hline (style, window, state_type, area, widget, detail, x1, x2, y); --- 1978,1981 ---- *************** *** 1869,1884 **** gint x) { - #if 0 - if (detail && !strcmp(detail, "toolbar")) { - if (xp_theme_draw(window, XP_THEME_ELEMENT_TOOLBAR_SEPARATOR_V, style, - x, y1, style->xthickness, y2, state_type, area)) { - return; - } - } - - if(xp_theme_draw(window, XP_THEME_ELEMENT_LINE_V, style, x, y1, style->xthickness, y2, state_type, area)) - return; - #endif - parent_class->draw_vline (style, window, state_type, area, widget, detail, y1, y2, x); --- 1993,1996 ---- *************** *** 1980,1984 **** ythick = style->ythickness; ! dest.x = x + xthick; dest.y = y + ythick; dest.width = width - (xthick * 2); --- 2092,2096 ---- ythick = style->ythickness; ! dest.x = x + xthick + 2; dest.y = y + ythick; dest.width = width - (xthick * 2); |
From: Dom L. <ci...@us...> - 2005-10-21 21:25:47
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src/Theme/gtk-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29205/src/Theme/gtk-2.0 Modified Files: gtkrc Log Message: windows shrinks sliders up to 8 pixels; gtk's default of 21 is clearly too large Index: gtkrc =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/Theme/gtk-2.0/gtkrc,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** gtkrc 1 Aug 2005 15:30:51 -0000 1.25 --- gtkrc 21 Oct 2005 21:25:39 -0000 1.26 *************** *** 31,35 **** GtkTreeView::expander-size = 12 ! GtkScrolledWindow::scrollbar_spacing = 0 engine "wimp" --- 31,35 ---- GtkTreeView::expander-size = 12 ! GtkScrolledWindow::scrollbar_spacing = 1 engine "wimp" |
From: Dom L. <ci...@us...> - 2005-10-21 21:25:47
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29205/src Modified Files: msw_style.c Log Message: windows shrinks sliders up to 8 pixels; gtk's default of 21 is clearly too large Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** msw_style.c 25 Sep 2005 19:57:54 -0000 1.30 --- msw_style.c 21 Oct 2005 21:25:39 -0000 1.31 *************** *** 727,730 **** --- 727,731 ---- "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", *************** *** 741,744 **** --- 742,746 ---- "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", |
From: Dom L. <ci...@us...> - 2005-09-25 19:58:02
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2736/src Modified Files: msw_style.c Log Message: gnome bug 316412 Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** msw_style.c 27 Jul 2005 18:13:37 -0000 1.29 --- msw_style.c 25 Sep 2005 19:57:54 -0000 1.30 *************** *** 40,43 **** --- 40,44 ---- #include "gtk/gtk.h" #include <gdk/gdkwin32.h> + /* #include "gdk/win32/gdkwin32.h" */ *************** *** 782,786 **** sys_color_to_gtk_color(XP_THEME_CLASS_WINDOW, COLOR_WINDOWTEXT, &style->text[GTK_STATE_PRELIGHT]); ! /* Default forgeground */ sys_color_to_gtk_color(XP_THEME_CLASS_BUTTON, COLOR_BTNTEXT, &style->fg[GTK_STATE_NORMAL]); sys_color_to_gtk_color(XP_THEME_CLASS_TEXT, COLOR_HIGHLIGHTTEXT, &style->fg[GTK_STATE_SELECTED]); --- 783,787 ---- sys_color_to_gtk_color(XP_THEME_CLASS_WINDOW, COLOR_WINDOWTEXT, &style->text[GTK_STATE_PRELIGHT]); ! /* Default foreground */ sys_color_to_gtk_color(XP_THEME_CLASS_BUTTON, COLOR_BTNTEXT, &style->fg[GTK_STATE_NORMAL]); sys_color_to_gtk_color(XP_THEME_CLASS_TEXT, COLOR_HIGHLIGHTTEXT, &style->fg[GTK_STATE_SELECTED]); *************** *** 1724,1745 **** GtkPositionType gap_side) { ! if (detail && !strcmp(detail, "tab")) { GtkNotebook *notebook = GTK_NOTEBOOK(widget); ! GtkPositionType pos_type = gtk_notebook_get_tab_pos(notebook); ! gint x2, y2, w2, h2; ! x2 = x; y2 = y; w2 = width; h2 = height; ! if (pos_type == GTK_POS_TOP && state_type == GTK_STATE_NORMAL) { /*h2 += XP_EDGE_SIZE;*/ } ! else if (pos_type == GTK_POS_BOTTOM && state_type == GTK_STATE_NORMAL) { /*h2 += XP_EDGE_SIZE;*/ } ! else if (pos_type == GTK_POS_LEFT && state_type == GTK_STATE_NORMAL) { x2 += 1; w2 -= XP_EDGE_SIZE; } ! else if (pos_type == GTK_POS_RIGHT && state_type == GTK_STATE_NORMAL) { w2 -= (XP_EDGE_SIZE + 1); } --- 1725,1745 ---- GtkPositionType gap_side) { ! if (GTK_IS_NOTEBOOK(widget) && detail && !strcmp(detail, "tab")) { GtkNotebook *notebook = GTK_NOTEBOOK(widget); ! gint x2, y2, w2, h2; ! x2 = x; y2 = y; w2 = width; h2 = height; ! if (gap_side == GTK_POS_TOP && state_type == GTK_STATE_NORMAL) { /*h2 += XP_EDGE_SIZE;*/ } ! else if (gap_side == GTK_POS_BOTTOM && state_type == GTK_STATE_NORMAL) { /*h2 += XP_EDGE_SIZE;*/ } ! else if (gap_side == GTK_POS_LEFT && state_type == GTK_STATE_NORMAL) { x2 += 1; w2 -= XP_EDGE_SIZE; } ! else if (gap_side == GTK_POS_RIGHT && state_type == GTK_STATE_NORMAL) { w2 -= (XP_EDGE_SIZE + 1); } *************** *** 1766,1775 **** gint gap_x, gint gap_width) { ! if (detail && !strcmp(detail, "notebook")) { - GtkNotebook *notebook = GTK_NOTEBOOK(widget); - /* FIXME: pos != TOP to be implemented */ ! if (gtk_notebook_get_tab_pos(notebook) == GTK_POS_TOP && xp_theme_draw(window, XP_THEME_ELEMENT_TAB_PANE, style, x, y, width, height, state_type, area)) { --- 1766,1773 ---- gint gap_x, gint gap_width) { ! if (GTK_IS_NOTEBOOK(widget) && detail && !strcmp(detail, "notebook")) { /* FIXME: pos != TOP to be implemented */ ! if (gap_side == GTK_POS_TOP && xp_theme_draw(window, XP_THEME_ELEMENT_TAB_PANE, style, x, y, width, height, state_type, area)) { |
From: Dom L. <ci...@us...> - 2005-08-01 15:31:02
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src/Theme/gtk-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4267 Modified Files: gtkrc Log Message: part of bug #168326 Index: gtkrc =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/Theme/gtk-2.0/gtkrc,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** gtkrc 26 Jun 2005 02:33:11 -0000 1.24 --- gtkrc 1 Aug 2005 15:30:51 -0000 1.25 *************** *** 31,34 **** --- 31,36 ---- GtkTreeView::expander-size = 12 + GtkScrolledWindow::scrollbar_spacing = 0 + engine "wimp" { |
From: Dom L. <ci...@us...> - 2005-07-27 18:13:47
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26366/src Modified Files: msw_style.c Log Message: make vertically-oriented toolbar handled draw properly now Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** msw_style.c 25 Jul 2005 19:15:33 -0000 1.28 --- msw_style.c 27 Jul 2005 18:13:37 -0000 1.29 *************** *** 1989,1993 **** gdk_gc_set_clip_rectangle(shadow_gc, &dest); ! if (orientation == GTK_ORIENTATION_VERTICAL) { gdk_draw_line(window, light_gc, dest.x, dest.y, dest.x, dest.height); --- 1989,1993 ---- gdk_gc_set_clip_rectangle(shadow_gc, &dest); ! if (dest.width < dest.height) { gdk_draw_line(window, light_gc, dest.x, dest.y, dest.x, dest.height); *************** *** 1997,2000 **** --- 1997,2001 ---- else { + gdk_draw_line(window, light_gc, dest.x, dest.y, dest.x + dest.width, dest.y); gdk_draw_line(window, dark_gc, dest.x, dest.y + (dest.height / 2), dest.x + dest.width, dest.y + (dest.height / 2)); |
From: Dom L. <ci...@us...> - 2005-07-25 19:15:44
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7450/src Modified Files: msw_style.c Log Message: better toolbox handle drawing Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** msw_style.c 28 Jun 2005 14:51:31 -0000 1.27 --- msw_style.c 25 Jul 2005 19:15:33 -0000 1.28 *************** *** 1964,1978 **** if (!GTK_IS_PANED(widget)) { - gint xx, yy; gint xthick, ythick; ! GdkGC *light_gc, *dark_gc; GdkRectangle dest; ! if ((width == -1) && (height == -1)) ! gdk_window_get_size(window, &width, &height); ! else if (width == -1) ! gdk_window_get_size(window, &width, NULL); ! else if (height == -1) ! gdk_window_get_size(window, NULL, &height); gtk_paint_box(style, window, state_type, shadow_type, area, widget, --- 1964,1972 ---- if (!GTK_IS_PANED(widget)) { gint xthick, ythick; ! GdkGC *light_gc, *dark_gc, *shadow_gc; GdkRectangle dest; ! sanitize_size (window, &width, &height); gtk_paint_box(style, window, state_type, shadow_type, area, widget, *************** *** 1981,1984 **** --- 1975,1979 ---- light_gc = style->light_gc[state_type]; dark_gc = style->dark_gc[state_type]; + shadow_gc = style->mid_gc[state_type]; xthick = style->xthickness; *************** *** 1992,2015 **** gdk_gc_set_clip_rectangle(light_gc, &dest); gdk_gc_set_clip_rectangle(dark_gc, &dest); if (orientation == GTK_ORIENTATION_VERTICAL) { ! yy = y + ythick; ! for (xx = x + xthick; xx < (x + width - xthick); xx += 6) ! { ! gdk_draw_line(window, light_gc, xx, yy, xx, yy + height - ythick); ! gdk_draw_line(window, dark_gc, xx + 1, yy, xx + 1, yy + height - ythick); ! ! gdk_draw_line(window, light_gc, xx + 3, yy, xx + 3, yy + height - ythick); ! gdk_draw_line(window, dark_gc, xx + 4, yy, xx + 4, yy + height - ythick); ! } } else { ! draw_hline(style, window, state_type, area, widget, detail, ! x, x+width, y+1); ! draw_hline(style, window, state_type, area, widget, detail, ! x, x+width, y+3); } gdk_gc_set_clip_rectangle(light_gc, NULL); gdk_gc_set_clip_rectangle(dark_gc, NULL); --- 1987,2006 ---- gdk_gc_set_clip_rectangle(light_gc, &dest); gdk_gc_set_clip_rectangle(dark_gc, &dest); + gdk_gc_set_clip_rectangle(shadow_gc, &dest); if (orientation == GTK_ORIENTATION_VERTICAL) { ! gdk_draw_line(window, light_gc, dest.x, dest.y, dest.x, dest.height); ! gdk_draw_line(window, dark_gc, dest.x + (dest.width / 2), dest.y, dest.x + (dest.width / 2), dest.height); ! gdk_draw_line(window, shadow_gc, dest.x + dest.width, dest.y, dest.x + dest.width, dest.height); } else { ! gdk_draw_line(window, light_gc, dest.x, dest.y, dest.x + dest.width, dest.y); ! gdk_draw_line(window, dark_gc, dest.x, dest.y + (dest.height / 2), dest.x + dest.width, dest.y + (dest.height / 2)); ! gdk_draw_line(window, shadow_gc, dest.x, dest.y + dest.height, dest.x + dest.width, dest.y + dest.height); } + + gdk_gc_set_clip_rectangle(shadow_gc, NULL); gdk_gc_set_clip_rectangle(light_gc, NULL); gdk_gc_set_clip_rectangle(dark_gc, NULL); |
From: Dom L. <ci...@us...> - 2005-06-28 14:51:43
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23583/src Modified Files: msw_style.c Log Message: better handlebox grip drawing Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** msw_style.c 28 Jun 2005 14:33:52 -0000 1.26 --- msw_style.c 28 Jun 2005 14:51:31 -0000 1.27 *************** *** 1586,1589 **** --- 1586,1593 ---- } } + else if (detail && + (!strcmp(detail, "handlebox"))) /* grip */ + { + } else { |
From: Dom L. <ci...@us...> - 2005-06-28 14:34:07
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15200/src Modified Files: msw_style.c Log Message: steal handle drawing code from wimpose95 Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** msw_style.c 27 Jun 2005 14:54:40 -0000 1.25 --- msw_style.c 28 Jun 2005 14:33:52 -0000 1.26 *************** *** 1957,1971 **** return; } ! /* grippers are just flat boxes when they're not a toolbar */ ! parent_class->draw_box (style, window, state_type, shadow_type, ! area, widget, detail, x, y, width, height); } ! else if (!GTK_IS_PANED (widget)) { ! /* TODO: Draw handle boxes as double lines: || */ ! parent_class->draw_handle (style, window, state_type, shadow_type, ! area, widget, detail, x, y, width, height, ! orientation); } } --- 1957,2013 ---- return; } + } ! if (!GTK_IS_PANED(widget)) { ! gint xx, yy; ! gint xthick, ythick; ! GdkGC *light_gc, *dark_gc; ! GdkRectangle dest; ! ! if ((width == -1) && (height == -1)) ! gdk_window_get_size(window, &width, &height); ! else if (width == -1) ! gdk_window_get_size(window, &width, NULL); ! else if (height == -1) ! gdk_window_get_size(window, NULL, &height); ! ! gtk_paint_box(style, window, state_type, shadow_type, area, widget, ! detail, x, y, width, height); ! ! light_gc = style->light_gc[state_type]; ! dark_gc = style->dark_gc[state_type]; ! ! xthick = style->xthickness; ! ythick = style->ythickness; ! ! dest.x = x + xthick; ! dest.y = y + ythick; ! dest.width = width - (xthick * 2); ! dest.height = height - (ythick * 2); ! ! gdk_gc_set_clip_rectangle(light_gc, &dest); ! gdk_gc_set_clip_rectangle(dark_gc, &dest); ! ! if (orientation == GTK_ORIENTATION_VERTICAL) ! { ! yy = y + ythick; ! for (xx = x + xthick; xx < (x + width - xthick); xx += 6) ! { ! gdk_draw_line(window, light_gc, xx, yy, xx, yy + height - ythick); ! gdk_draw_line(window, dark_gc, xx + 1, yy, xx + 1, yy + height - ythick); ! ! gdk_draw_line(window, light_gc, xx + 3, yy, xx + 3, yy + height - ythick); ! gdk_draw_line(window, dark_gc, xx + 4, yy, xx + 4, yy + height - ythick); ! } } ! else { ! draw_hline(style, window, state_type, area, widget, detail, ! x, x+width, y+1); ! draw_hline(style, window, state_type, area, widget, detail, ! x, x+width, y+3); ! } ! gdk_gc_set_clip_rectangle(light_gc, NULL); ! gdk_gc_set_clip_rectangle(dark_gc, NULL); } } |
From: Dom L. <ci...@us...> - 2005-06-27 14:54:49
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27969/src Modified Files: msw_style.c xp_theme.c xp_theme.h Log Message: some pedantic bits - mostly signed/unsigned issues Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** msw_style.c 26 Jun 2005 18:36:45 -0000 1.24 --- msw_style.c 27 Jun 2005 14:54:40 -0000 1.25 *************** *** 25,28 **** --- 25,29 ---- * * http://lxr.mozilla.org/mozilla/source/gfx/src/windows/nsNativeThemeWin.cpp + * http://lxr.mozilla.org/seamonkey/source/widget/src/windows/nsLookAndFeel.cpp * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/userex/functions/drawthemebackground.asp */ *************** *** 66,111 **** #define PART_SIZE 13 ! static const char check_aa_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; ! static const char check_base_bits[] = { 0x00,0x00,0x00,0x00,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc, 0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0x00,0x00,0x00,0x00}; ! static const char check_black_bits[] = { 0x00,0x00,0xfe,0x0f,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02, 0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x00,0x00}; ! static const char check_dark_bits[] = { 0xff,0x1f,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01, 0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00}; ! static const char check_light_bits[] = { 0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00, 0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0xfe,0x1f}; ! static const char check_mid_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00, 0x08,0x00,0x08,0x00,0x08,0x00,0x08,0xfc,0x0f,0x00,0x00}; ! static const char check_text_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x03,0x88,0x03,0xd8,0x01,0xf8, 0x00,0x70,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; ! static const char radio_base_bits[] = { 0x00,0x00,0x00,0x00,0xf0,0x01,0xf8,0x03,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc, 0x07,0xfc,0x07,0xf8,0x03,0xf0,0x01,0x00,0x00,0x00,0x00}; ! static const char radio_black_bits[] = { 0x00,0x00,0xf0,0x01,0x0c,0x02,0x04,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02, 0x00,0x02,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; ! static const char radio_dark_bits[] = { 0xf0,0x01,0x0c,0x06,0x02,0x00,0x02,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01, 0x00,0x01,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00}; ! static const char radio_light_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x10,0x00,0x10,0x00,0x10,0x00, 0x10,0x00,0x10,0x00,0x08,0x00,0x08,0x0c,0x06,0xf0,0x01}; ! static const char radio_mid_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x04,0x00,0x08,0x00,0x08,0x00,0x08,0x00, 0x08,0x00,0x08,0x00,0x04,0x0c,0x06,0xf0,0x01,0x00,0x00}; ! static const char radio_text_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x00,0xf0,0x01,0xf0,0x01,0xf0, 0x01,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; static struct { ! const char *bits; GdkBitmap *bmap; } parts[] = { --- 67,112 ---- #define PART_SIZE 13 ! static const guint8 check_aa_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; ! static const guint8 check_base_bits[] = { 0x00,0x00,0x00,0x00,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc, 0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0x00,0x00,0x00,0x00}; ! static const guint8 check_black_bits[] = { 0x00,0x00,0xfe,0x0f,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02, 0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x00,0x00}; ! static const guint8 check_dark_bits[] = { 0xff,0x1f,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01, 0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00}; ! static const guint8 check_light_bits[] = { 0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00, 0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0xfe,0x1f}; ! static const guint8 check_mid_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00, 0x08,0x00,0x08,0x00,0x08,0x00,0x08,0xfc,0x0f,0x00,0x00}; ! static const guint8 check_text_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x03,0x88,0x03,0xd8,0x01,0xf8, 0x00,0x70,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; ! static const guint8 radio_base_bits[] = { 0x00,0x00,0x00,0x00,0xf0,0x01,0xf8,0x03,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc, 0x07,0xfc,0x07,0xf8,0x03,0xf0,0x01,0x00,0x00,0x00,0x00}; ! static const guint8 radio_black_bits[] = { 0x00,0x00,0xf0,0x01,0x0c,0x02,0x04,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02, 0x00,0x02,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; ! static const guint8 radio_dark_bits[] = { 0xf0,0x01,0x0c,0x06,0x02,0x00,0x02,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01, 0x00,0x01,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00}; ! static const guint8 radio_light_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x10,0x00,0x10,0x00,0x10,0x00, 0x10,0x00,0x10,0x00,0x08,0x00,0x08,0x0c,0x06,0xf0,0x01}; ! static const guint8 radio_mid_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x04,0x00,0x08,0x00,0x08,0x00,0x08,0x00, 0x08,0x00,0x08,0x00,0x04,0x0c,0x06,0xf0,0x01,0x00,0x00}; ! static const guint8 radio_text_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x00,0xf0,0x01,0xf0,0x01,0xf0, 0x01,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; static struct { ! const guint8 *bits; GdkBitmap *bmap; } parts[] = { *************** *** 156,160 **** } ! /***************************** STOLEN FROM PANGO *****************************/ /* --- 157,161 ---- } ! /***************************** BEGIN STOLEN FROM PANGO *****************************/ /* *************** *** 256,261 **** gchar *name; ! gint i, l; ! gsize nbytes; /* If lfFaceName is ASCII, assume it is the common (English) name --- 257,261 ---- gchar *name; ! size_t i, l, nbytes; /* If lfFaceName is ASCII, assume it is the common (English) name *************** *** 275,279 **** goto fail0; ! if ((oldhfont = SelectObject (pango_win32_hdc, hfont)) == NULL) goto fail1; --- 275,279 ---- goto fail0; ! if ((oldhfont = (HFONT)SelectObject (pango_win32_hdc, hfont)) == NULL) goto fail1; *************** *** 364,368 **** } ! /***************************** STOLEN FROM PANGO *****************************/ static char * --- 364,368 ---- } ! /***************************** END STOLEN FROM PANGO *****************************/ static char * Index: xp_theme.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/xp_theme.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** xp_theme.c 26 Jun 2005 16:30:41 -0000 1.39 --- xp_theme.c 27 Jun 2005 14:54:40 -0000 1.40 *************** *** 212,218 **** uxtheme_dll = LoadLibrary("uxtheme.dll"); ! if (!uxtheme_dll) { return; - } is_app_themed_func = (IsAppThemedFunc) GetProcAddress(uxtheme_dll, "IsAppThemed"); --- 212,217 ---- uxtheme_dll = LoadLibrary("uxtheme.dll"); ! if (!uxtheme_dll) return; is_app_themed_func = (IsAppThemedFunc) GetProcAddress(uxtheme_dll, "IsAppThemed"); *************** *** 832,842 **** gboolean ! xp_theme_get_system_font (XpThemeClass klazz, XpThemeFont fontId, LOGFONT *lf) { ! int themeFont; ! ! if (get_theme_sys_font_func != NULL) { HTHEME theme = xp_theme_get_handle_by_class(klazz); if (!theme) return FALSE; --- 831,841 ---- gboolean ! xp_theme_get_system_font (XpThemeClass klazz, XpThemeFont fontId, OUT LOGFONT *lf) { ! if (xp_theme_is_active () && get_theme_sys_font_func != NULL) { HTHEME theme = xp_theme_get_handle_by_class(klazz); + int themeFont; + if (!theme) return FALSE; *************** *** 861,867 **** gboolean ! xp_theme_get_system_color (XpThemeClass klazz, int colorId, DWORD * pColor) { ! if (get_theme_sys_color_func != NULL) { HTHEME theme = xp_theme_get_handle_by_class(klazz); --- 860,866 ---- gboolean ! xp_theme_get_system_color (XpThemeClass klazz, int colorId, OUT DWORD * pColor) { ! if (xp_theme_is_active () && get_theme_sys_color_func != NULL) { HTHEME theme = xp_theme_get_handle_by_class(klazz); *************** *** 875,881 **** gboolean ! xp_theme_get_system_metric (XpThemeClass klazz, int metricId, int * pVal) { ! if (get_theme_sys_metric_func != NULL) { HTHEME theme = xp_theme_get_handle_by_class(klazz); --- 874,880 ---- gboolean ! xp_theme_get_system_metric (XpThemeClass klazz, int metricId, OUT int * pVal) { ! if (xp_theme_is_active () && get_theme_sys_metric_func != NULL) { HTHEME theme = xp_theme_get_handle_by_class(klazz); Index: xp_theme.h =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/xp_theme.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** xp_theme.h 26 Jun 2005 16:30:42 -0000 1.18 --- xp_theme.h 27 Jun 2005 14:54:40 -0000 1.19 *************** *** 120,126 **** GdkRectangle *area); gboolean xp_theme_is_drawable (XpThemeElement element); ! gboolean xp_theme_get_system_font (XpThemeClass klazz, XpThemeFont fontId, LOGFONT *lf); ! gboolean xp_theme_get_system_color (XpThemeClass klazz, int colorId, DWORD * pColor); ! gboolean xp_theme_get_system_metric (XpThemeClass klazz, int metricId, int * pVal); gboolean xp_theme_is_active (void); --- 120,126 ---- GdkRectangle *area); gboolean xp_theme_is_drawable (XpThemeElement element); ! gboolean xp_theme_get_system_font (XpThemeClass klazz, XpThemeFont fontId, OUT LOGFONT *lf); ! gboolean xp_theme_get_system_color (XpThemeClass klazz, int colorId, OUT DWORD * pColor); ! gboolean xp_theme_get_system_metric (XpThemeClass klazz, int metricId, OUT int * pVal); gboolean xp_theme_is_active (void); |
From: Dom L. <ci...@us...> - 2005-06-26 18:36:54
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24679/src Modified Files: msw_style.c Log Message: fix classic scrollbar sliders; make scale's sliders size closer to win32 Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** msw_style.c 26 Jun 2005 16:30:41 -0000 1.23 --- msw_style.c 26 Jun 2005 18:36:45 -0000 1.24 *************** *** 730,734 **** GetSystemMetrics(SM_CYVTHUMB), get_system_metric(XP_THEME_CLASS_SCROLLBAR, SM_CXVSCROLL), ! GetSystemMetrics(SM_CYVTHUMB)); gtk_rc_parse_string(buf); --- 730,734 ---- GetSystemMetrics(SM_CYVTHUMB), get_system_metric(XP_THEME_CLASS_SCROLLBAR, SM_CXVSCROLL), ! 11); gtk_rc_parse_string(buf); *************** *** 744,748 **** GetSystemMetrics(SM_CXHTHUMB), get_system_metric(XP_THEME_CLASS_SCROLLBAR, SM_CYHSCROLL), ! GetSystemMetrics(SM_CXHTHUMB)); gtk_rc_parse_string(buf); --- 744,748 ---- GetSystemMetrics(SM_CXHTHUMB), get_system_metric(XP_THEME_CLASS_SCROLLBAR, SM_CYHSCROLL), ! 11); gtk_rc_parse_string(buf); *************** *** 1421,1425 **** } } - else if (detail && !strcmp (detail, "slider")) { --- 1421,1424 ---- *************** *** 1454,1459 **** return; } - - return; } } --- 1453,1456 ---- *************** *** 1544,1548 **** gboolean is_vertical = GTK_IS_VSCALE(widget); ! if(!xp_theme_is_active) { parent_class->draw_box (style, window, state_type, GTK_SHADOW_NONE, area, widget, detail, x, y, width, height); --- 1541,1545 ---- gboolean is_vertical = GTK_IS_VSCALE(widget); ! if(!xp_theme_is_active ()) { parent_class->draw_box (style, window, state_type, GTK_SHADOW_NONE, area, widget, detail, x, y, width, height); |
From: Dom L. <ci...@us...> - 2005-06-26 16:30:51
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21698/src Modified Files: msw_style.c xp_theme.c xp_theme.h Log Message: make gtkscales theme properly Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** msw_style.c 26 Jun 2005 15:22:05 -0000 1.22 --- msw_style.c 26 Jun 2005 16:30:41 -0000 1.23 *************** *** 725,731 **** "GtkRange::stepper-spacing = 0\n" "GtkRange::trough_border = 0\n" ! "}widget_class \"*VScrollbar*\" style \"msw-vscrollbar\"\n", GetSystemMetrics(SM_CYVTHUMB), ! get_system_metric(XP_THEME_CLASS_SCROLLBAR, SM_CXVSCROLL)); gtk_rc_parse_string(buf); --- 725,734 ---- "GtkRange::stepper-spacing = 0\n" "GtkRange::trough_border = 0\n" ! "GtkScale::slider-length = %d\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), ! GetSystemMetrics(SM_CYVTHUMB)); gtk_rc_parse_string(buf); *************** *** 736,742 **** "GtkRange::stepper-spacing = 0\n" "GtkRange::trough_border = 0\n" ! "}widget_class \"*HScrollbar*\" style \"msw-hscrollbar\"\n", GetSystemMetrics(SM_CXHTHUMB), ! get_system_metric(XP_THEME_CLASS_SCROLLBAR, SM_CYHSCROLL)); gtk_rc_parse_string(buf); --- 739,748 ---- "GtkRange::stepper-spacing = 0\n" "GtkRange::trough_border = 0\n" ! "GtkScale::slider-length = %d\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), ! GetSystemMetrics(SM_CXHTHUMB)); gtk_rc_parse_string(buf); *************** *** 1538,1549 **** gboolean is_vertical = GTK_IS_VSCALE(widget); ! parent_class->draw_box (style, window, state_type, GTK_SHADOW_NONE, area, widget, detail, x, y, width, height); ! if(is_vertical) ! parent_class->draw_box(style, window, state_type, GTK_SHADOW_ETCHED_IN, area, NULL, NULL, (2 * x + width)/2, y, 1, height); ! else ! parent_class->draw_box(style, window, state_type, GTK_SHADOW_ETCHED_IN, area, NULL, NULL, x, (2 * y + height)/2, width, 1); return; } --- 1544,1564 ---- gboolean is_vertical = GTK_IS_VSCALE(widget); ! if(!xp_theme_is_active) { ! parent_class->draw_box (style, window, state_type, GTK_SHADOW_NONE, area, widget, detail, x, y, width, height); + } ! if(is_vertical) { ! if(xp_theme_draw(window, XP_THEME_ELEMENT_SCALE_TROUGH_V, style, (2 * x + width)/2, y, 2, height, state_type, area)) ! return; + parent_class->draw_box(style, window, state_type, GTK_SHADOW_ETCHED_IN, area, NULL, NULL, (2 * x + width)/2, y, 1, height); + } + else { + if(xp_theme_draw(window, XP_THEME_ELEMENT_SCALE_TROUGH_H, style, x, (2 * y + height)/2, width, 2, state_type, area)) + return; + + parent_class->draw_box(style, window, state_type, GTK_SHADOW_ETCHED_IN, area, NULL, NULL, x, (2 * y + height)/2, width, 1); + } return; } *************** *** 1870,1873 **** --- 1885,1911 ---- static void + draw_slider (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height, + GtkOrientation orientation) + { + if(GTK_IS_SCALE(widget) && + xp_theme_draw(window, ((orientation == GTK_ORIENTATION_VERTICAL) ? XP_THEME_ELEMENT_SCALE_SLIDER_V : XP_THEME_ELEMENT_SCALE_SLIDER_H), style, x, y, width, height, state_type, area)) { + return; + } + + parent_class->draw_slider (style, window, state_type, shadow_type, area, widget, + detail, x, y, width, height, orientation); + } + + static void draw_resize_grip (GtkStyle *style, GdkWindow *window, *************** *** 1967,1970 **** --- 2005,2009 ---- style_class->draw_handle = draw_handle; style_class->draw_resize_grip = draw_resize_grip; + style_class->draw_slider = draw_slider; } Index: xp_theme.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/xp_theme.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** xp_theme.c 26 Jun 2005 15:22:05 -0000 1.38 --- xp_theme.c 26 Jun 2005 16:30:41 -0000 1.39 *************** *** 66,69 **** --- 66,83 ---- #define LVS_SUNKEN 3 + /* TRACKBAR parts */ + #define TKP_TRACK 1 + #define TKP_TRACKVERT 2 + #define TKP_THUMB 3 + #define TKP_THUMBBOTTOM 4 + #define TKP_THUMBTOP 5 + #define TKP_THUMBVERT 6 + #define TKP_THUMBLEFT 7 + #define TKP_THUMBRIGHT 8 + #define TKP_TICS 9 + #define TKP_TICSVERT 10 + + #define TRS_NORMAL 1 + static const LPCWSTR class_descriptors[] = { *************** *** 83,87 **** L"Menu", /* XP_THEME_CLASS_MENU */ L"Window", /* XP_THEME_CLASS_WINDOW */ ! L"Status" /* XP_THEME_CLASS_STATUS */ }; --- 97,102 ---- L"Menu", /* XP_THEME_CLASS_MENU */ L"Window", /* XP_THEME_CLASS_WINDOW */ ! L"Status", /* XP_THEME_CLASS_STATUS */ ! L"Trackbar" /* XP_THEME_CLASS_TRACKBAR */ }; *************** *** 132,136 **** GP_LINEVERT, TP_SEPARATOR, ! TP_SEPARATORVERT }; --- 147,157 ---- GP_LINEVERT, TP_SEPARATOR, ! TP_SEPARATORVERT, ! TKP_TRACK, ! TKP_TRACKVERT, ! TKP_THUMB, ! TKP_THUMBVERT, ! TKP_TICS, ! TKP_TICSVERT }; *************** *** 270,273 **** --- 291,303 ---- break; + case XP_THEME_ELEMENT_SCALE_TROUGH_H: + case XP_THEME_ELEMENT_SCALE_TROUGH_V: + case XP_THEME_ELEMENT_SCALE_SLIDER_H: + case XP_THEME_ELEMENT_SCALE_SLIDER_V: + case XP_THEME_ELEMENT_SCALE_TICS_H: + case XP_THEME_ELEMENT_SCALE_TICS_V: + klazz = XP_THEME_CLASS_TRACKBAR; + break; + case XP_THEME_ELEMENT_STATUS_GRIPPER: case XP_THEME_ELEMENT_STATUS_PANE: *************** *** 685,688 **** --- 715,722 ---- break; + case XP_THEME_ELEMENT_SCALE_TROUGH_H: + case XP_THEME_ELEMENT_SCALE_TROUGH_V: + ret = TRS_NORMAL; + break; default: Index: xp_theme.h =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/xp_theme.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** xp_theme.h 26 Jun 2005 15:22:05 -0000 1.17 --- xp_theme.h 26 Jun 2005 16:30:42 -0000 1.18 *************** *** 44,47 **** --- 44,48 ---- XP_THEME_CLASS_WINDOW, XP_THEME_CLASS_STATUS, + XP_THEME_CLASS_TRACKBAR, XP_THEME_CLASS__SIZEOF } XpThemeClass; *************** *** 94,97 **** --- 95,104 ---- XP_THEME_ELEMENT_TOOLBAR_SEPARATOR_H, XP_THEME_ELEMENT_TOOLBAR_SEPARATOR_V, + XP_THEME_ELEMENT_SCALE_TROUGH_H, + XP_THEME_ELEMENT_SCALE_TROUGH_V, + XP_THEME_ELEMENT_SCALE_SLIDER_H, + XP_THEME_ELEMENT_SCALE_SLIDER_V, + XP_THEME_ELEMENT_SCALE_TICS_H, + XP_THEME_ELEMENT_SCALE_TICS_V, XP_THEME_ELEMENT__SIZEOF } XpThemeElement; |
From: Dom L. <ci...@us...> - 2005-06-26 15:22:17
|
Update of /cvsroot/gtk-wimp/gtk-wimp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18917 Modified Files: Makefile.msc.config Log Message: make notebook tab drawing != top sorta work; infrastructure for drawing lines Index: Makefile.msc.config =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/Makefile.msc.config,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.msc.config 26 Jun 2005 01:41:41 -0000 1.5 --- Makefile.msc.config 26 Jun 2005 15:22:03 -0000 1.6 *************** *** 8,11 **** # Please configure this to match your setup. GTK_DIR=C:\Gnumeric ! INSTALL_DIR=C:\Program Files\Common Files\GTK\2.0\lib\gtk-2.0\2.4.0\engines SDK_DIR=C:\Gnumeric\include --- 8,11 ---- # Please configure this to match your setup. GTK_DIR=C:\Gnumeric ! INSTALL_DIR=C:\Gnumeric\lib\gtk-2.0\2.4.0\engines SDK_DIR=C:\Gnumeric\include |
From: Dom L. <ci...@us...> - 2005-06-26 15:22:13
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18917/src Modified Files: msw_style.c xp_theme.c xp_theme.h Log Message: make notebook tab drawing != top sorta work; infrastructure for drawing lines Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** msw_style.c 26 Jun 2005 02:33:10 -0000 1.21 --- msw_style.c 26 Jun 2005 15:22:05 -0000 1.22 *************** *** 1712,1735 **** GtkNotebook *notebook = GTK_NOTEBOOK(widget); GtkPositionType pos_type = gtk_notebook_get_tab_pos(notebook); ! if (pos_type == GTK_POS_TOP && state_type == GTK_STATE_NORMAL) ! height += XP_EDGE_SIZE; ! ! #if 0 ! /* FIXME: pos != TOP to be implemented */ ! else if (pos_type == GTK_POS_BOTTOM) ! y -= XP_EDGE_SIZE; ! else if (pos_type == GTK_POS_RIGHT) ! width += XP_EDGE_SIZE; ! else if (pos_type == GTK_POS_LEFT) ! height -= XP_EDGE_SIZE; ! #endif ! if (pos_type == GTK_POS_TOP ! && xp_theme_draw (window, gtk_notebook_get_current_page(notebook)==0 ? XP_THEME_ELEMENT_TAB_ITEM_LEFT_EDGE : XP_THEME_ELEMENT_TAB_ITEM, ! style, x, y, width, height, state_type, area)) { return; --- 1712,1737 ---- GtkNotebook *notebook = GTK_NOTEBOOK(widget); GtkPositionType pos_type = gtk_notebook_get_tab_pos(notebook); + gint x2, y2, w2, h2; ! x2 = x; y2 = y; w2 = width; h2 = height; ! if (pos_type == GTK_POS_TOP && state_type == GTK_STATE_NORMAL) { ! /*h2 += XP_EDGE_SIZE;*/ ! } ! else if (pos_type == GTK_POS_BOTTOM && state_type == GTK_STATE_NORMAL) { ! /*h2 += XP_EDGE_SIZE;*/ ! } ! else if (pos_type == GTK_POS_LEFT && state_type == GTK_STATE_NORMAL) { ! x2 += 1; ! w2 -= XP_EDGE_SIZE; ! } ! else if (pos_type == GTK_POS_RIGHT && state_type == GTK_STATE_NORMAL) { ! w2 -= (XP_EDGE_SIZE + 1); ! } ! if (xp_theme_draw (window, gtk_notebook_get_current_page(notebook)==0 ? XP_THEME_ELEMENT_TAB_ITEM_LEFT_EDGE : XP_THEME_ELEMENT_TAB_ITEM, ! style, x2, y2, w2, h2, state_type, area)) { return; *************** *** 1819,1823 **** gint y) { ! if (detail && !strcmp(detail, "menuitem")) { if (xp_theme_draw(window, XP_THEME_ELEMENT_MENU_SEPARATOR, style, --- 1821,1825 ---- gint y) { ! #if 0 if (detail && !strcmp(detail, "menuitem")) { if (xp_theme_draw(window, XP_THEME_ELEMENT_MENU_SEPARATOR, style, *************** *** 1825,1830 **** --- 1827,1841 ---- return; } + } else if (detail && !strcmp(detail, "toolbar")) { + if (xp_theme_draw(window, XP_THEME_ELEMENT_TOOLBAR_SEPARATOR_H, style, + x1, y, x2, style->ythickness, state_type, area)) { + return; + } } + if(xp_theme_draw(window, XP_THEME_ELEMENT_LINE_H, style, x1, y, x2, style->ythickness, state_type, area)) + return; + #endif + parent_class->draw_hline (style, window, state_type, area, widget, detail, x1, x2, y); *************** *** 1842,1845 **** --- 1853,1868 ---- gint x) { + #if 0 + if (detail && !strcmp(detail, "toolbar")) { + if (xp_theme_draw(window, XP_THEME_ELEMENT_TOOLBAR_SEPARATOR_V, style, + x, y1, style->xthickness, y2, state_type, area)) { + return; + } + } + + if(xp_theme_draw(window, XP_THEME_ELEMENT_LINE_V, style, x, y1, style->xthickness, y2, state_type, area)) + return; + #endif + parent_class->draw_vline (style, window, state_type, area, widget, detail, y1, y2, x); Index: xp_theme.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/xp_theme.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** xp_theme.c 26 Jun 2005 02:33:10 -0000 1.37 --- xp_theme.c 26 Jun 2005 15:22:05 -0000 1.38 *************** *** 51,54 **** --- 51,69 ---- #endif + #define GP_LINEHORZ 2 + #define GP_LINEVERT 3 + #define TP_SEPARATOR 5 + #define TP_SEPARATORVERT 6 + + /* GLOBALS LINEHORZ states */ + #define LHS_FLAT 1 + #define LHS_RAISED 2 + #define LHS_SUNKEN 3 + + /* GLOBAL LINEVERT states */ + #define LVS_FLAT 1 + #define LVS_RAISED 2 + #define LVS_SUNKEN 3 + static const LPCWSTR class_descriptors[] = { *************** *** 113,117 **** MP_SEPARATOR, SP_GRIPPER, ! SP_PANE }; --- 128,136 ---- MP_SEPARATOR, SP_GRIPPER, ! SP_PANE, ! GP_LINEHORZ, ! GP_LINEVERT, ! TP_SEPARATOR, ! TP_SEPARATORVERT }; *************** *** 257,260 **** --- 276,281 ---- case XP_THEME_ELEMENT_TOOLBAR_BUTTON: + case XP_THEME_ELEMENT_TOOLBAR_SEPARATOR_H: + case XP_THEME_ELEMENT_TOOLBAR_SEPARATOR_V: klazz = XP_THEME_CLASS_TOOLBAR; break; *************** *** 323,326 **** --- 344,352 ---- break; + case XP_THEME_ELEMENT_LINE_H: + case XP_THEME_ELEMENT_LINE_V: + klazz = XP_THEME_CLASS_GLOBALS; + break; + default: break; *************** *** 374,377 **** --- 400,408 ---- break; + case XP_THEME_ELEMENT_TOOLBAR_SEPARATOR_H: + case XP_THEME_ELEMENT_TOOLBAR_SEPARATOR_V: + ret = TS_NORMAL; + break; + case XP_THEME_ELEMENT_TOOLBAR_BUTTON: switch (state) *************** *** 638,641 **** --- 669,689 ---- break; + case XP_THEME_ELEMENT_LINE_H: + switch(state) { + /* LHS_FLAT, LHS_RAISED, LHS_SUNKEN */ + ret = LHS_RAISED; + break; + } + break; + + case XP_THEME_ELEMENT_LINE_V: + switch(state) { + /* LVS_FLAT, LVS_RAISED, LVS_SUNKEN */ + ret = LVS_RAISED; + break; + } + break; + + default: switch(state) Index: xp_theme.h =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/xp_theme.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** xp_theme.h 26 Jun 2005 02:33:10 -0000 1.16 --- xp_theme.h 26 Jun 2005 15:22:05 -0000 1.17 *************** *** 90,93 **** --- 90,97 ---- XP_THEME_ELEMENT_STATUS_GRIPPER, XP_THEME_ELEMENT_STATUS_PANE, + XP_THEME_ELEMENT_LINE_H, + XP_THEME_ELEMENT_LINE_V, + XP_THEME_ELEMENT_TOOLBAR_SEPARATOR_H, + XP_THEME_ELEMENT_TOOLBAR_SEPARATOR_V, XP_THEME_ELEMENT__SIZEOF } XpThemeElement; |
From: Dom L. <ci...@us...> - 2005-06-26 02:33:20
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25027/src Modified Files: msw_style.c xp_theme.c xp_theme.h Log Message: make the menubar and toolbar shadows depend on whether we're in XP theme or not Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** msw_style.c 26 Jun 2005 02:11:05 -0000 1.20 --- msw_style.c 26 Jun 2005 02:33:10 -0000 1.21 *************** *** 553,559 **** setup_msw_rc_style(void) { - /* TODO: Owen says: - "If your setup_system_styles() function called gtk_rc_parse_string(), then you are just piling a new set of strings on top each time the theme changes .. the old ones won't be removed" */ - char buf[1024], font_buf[256], *font_ptr; --- 553,556 ---- *************** *** 571,574 **** --- 568,573 ---- GdkColor text_prelight; + gboolean xp_theme = xp_theme_is_active(); + /* Prelight */ sys_color_to_gtk_color(XP_THEME_CLASS_TEXT, COLOR_HIGHLIGHTTEXT, &fg_prelight); *************** *** 633,641 **** "{\n" "bg[NORMAL] = { %d, %d, %d }\n" ! "GtkMenuBar::shadow-type = etched-in\n" "}widget_class \"*MenuBar*\" style \"msw-menu-bar\"\n", btn_face.red, btn_face.green, ! btn_face.blue); gtk_rc_parse_string(buf); --- 632,651 ---- "{\n" "bg[NORMAL] = { %d, %d, %d }\n" ! "GtkMenuBar::shadow-type = %s\n" "}widget_class \"*MenuBar*\" style \"msw-menu-bar\"\n", btn_face.red, btn_face.green, ! btn_face.blue, ! (xp_theme ? "etched-in" : "out")); ! 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", ! (xp_theme ? "none" : "out"), ! (xp_theme ? "none" : "out")); gtk_rc_parse_string(buf); Index: xp_theme.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/xp_theme.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** xp_theme.c 26 Jun 2005 02:23:27 -0000 1.36 --- xp_theme.c 26 Jun 2005 02:33:10 -0000 1.37 *************** *** 722,726 **** } ! static gboolean xp_theme_is_active (void) { --- 722,726 ---- } ! gboolean xp_theme_is_active (void) { Index: xp_theme.h =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/xp_theme.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** xp_theme.h 3 May 2005 20:06:36 -0000 1.15 --- xp_theme.h 26 Jun 2005 02:33:10 -0000 1.16 *************** *** 113,115 **** --- 113,117 ---- gboolean xp_theme_get_system_metric (XpThemeClass klazz, int metricId, int * pVal); + gboolean xp_theme_is_active (void); + #endif /* XP_THEME_H */ |