Merged patch from Arnaud Charlet

This commit is contained in:
Raymond Penners 2003-10-14 18:35:43 +00:00
parent f6bb7584cd
commit e246918d1b
5 changed files with 39 additions and 25 deletions

View File

@ -1,3 +1,10 @@
2003-04-15 Arnaud Charlet <charlet@ACT-Europe.FR>
* src/*.c: The handling of selected radio button was broken.
* src/xp_theme_defs.h: When building with gcc, the tree expanders
were inverted.
2003-10-08 Raymond Penners <raymond@dotsphinx.com>
* === Released 0.5.0 ===

View File

@ -766,9 +766,10 @@ draw_option(GtkStyle *style,
}
else
{
if (xp_theme_draw(window,
XP_THEME_ELEMENT_RADIO_BUTTON, style,
x, y, width, height, state, area))
if (xp_theme_draw (window, shadow == GTK_SHADOW_IN
? XP_THEME_ELEMENT_PRESSED_RADIO_BUTTON
: XP_THEME_ELEMENT_RADIO_BUTTON,
style, x, y, width, height, state, area))
{
}
else
@ -1509,27 +1510,29 @@ draw_handle (GtkStyle *style,
{
XpThemeElement hndl;
if (!GTK_IS_HANDLE_BOX(widget)) {
if (orientation == GTK_ORIENTATION_VERTICAL)
hndl = XP_THEME_ELEMENT_GRIPPER_V;
else
hndl = XP_THEME_ELEMENT_GRIPPER_H;
if (!GTK_IS_HANDLE_BOX (widget))
{
if (orientation == GTK_ORIENTATION_VERTICAL)
hndl = XP_THEME_ELEMENT_GRIPPER_V;
else
hndl = XP_THEME_ELEMENT_GRIPPER_H;
if (xp_theme_draw(window, hndl, style, x, y, width, height, state_type, area))
{
return;
}
}
if (!GTK_IS_HANDLE_BOX(widget)) {
/* 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 {
/* 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);
}
if (xp_theme_draw (window, hndl, style, x, y, width, height,
state_type, area))
{
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
{
/* 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);
}
}
static void

View File

@ -77,6 +77,7 @@ static const short element_part_map[]=
SPNP_UP,
SPNP_DOWN,
BP_RADIOBUTTON,
BP_RADIOBUTTON,
TVP_GLYPH,
TVP_GLYPH,
PP_CHUNK,
@ -226,6 +227,7 @@ xp_theme_get_handle_by_element (XpThemeElement element)
case XP_THEME_ELEMENT_CHECKBOX:
case XP_THEME_ELEMENT_BUTTON:
case XP_THEME_ELEMENT_DEFAULT_BUTTON:
case XP_THEME_ELEMENT_PRESSED_RADIO_BUTTON:
case XP_THEME_ELEMENT_RADIO_BUTTON:
klazz = XP_THEME_CLASS_BUTTON;
break;
@ -470,6 +472,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
break;
case XP_THEME_ELEMENT_PRESSED_CHECKBOX:
case XP_THEME_ELEMENT_PRESSED_RADIO_BUTTON:
switch(state)
{
case GTK_STATE_SELECTED:

View File

@ -67,6 +67,7 @@ typedef enum
XP_THEME_ELEMENT_DEFAULT_BUTTON,
XP_THEME_ELEMENT_SPIN_BUTTON_UP,
XP_THEME_ELEMENT_SPIN_BUTTON_DOWN,
XP_THEME_ELEMENT_PRESSED_RADIO_BUTTON,
XP_THEME_ELEMENT_RADIO_BUTTON,
XP_THEME_ELEMENT_TREEVIEW_EXPANDER_OPENED,
XP_THEME_ELEMENT_TREEVIEW_EXPANDER_CLOSED,

View File

@ -138,8 +138,8 @@ typedef HANDLE HTHEME;
#define UPS_PRESSED 3
#define UPS_DISABLED 4
#define GLPS_OPENED 1
#define GLPS_CLOSED 2
#define GLPS_CLOSED 1
#define GLPS_OPENED 2
#if UXTHEME_HAS_LINES