Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] (PR#11021) Change text styles
Home

[Freeciv-Dev] (PR#11021) Change text styles

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#11021) Change text styles
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Sun, 14 Nov 2004 15:47:45 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=11021 >

Colours are evil, because they clash with themes.
Death to hardcoded font colours! :-)

Index: client/gui-gtk-2.0/helpdlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/helpdlg.c,v
retrieving revision 1.37
diff -u -r1.37 helpdlg.c
--- client/gui-gtk-2.0/helpdlg.c        13 Nov 2004 08:34:17 -0000      1.37
+++ client/gui-gtk-2.0/helpdlg.c        14 Nov 2004 23:46:03 -0000
@@ -304,6 +304,7 @@
   button = gtk_button_new();
   gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
   gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5);
+  gtk_widget_set_name(label, "help link");
   gtk_container_add(GTK_CONTAINER(button), label);
   gtk_widget_show(button);
   g_signal_connect_swapped(button, "clicked",
@@ -319,14 +320,9 @@
 {
   GtkWidget *button, *label;
 
-  button = gtk_button_new_with_label(txt);
-  gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
-  label = GTK_BIN(button)->child;
-  gtk_widget_set_name(label, "help link");
-  gtk_widget_show(button);
-  g_signal_connect_swapped(button, "clicked",
-                          G_CALLBACK(help_hyperlink_callback), label);
-  g_object_set_data(G_OBJECT(label), "page_type", GUINT_TO_POINTER(type));
+  label = gtk_label_new(txt);
+  gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5);
+  button = help_hyperlink_new(label, type);
   return button;
 }
 
@@ -519,7 +515,6 @@
     if (i==5) {
       button = help_hyperlink_new(help_ilabel[i], HELP_TECH);
       gtk_table_attach_defaults(GTK_TABLE(help_itable), button, i, i+1, 0, 1);
-      gtk_widget_set_name(help_ilabel[i], "help link");
     } else {
       gtk_table_attach_defaults(GTK_TABLE(help_itable),
                                help_ilabel[i], i, i+1, 0, 1);
@@ -538,7 +533,6 @@
     if (i==3 || i==5) {
       button = help_hyperlink_new(help_wlabel[i], HELP_TECH);
       gtk_table_attach_defaults(GTK_TABLE(help_wtable), button, i, i+1, 0, 1);
-      gtk_widget_set_name(help_wlabel[i], "help link");
     } else {
       gtk_table_attach_defaults(GTK_TABLE(help_wtable),
                                help_wlabel[i], i, i+1, 0, 1);
@@ -564,7 +558,6 @@
 
         gtk_table_attach_defaults(GTK_TABLE(help_utable),
                                            button, i, i+1, j, j+1);
-        gtk_widget_set_name(help_ulabel[j][i], "help link");
       } else {
         gtk_table_attach_defaults(GTK_TABLE(help_utable),
                                  help_ulabel[j][i], i, i+1, j, j+1);
Index: client/gui-gtk-2.0/messagewin.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/messagewin.c,v
retrieving revision 1.27
diff -u -r1.27 messagewin.c
--- client/gui-gtk-2.0/messagewin.c     31 Oct 2004 20:45:54 -0000      1.27
+++ client/gui-gtk-2.0/messagewin.c     14 Nov 2004 23:46:03 -0000
@@ -139,10 +139,10 @@
 
   if (b) {
     g_object_set(G_OBJECT(cell), "style", PANGO_STYLE_ITALIC,
-                "foreground", "blue", "weight", PANGO_WEIGHT_NORMAL, NULL);
+                "weight", PANGO_WEIGHT_NORMAL, NULL);
   } else {
     g_object_set(G_OBJECT(cell), "style", PANGO_STYLE_NORMAL,
-                "foreground", "black", "weight", PANGO_WEIGHT_BOLD, NULL);
+                "weight", PANGO_WEIGHT_BOLD, NULL);
   }
 }
                                             
Index: client/gui-gtk-2.0/plrdlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/plrdlg.c,v
retrieving revision 1.43
diff -u -r1.43 plrdlg.c
--- client/gui-gtk-2.0/plrdlg.c 14 Nov 2004 02:02:22 -0000      1.43
+++ client/gui-gtk-2.0/plrdlg.c 14 Nov 2004 23:46:03 -0000
@@ -529,13 +529,13 @@
    /* now add some eye candy ... */
    switch (pplayer_get_diplstate(game.player_ptr, plr)->type) {
    case DS_WAR:
-     weight = PANGO_WEIGHT_BOLD;
-     style = PANGO_STYLE_NORMAL;
+     weight = PANGO_WEIGHT_NORMAL;
+     style = PANGO_STYLE_ITALIC;
      break;
    case DS_ALLIANCE:
    case DS_TEAM:
-     weight = PANGO_WEIGHT_NORMAL;
-     style = PANGO_STYLE_ITALIC;
+     weight = PANGO_WEIGHT_BOLD;
+     style = PANGO_STYLE_NORMAL;
      break;
    default:
      weight = PANGO_WEIGHT_NORMAL;
Index: client/gui-gtk-2.0/repodlgs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/repodlgs.c,v
retrieving revision 1.67
diff -u -r1.67 repodlgs.c
--- client/gui-gtk-2.0/repodlgs.c       13 Nov 2004 23:22:43 -0000      1.67
+++ client/gui-gtk-2.0/repodlgs.c       14 Nov 2004 23:46:04 -0000
@@ -1315,7 +1315,6 @@
     GtkTreeViewColumn *col;
       
     renderer = gtk_cell_renderer_text_new();
-    g_object_set(renderer, "weight", "bold", NULL);
     col = gtk_tree_view_column_new_with_attributes(titles[i], renderer,
                                                    "text", i, NULL);
     gtk_tree_view_column_set_sort_column_id(col, i);
Index: data/freeciv.rc-2.0
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/freeciv.rc-2.0,v
retrieving revision 1.20
diff -u -r1.20 freeciv.rc-2.0
--- data/freeciv.rc-2.0 18 Oct 2004 23:49:27 -0000      1.20
+++ data/freeciv.rc-2.0 14 Nov 2004 23:46:04 -0000
@@ -61,8 +61,6 @@
 style "comment_label"
 {
   font_name = "Sans Italic 9"
-  fg[NORMAL] = "blue"
-  fg[PRELIGHT] = "blue"
 }
 
 style "city_names_font"

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#11021) Change text styles, Vasco Alexandre da Silva Costa <=