File indexing completed on 2024-05-12 17:10:53
0001 /* 0002 * truglass theme engine 0003 * 0004 * truglass.c 0005 * 0006 * Copyright (C) 2006 Quinn Storm <livinglatexkali@gmail.com> (original legacy theme engine) 0007 * Copyright (c) 2006 Alain <big_al326@hotmail.com> 0008 * 0009 * This program is free software; you can redistribute it and/or 0010 * modify it under the terms of the GNU General Public License 0011 * as published by the Free Software Foundation; either version 2 0012 * of the License, or (at your option) any later version. 0013 * 0014 * This program is distributed in the hope that it will be useful, 0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 * GNU General Public License for more details. 0018 * 0019 * You should have received a copy of the GNU General Public License 0020 * along with this program; if not, write to the Free Software 0021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0022 * 0023 */ 0024 0025 //truglass 0026 #include <emerald.h> 0027 #include <engine.h> 0028 #include "truglass_engine.h" 0029 0030 #define SECT "truglass_settings" 0031 0032 /* 0033 * settings structs 0034 */ 0035 typedef struct _private_fs 0036 { 0037 alpha_color base; 0038 alpha_color upper_glow; 0039 alpha_color lower_glow; 0040 alpha_color upper_title_glow; 0041 alpha_color middle_glow; 0042 alpha_color outer_glow; 0043 alpha_color window_halo; 0044 alpha_color window_highlight; 0045 alpha_color window_shadow; 0046 alpha_color separator_line; 0047 alpha_color contents_highlight; 0048 alpha_color contents_shadow; 0049 alpha_color contents_halo; 0050 } private_fs; 0051 0052 typedef struct _private_ws 0053 { 0054 gboolean round_top_left; 0055 gboolean round_top_right; 0056 gboolean round_bottom_left; 0057 gboolean round_bottom_right; 0058 double corner_radius; 0059 double glow_height; 0060 } private_ws; 0061 0062 void get_meta_info (EngineMetaInfo * emi) 0063 { 0064 emi->version = g_strdup("0.5"); 0065 emi->description = g_strdup(_("Glassy effects for your windows")); 0066 emi->last_compat = g_strdup("0.0"); // old themes marked still compatible for now 0067 emi->icon = gdk_pixbuf_new_from_inline(-1, my_pixbuf, TRUE, NULL); 0068 } 0069 0070 void engine_draw_frame (decor_t * d, cairo_t * cr) 0071 { 0072 double x1, y1, x2, y2, h; 0073 int top; 0074 frame_settings * fs = d->fs; 0075 private_fs * pfs = fs->engine_fs; 0076 window_settings * ws = fs->ws; 0077 private_ws * pws = ws->engine_ws; 0078 gdouble pleft; 0079 gdouble ptop; 0080 gdouble pwidth; 0081 gdouble pheight; 0082 top = ws->win_extents.top + ws->titlebar_height; 0083 0084 x1 = ws->left_space - ws->win_extents.left; 0085 y1 = ws->top_space - ws->win_extents.top; 0086 x2 = d->width - ws->right_space + ws->win_extents.right; 0087 y2 = d->height - ws->bottom_space + ws->win_extents.bottom; 0088 pleft = x1 + ws->win_extents.left - 0.5; 0089 ptop = y1 + top - 0.5; 0090 pwidth = x2 - x1 - ws->win_extents.left - ws->win_extents.right + 1; 0091 pheight = y2 - y1 - top-ws->win_extents.bottom + 1; 0092 0093 h = d->height - ws->top_space - ws->titlebar_height - ws->bottom_space; 0094 0095 int corners = 0096 ((pws->round_top_left) ? CORNER_TOPLEFT : 0) | 0097 ((pws->round_top_right) ? CORNER_TOPRIGHT : 0) | 0098 ((pws->round_bottom_left) ? CORNER_BOTTOMLEFT : 0) | 0099 ((pws->round_bottom_right) ? CORNER_BOTTOMRIGHT : 0); 0100 0101 // maximize work-a-round 0102 if (d->state & (WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY | 0103 WNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY)) 0104 corners = 0; 0105 0106 cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); 0107 cairo_set_line_width (cr, 1.0); 0108 0109 // Top Top Glow 0110 fill_rounded_rectangle (cr, 0111 x1 + 0.5, 0112 y1 + 0.5, 0113 x2 - x1 - 1, 0114 pws->glow_height, 0115 (CORNER_TOPLEFT | CORNER_TOPRIGHT) & corners, 0116 &pfs->upper_glow, &pfs->lower_glow, 0117 SHADE_BOTTOM, ws, 0118 pws->corner_radius); 0119 // Top Bottom Glow 0120 fill_rounded_rectangle (cr, 0121 x1 + 0.5, 0122 y1 + pws->glow_height + 0.5, 0123 x2 - x1 - 1, 0124 top - pws->glow_height + 0.5, 0125 0, 0126 &pfs->lower_glow, &pfs->lower_glow, 0127 SHADE_BOTTOM, ws, 0128 pws->corner_radius); 0129 // Top Left 0130 fill_rounded_rectangle (cr, 0131 x1 + 0.5, 0132 y1 + pws->glow_height + 0.5, 0133 ws->win_extents.left - 0.5, 0134 top - pws->glow_height - 0.5, 0135 CORNER_TOPLEFT & corners, 0136 &pfs->base, &pfs->upper_title_glow, 0137 SHADE_TOP, ws, 0138 pws->corner_radius); 0139 // Top 0140 fill_rounded_rectangle (cr, 0141 x1 + ws->win_extents.left, 0142 y1 + pws->glow_height + 0.5, 0143 x2 - x1 - ws->win_extents.left - 0144 ws->win_extents.right, 0145 top - pws->glow_height - 0.5, 0146 0, 0147 &pfs->base, &pfs->upper_title_glow, 0148 SHADE_TOP, ws, 0149 pws->corner_radius); 0150 // Top Right 0151 fill_rounded_rectangle (cr, 0152 x2 - ws->win_extents.right, 0153 y1 + pws->glow_height + 0.5, 0154 ws->win_extents.right - 0.5, 0155 top - pws->glow_height - 0.5, 0156 CORNER_TOPRIGHT & corners, 0157 &pfs->base, &pfs->upper_title_glow, 0158 SHADE_TOP, ws, 0159 pws->corner_radius); 0160 // Left 0161 fill_rounded_rectangle (cr, 0162 x1 + 0.5, 0163 y1 + top, 0164 ws->win_extents.left - 0.5, 0165 h, 0166 0, 0167 &pfs->base, &pfs->base, 0168 SHADE_LEFT, ws, 0169 pws->corner_radius); 0170 // Right 0171 fill_rounded_rectangle (cr, 0172 x2 - ws->win_extents.right, 0173 y1 + top, 0174 ws->win_extents.right - 0.5, 0175 h, 0176 0, 0177 &pfs->base, &pfs->base, 0178 SHADE_RIGHT, ws, 0179 pws->corner_radius); 0180 0181 // Bottom Left 0182 fill_rounded_rectangle (cr, 0183 x1 + 0.5, 0184 y2 - ws->win_extents.bottom, 0185 ws->win_extents.left - 0.5, 0186 ws->win_extents.bottom - 0.5, 0187 CORNER_BOTTOMLEFT & corners, 0188 &pfs->base, &pfs->base, 0189 SHADE_BOTTOM | SHADE_LEFT, ws, 0190 pws->corner_radius); 0191 // Bottom 0192 fill_rounded_rectangle (cr, 0193 x1 + ws->win_extents.left, 0194 y2 - ws->win_extents.bottom, 0195 x2 - x1 - ws->win_extents.left - 0196 ws->win_extents.right, 0197 ws->win_extents.bottom - 0.5, 0198 0, 0199 &pfs->base, &pfs->base, 0200 SHADE_BOTTOM,ws, 0201 pws->corner_radius); 0202 // Bottom Right 0203 fill_rounded_rectangle (cr, 0204 x2 - ws->win_extents.right, 0205 y2 - ws->win_extents.bottom, 0206 ws->win_extents.right - 0.5, 0207 ws->win_extents.bottom - 0.5, 0208 CORNER_BOTTOMRIGHT & corners, 0209 &pfs->base, &pfs->base, 0210 SHADE_BOTTOM | SHADE_RIGHT,ws, 0211 pws->corner_radius); 0212 0213 // ======= SECOND LAYER ======= 0214 cairo_set_operator (cr, CAIRO_OPERATOR_OVER); 0215 0216 // Top Left 0217 fill_rounded_rectangle (cr, 0218 x1 + 0.5, 0219 y1 + 0.5, 0220 ws->win_extents.left - 0.5, 0221 top - 0.5, 0222 CORNER_TOPLEFT & corners, 0223 &pfs->outer_glow, &pfs->outer_glow, 0224 SHADE_LEFT, ws, 0225 pws->corner_radius); 0226 // Top 0227 fill_rounded_rectangle (cr, 0228 x1 + ws->win_extents.left, 0229 y1 + 0.5, 0230 (x2 - x1 - ws->win_extents.left - 0231 ws->win_extents.right)/2, 0232 top - 0.5, 0233 0, 0234 &pfs->middle_glow, &pfs->outer_glow, 0235 SHADE_LEFT, ws, 0236 pws->corner_radius); 0237 0238 fill_rounded_rectangle (cr, 0239 x1 + ws->win_extents.left + 0240 (x2 - x1 - ws->win_extents.left - ws->win_extents.right)/2, 0241 y1 + 0.5, 0242 (x2 - x1 - ws->win_extents.left - 0243 ws->win_extents.right)/2, 0244 top - 0.5, 0245 0, 0246 &pfs->middle_glow, &pfs->outer_glow, 0247 SHADE_RIGHT, ws, 0248 pws->corner_radius); 0249 // Top Right 0250 fill_rounded_rectangle (cr, 0251 x2 - ws->win_extents.right, 0252 y1 + 0.5, 0253 ws->win_extents.right - 0.5, 0254 top - 0.5, 0255 CORNER_TOPRIGHT & corners, 0256 &pfs->outer_glow, &pfs->outer_glow, 0257 SHADE_RIGHT, ws, 0258 pws->corner_radius); 0259 // Left 0260 fill_rounded_rectangle (cr, 0261 x1 + 0.5, 0262 y1 + top, 0263 ws->win_extents.left - 0.5, 0264 h, 0265 0, 0266 &pfs->outer_glow,&pfs->outer_glow, 0267 SHADE_LEFT, ws, 0268 pws->corner_radius); 0269 // Right 0270 fill_rounded_rectangle (cr, 0271 x2 - ws->win_extents.right, 0272 y1 + top, 0273 ws->win_extents.right - 0.5, 0274 h, 0275 0, 0276 &pfs->outer_glow, &pfs->outer_glow, 0277 SHADE_RIGHT, ws, 0278 pws->corner_radius); 0279 0280 // Bottom Left 0281 fill_rounded_rectangle (cr, 0282 x1 + 0.5, 0283 y2 - ws->win_extents.bottom, 0284 ws->win_extents.left - 0.5, 0285 ws->win_extents.bottom - 0.5, 0286 CORNER_BOTTOMLEFT & corners, 0287 &pfs->outer_glow, &pfs->outer_glow, 0288 SHADE_LEFT, ws, 0289 pws->corner_radius); 0290 // Bottom 0291 fill_rounded_rectangle (cr, 0292 x1 + ws->win_extents.left, 0293 y2 - ws->win_extents.bottom, 0294 (x2 - x1 - ws->win_extents.left - 0295 ws->win_extents.right)/2, 0296 ws->win_extents.bottom - 0.5, 0297 0, 0298 &pfs->middle_glow, &pfs->outer_glow, 0299 SHADE_LEFT,ws, 0300 pws->corner_radius); 0301 0302 fill_rounded_rectangle (cr, 0303 x1 + ws->win_extents.left + 0304 (x2 - x1 - ws->win_extents.left - ws->win_extents.right)/2, 0305 y2 - ws->win_extents.bottom, 0306 (x2 - x1 - ws->win_extents.left - 0307 ws->win_extents.right)/2, 0308 ws->win_extents.bottom - 0.5, 0309 0, 0310 &pfs->middle_glow, &pfs->outer_glow, 0311 SHADE_RIGHT,ws, 0312 pws->corner_radius); 0313 // Bottom Right 0314 fill_rounded_rectangle (cr, 0315 x2 - ws->win_extents.right, 0316 y2 - ws->win_extents.bottom, 0317 ws->win_extents.right - 0.5, 0318 ws->win_extents.bottom - 0.5, 0319 CORNER_BOTTOMRIGHT & corners, 0320 &pfs->outer_glow, &pfs->outer_glow, 0321 SHADE_RIGHT,ws, 0322 pws->corner_radius); 0323 0324 // ======= THIRD LAYER ======= 0325 0326 // titlebar separator line 0327 cairo_set_source_alpha_color(cr, &pfs->separator_line); 0328 cairo_move_to (cr, x1 + 0.5, y1 + top - 0.5); 0329 cairo_rel_line_to (cr, x2 - x1 - 1.0, 0.0); 0330 cairo_stroke (cr); 0331 0332 0333 // do not draw outside the decoration area 0334 rounded_rectangle (cr, 0335 x1 + 0.5, y1 + 0.5, 0336 x2 - x1 - 1.0, y2 - y1 - 1.0, 0337 (CORNER_TOPLEFT | CORNER_TOPRIGHT | 0338 CORNER_BOTTOMLEFT | CORNER_BOTTOMRIGHT) & corners, 0339 ws, pws->corner_radius); 0340 cairo_clip (cr); 0341 0342 cairo_translate (cr, 1.0, 1.0); 0343 0344 // highlight 0345 rounded_rectangle (cr, 0346 x1 + 0.5, y1 + 0.5, 0347 x2 - x1 - 1.0, y2 - y1 - 1.0, 0348 (CORNER_TOPLEFT | CORNER_TOPRIGHT | CORNER_BOTTOMLEFT | 0349 CORNER_BOTTOMRIGHT) & corners, ws, 0350 pws->corner_radius); 0351 0352 cairo_set_source_alpha_color (cr, &pfs->window_highlight); 0353 cairo_stroke (cr); 0354 0355 cairo_translate (cr, -2.0, -2.0); 0356 0357 0358 // shadow 0359 rounded_rectangle (cr, 0360 x1 + 0.5, y1 + 0.5, 0361 x2 - x1 - 1.0, y2 - y1 - 1.0, 0362 (CORNER_TOPLEFT | CORNER_TOPRIGHT | CORNER_BOTTOMLEFT | 0363 CORNER_BOTTOMRIGHT) & corners, ws, 0364 pws->corner_radius); 0365 0366 cairo_set_source_alpha_color (cr, &pfs->window_shadow); 0367 cairo_stroke (cr); 0368 0369 cairo_translate (cr, 1.0, 1.0); 0370 0371 cairo_reset_clip (cr); 0372 0373 // halo 0374 rounded_rectangle (cr, 0375 x1 + 0.5, y1 + 0.5, 0376 x2 - x1 - 1.0, y2 - y1 - 1.0, 0377 (CORNER_TOPLEFT | CORNER_TOPRIGHT | CORNER_BOTTOMLEFT | 0378 CORNER_BOTTOMRIGHT) & corners, ws, 0379 pws->corner_radius); 0380 0381 cairo_set_source_alpha_color (cr, &pfs->window_halo); 0382 cairo_stroke (cr); 0383 0384 // inner border 0385 //TODO - make this a bit more pixel-perfect...but it works for now 0386 0387 cairo_set_line_width (cr, 1.0); 0388 0389 cairo_move_to (cr, pleft + pwidth + 1.5, ptop - 1); 0390 cairo_rel_line_to (cr, -pwidth - 2.5, 0); 0391 cairo_rel_line_to (cr, 0, pheight + 2.5); 0392 cairo_set_source_alpha_color (cr, &pfs->contents_shadow); 0393 cairo_stroke (cr); 0394 0395 cairo_move_to (cr, pleft + pwidth + 1, ptop - 1.5); 0396 cairo_rel_line_to (cr, 0, pheight + 2.5); 0397 cairo_rel_line_to (cr, -pwidth - 2.5, 0); 0398 cairo_set_source_alpha_color (cr, &pfs->contents_highlight); 0399 cairo_stroke (cr); 0400 0401 cairo_move_to (cr, pleft, ptop); 0402 cairo_rel_line_to (cr, pwidth, 0); 0403 cairo_rel_line_to (cr, 0, pheight); 0404 cairo_rel_line_to (cr, -pwidth, 0); 0405 cairo_rel_line_to (cr, 0, -pheight); 0406 cairo_set_source_alpha_color (cr, &pfs->contents_halo); 0407 cairo_stroke(cr); 0408 } 0409 0410 void load_engine_settings(GKeyFile * f, window_settings * ws) 0411 { 0412 private_ws * pws = ws->engine_ws; 0413 0414 // color settings 0415 PFACS(base); 0416 PFACS(upper_glow); 0417 PFACS(lower_glow); 0418 PFACS(upper_title_glow); 0419 PFACS(middle_glow); 0420 PFACS(outer_glow); 0421 PFACS(window_halo); 0422 PFACS(window_highlight); 0423 PFACS(window_shadow); 0424 PFACS(separator_line); 0425 PFACS(contents_shadow); 0426 PFACS(contents_highlight); 0427 PFACS(contents_halo); 0428 0429 // border settings 0430 load_bool_setting(f, &pws->round_top_left, "round_top_left", SECT); 0431 load_bool_setting(f, &pws->round_top_right, "round_top_right", SECT); 0432 load_bool_setting(f, &pws->round_bottom_left, "round_bottom_left", SECT); 0433 load_bool_setting(f, &pws->round_bottom_right, "round_bottom_right", SECT); 0434 load_float_setting(f, &pws->corner_radius, "radius", SECT); 0435 0436 // glow settings 0437 load_float_setting(f, &pws->glow_height, "glow_height", SECT); 0438 } 0439 0440 void init_engine(window_settings * ws) 0441 { 0442 private_fs * pfs; 0443 private_ws * pws; 0444 0445 // private window settings 0446 pws = malloc(sizeof(private_ws)); 0447 ws->engine_ws = pws; 0448 bzero(pws, sizeof(private_ws)); 0449 pws->round_top_left=TRUE; 0450 pws->round_top_right=TRUE; 0451 pws->round_bottom_left=TRUE; 0452 pws->round_bottom_right=TRUE; 0453 pws->corner_radius=5.0; 0454 pws->glow_height=10; 0455 0456 // private frame settings for active frames 0457 pfs = malloc(sizeof(private_fs)); 0458 ws->fs_act->engine_fs = pfs; 0459 bzero(pfs, sizeof(private_fs)); 0460 ACOLOR(base, 0.8, 0.8, 0.8, 0.5); 0461 ACOLOR(upper_glow, 0.8, 0.8, 0.8, 0.8); 0462 ACOLOR(lower_glow, 0.8, 0.8, 0.8, 0.8); 0463 ACOLOR(upper_title_glow, 0.8, 0.8, 0.8, 0.8); 0464 ACOLOR(middle_glow, 0.8, 0.8, 0.8, 0.8); 0465 ACOLOR(outer_glow, 0.8, 0.8, 0.8, 0.8); 0466 ACOLOR(window_highlight, 1.0, 1.0, 1.0, 0.8); 0467 ACOLOR(window_shadow, 0.6, 0.6, 0.6, 0.8); 0468 ACOLOR(window_halo, 0.8, 0.8, 0.8, 0.8); 0469 ACOLOR(separator_line, 0.0, 0.0, 0.0, 0.0); 0470 ACOLOR(contents_highlight, 1.0, 1.0, 1.0, 0.8); 0471 ACOLOR(contents_shadow, 0.6, 0.6, 0.6, 0.8); 0472 ACOLOR(contents_halo, 0.8, 0.8, 0.8, 0.8); 0473 0474 // private frame settings for inactive frames 0475 pfs = malloc(sizeof(private_fs)); 0476 bzero(pfs, sizeof(private_fs)); 0477 ws->fs_inact->engine_fs = pfs; 0478 ACOLOR(base, 0.8, 0.8, 0.8, 0.3); 0479 ACOLOR(upper_glow, 0.8, 0.8, 0.8, 0.6); 0480 ACOLOR(lower_glow, 0.8, 0.8, 0.8, 0.6); 0481 ACOLOR(upper_title_glow, 0.8, 0.8, 0.8, 0.8); 0482 ACOLOR(middle_glow, 0.8, 0.8, 0.8, 0.8); 0483 ACOLOR(outer_glow, 0.8, 0.8, 0.8, 0.8); 0484 ACOLOR(window_highlight, 1.0, 1.0, 1.0, 0.7); 0485 ACOLOR(window_shadow, 0.6, 0.6, 0.6, 0.7); 0486 ACOLOR(window_halo, 0.8, 0.8, 0.8, 0.7); 0487 ACOLOR(separator_line, 0.0, 0.0, 0.0, 0.0); 0488 ACOLOR(contents_highlight, 1.0, 1.0, 1.0, 0.8); 0489 ACOLOR(contents_shadow, 0.6, 0.6, 0.6, 0.8); 0490 ACOLOR(contents_halo, 0.8, 0.8, 0.8, 0.8); 0491 } 0492 0493 void fini_engine(window_settings * ws) 0494 { 0495 free(ws->fs_act->engine_fs); 0496 free(ws->fs_inact->engine_fs); 0497 } 0498 #if 0 0499 void layout_corners_frame(GtkWidget * vbox) 0500 { 0501 GtkWidget * hbox; 0502 GtkWidget * junk; 0503 0504 junk = gtk_check_button_new_with_label(_("Round Top Left Corner")); 0505 gtk_box_pack_startC(vbox, junk, FALSE, FALSE, 0); 0506 register_setting(junk, ST_BOOL, SECT, "round_top_left"); 0507 0508 junk = gtk_check_button_new_with_label(_("Round Top Right Corner")); 0509 gtk_box_pack_startC(vbox, junk, FALSE, FALSE, 0); 0510 register_setting(junk, ST_BOOL, SECT, "round_top_right"); 0511 0512 junk = gtk_check_button_new_with_label(_("Round Bottom Left Corner")); 0513 gtk_box_pack_startC(vbox, junk, FALSE, FALSE, 0); 0514 register_setting(junk, ST_BOOL, SECT, "round_bottom_left"); 0515 0516 junk = gtk_check_button_new_with_label(_("Round Bottom Right Corner")); 0517 gtk_box_pack_startC(vbox, junk, FALSE, FALSE, 0); 0518 register_setting(junk, ST_BOOL, SECT, "round_bottom_right"); 0519 0520 hbox = gtk_hbox_new(FALSE, 2); 0521 gtk_box_pack_startC(vbox, hbox, FALSE, FALSE, 0); 0522 0523 gtk_box_pack_startC(hbox, gtk_label_new(_("Rounding Radius")), FALSE, FALSE, 0); 0524 0525 junk = scaler_new(0, 20, 0.5); 0526 gtk_box_pack_startC(hbox, junk, TRUE, TRUE, 0); 0527 register_setting(junk, ST_FLOAT, SECT, "radius"); 0528 0529 hbox = gtk_hbox_new(FALSE, 2); 0530 gtk_box_pack_startC(vbox, hbox, FALSE, FALSE, 0); 0531 0532 gtk_box_pack_startC(hbox, gtk_label_new(_("Glow Height")), FALSE, FALSE, 0); 0533 0534 junk = scaler_new(0, 50, 0.5); 0535 gtk_box_pack_startC(hbox, junk, TRUE, TRUE, 0); 0536 register_setting(junk, ST_FLOAT, SECT, "glow_height"); 0537 } 0538 0539 void my_engine_settings(GtkWidget * hbox, gboolean active) 0540 { 0541 GtkWidget * vbox; 0542 GtkWidget * scroller; 0543 vbox = gtk_vbox_new(FALSE, 2); 0544 gtk_box_pack_startC(hbox, vbox, TRUE, TRUE, 0); 0545 gtk_box_pack_startC(vbox, gtk_label_new(active?"Active Window":"Inactive Window"), FALSE, FALSE, 0); 0546 gtk_box_pack_startC(vbox, gtk_hseparator_new(), FALSE, FALSE, 0); 0547 scroller = gtk_scrolled_window_new(NULL, NULL); 0548 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroller), 0549 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); 0550 gtk_box_pack_startC(vbox, scroller, TRUE, TRUE, 0); 0551 0552 table_new(3, FALSE, FALSE); 0553 0554 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scroller), GTK_WIDGET(get_current_table())); 0555 0556 make_labels(_("Colors")); 0557 table_append_separator(); 0558 ACAV(_("Frame Base Color"), "base", SECT); 0559 ACAV(_("Upper Titlebar Glow"), "upper_title_glow", SECT); 0560 table_append_separator(); 0561 ACAV(_("Upper Glass Glow"), "upper_glow", SECT); 0562 ACAV(_("Lower Glass Glow"), "lower_glow", SECT); 0563 table_append_separator(); 0564 ACAV(_("Middle Glass Glow"), "middle_glow", SECT); 0565 ACAV(_("Outer Glass Glow"), "outer_glow", SECT); 0566 table_append_separator(); 0567 ACAV(_("Titlebar Separator"), "separator_line", SECT); 0568 table_append_separator(); 0569 ACAV(_("Frame Outline"), "window_halo", SECT); 0570 ACAV(_("Frame Highlight"), "window_highlight", SECT); 0571 ACAV(_("Frame Shadow"), "window_shadow", SECT); 0572 table_append_separator(); 0573 ACAV(_("Contents Outline"), "contents_halo", SECT); 0574 ACAV(_("Contents Highlight"), "contents_highlight", SECT); 0575 ACAV(_("Contents Shadow"), "contents_shadow", SECT); 0576 } 0577 0578 void layout_engine_colors(GtkWidget * vbox) 0579 { 0580 GtkWidget * hbox; 0581 hbox = gtk_hbox_new(FALSE, 2); 0582 gtk_box_pack_startC(vbox, hbox, TRUE, TRUE, 0); 0583 my_engine_settings(hbox, TRUE); 0584 gtk_box_pack_startC(hbox, gtk_vseparator_new(), FALSE, FALSE, 0); 0585 my_engine_settings(hbox, FALSE); 0586 } 0587 0588 void layout_engine_settings(GtkWidget * vbox) 0589 { 0590 GtkWidget * note; 0591 note = gtk_notebook_new(); 0592 gtk_box_pack_startC(vbox, note, TRUE, TRUE, 0); 0593 layout_engine_colors(build_notebook_page(_("Colors"), note)); 0594 layout_corners_frame(build_notebook_page(_("Frame"), note)); 0595 } 0596 #endif