В Чтв, 31/03/2005 в 13:26 -0500, Matthias Clasen пишет: > On Thu, 2005-03-31 at 10:50 +0400, Nickolay V. Shmyrev wrote: > > Well, you've almost convinced me :) > > > > Isn't it better than have API for colors similar to stock icons API: > > > > struct GtkStockColorItem; > > > > gtk_stock_color_items_add > > gtk_stock_color_items_add_static > > gtk_stock_color_item_free > > gtk_stock_color_item_list_ids > > gtk_stock_color_lookup > > > > and add to GtkGC's api. > > > > gtk_gc_get_from_stock > > > > also it is possible and useful to make public gtk_style_shade function as > > > > gtk_color_shade (GtkColor *color, gdouble shade) > > > > > > and define a lot of stock colors: > > > > GTK_STOCK_COLOR_ERROR /* RED */ > > GTK_STOCK_COLOR_WARNING /* YELLOW */ > > GTK_STOCK_COLOR_NORMAL /* GREEN */ > > GTK_STOCK_COLOR_HIGHLIGHT /* BLUE */ > > > > and so on for all HIG palette. Note that there are definitely should be > > about > > 8 items with just numbers, as Soren stated, useful for graphs, charts. > > > > GTK_STOCK_COLOR_ITEM_1 > > GTK_STOCK_COLOR_ITEM_2 > > GTK_STOCK_COLOR_ITEM_3 > > GTK_STOCK_COLOR_ITEM_4 > > > > > > application could add it's own stock colors and theme authors could modify > > it just like stock icons > > Some important points that need to be adressed are: > > - We want to be able to write a simple "color setting" control. How does > that work ? Is there a Setting containing a palette, ie essentially a > map from color names to rgb triplets ?
Currently there is no way to edit theme, why palette should be editable? It can be adjusted from user gtkrc files as now background can be adjusted. Proper color settings could be hard-coded by theme author, but it would be hard for user to quickly select palette that looks well with the user's theme. > - How can themes adapt to the user-selected stock colors ? Do we add new > rc file syntax like fg[NORMAL] = stock-color("foreground") ? I thought that stock colors should be addition to current theme, not replacement of existing services. That means that the only addition to rc file syntax is ability to specify stock color like stock_color["evolution-important-mail"] = "#a5a5a5a" > > - Do themes need to be able to derive new colors from the stock colors ? > If yes, how ? Do we parse color expressions like > fg[NORMAL] = lerp(0.5, stock-color("foreground"), #ff00ff) ? > > - How can themes mark themselves as being "recolorable" ? (We probably > want to disable the color setting control if the theme uses fixed > colors) > All this looks a bit early. This change should help developers to make widgets that looks nice with any theme. Sometimes gtk settings will have format and there will be application that will allow user to edit theme, then palette will be adjusted from such application. But now writing a good theme is the state of art and not much users can and want to do that. > Matthias > _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list