294 |
294 |
295 void ui_destroy_boundvar(UiContext *ctx, UiVar *var) { |
295 void ui_destroy_boundvar(UiContext *ctx, UiVar *var) { |
296 uic_unbind_var(var); |
296 uic_unbind_var(var); |
297 |
297 |
298 if(var->type == UI_VAR_SPECIAL) { |
298 if(var->type == UI_VAR_SPECIAL) { |
299 free(var); |
299 ui_free(var->from_ctx, var); |
300 } else { |
300 } else { |
301 ui_free(var->from_ctx, var); |
301 ui_free(var->from_ctx, var); |
302 // TODO: free or unbound |
302 // TODO: free or unbound |
303 //uic_remove_bound_var(ctx, var); |
303 //uic_remove_bound_var(ctx, var); |
304 } |
304 } |
349 " color: alpha(currentColor, 0.5);" |
349 " color: alpha(currentColor, 0.5);" |
350 "}\n" |
350 "}\n" |
351 ".ui_test {\n" |
351 ".ui_test {\n" |
352 " background-color: red;\n" |
352 " background-color: red;\n" |
353 "}\n" |
353 "}\n" |
|
354 ".ui_label_title {\n" |
|
355 " font-weight: bold;\n" |
|
356 "}\n" |
354 ; |
357 ; |
355 |
358 |
356 #elif GTK_MAJOR_VERSION == 3 |
359 #elif GTK_MAJOR_VERSION == 3 |
357 static const char *ui_gtk_css = |
360 static const char *ui_gtk_css = |
358 "#path-textfield-box {" |
361 "#path-textfield-box {\n" |
359 " background-color: @theme_base_color;" |
362 " background-color: @theme_base_color;\n" |
360 " border-radius: 5px;" |
363 " border-radius: 5px;\n" |
361 " padding: 0px;" |
364 " padding: 0px;\n" |
362 "}"; |
365 "}" |
|
366 ".ui_test {\n" |
|
367 " background-color: red;\n" |
|
368 "}\n" |
|
369 ".ui_label_title {\n" |
|
370 " font-weight: bold;\n" |
|
371 "}\n" |
|
372 ; |
363 #endif |
373 #endif |
364 |
374 |
365 void ui_css_init(void) { |
375 void ui_css_init(void) { |
366 ui_gtk_css_provider = gtk_css_provider_new(); |
376 ui_gtk_css_provider = gtk_css_provider_new(); |
367 |
377 |