comparison src/toolbar-msw.c @ 284:558f606b08ae r21-0b40

Import from CVS: tag r21-0b40
author cvs
date Mon, 13 Aug 2007 10:34:13 +0200
parents 7df0dd720c89
children 57709be46d1b
comparison
equal deleted inserted replaced
283:fa3d41851a08 284:558f606b08ae
153 toolbarwnd = TOOLBAR_HANDLE(f,pos); 153 toolbarwnd = TOOLBAR_HANDLE(f,pos);
154 154
155 /* set button sizes based on bar size */ 155 /* set button sizes based on bar size */
156 if (vert) 156 if (vert)
157 { 157 {
158 width = height = bar_width; 158 width = height = bar_width
159 - (window_frame_width + shadow_thickness) * 2;
159 bmwidth = bmheight = width - (border_width + shadow_thickness) * 2; 160 bmwidth = bmheight = width - (border_width + shadow_thickness) * 2;
160 } 161 }
161 else 162 else
162 { 163 {
163 height = width = bar_height - window_frame_width * 2; 164 height = width = bar_height
165 - (window_frame_width + shadow_thickness) * 2;
164 bmwidth = bmheight = width - (border_width + shadow_thickness) * 2; 166 bmwidth = bmheight = width - (border_width + shadow_thickness) * 2;
165 } 167 }
166 168
167 button = FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons; 169 button = FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons;
168 170
334 } 336 }
335 337
336 /* vertical toolbars need more rows */ 338 /* vertical toolbars need more rows */
337 if (vert) 339 if (vert)
338 { 340 {
341 RECT tmp;
339 SendMessage (toolbarwnd, TB_SETROWS, 342 SendMessage (toolbarwnd, TB_SETROWS,
340 MAKEWPARAM(nbuttons, FALSE), 0); 343 MAKEWPARAM(nbuttons, FALSE), (LPARAM)&tmp);
341 } 344 }
342 345
343 else 346 else
344 { 347 {
345 SendMessage (toolbarwnd, TB_SETROWS, MAKEWPARAM(1, FALSE), 0); 348 RECT tmp;
349 SendMessage (toolbarwnd, TB_SETROWS, MAKEWPARAM(1, FALSE),
350 (LPARAM)&tmp);
346 } 351 }
347 352
348 /* finally populate with images */ 353 /* finally populate with images */
349 if (SendMessage (toolbarwnd, TB_SETIMAGELIST, 0, 354 if (SendMessage (toolbarwnd, TB_SETIMAGELIST, 0,
350 (LPARAM)ilist) == -1) 355 (LPARAM)ilist) == -1)