Incorporate first icon in the aspect table
Sun is now represented by an (oversized) icon in the aspects table.
This commit is contained in:
		| @@ -256,6 +256,20 @@ ag_window_export_svg_action(GSimpleAction *action, GVariant *parameter, gpointer | ||||
|     // TODO: Check err! | ||||
| } | ||||
|  | ||||
| GtkWidget * | ||||
| ag_window_create_planet_widget(GswePlanetInfo *planet_info) | ||||
| { | ||||
|     GtkWidget *widget; | ||||
|  | ||||
|     if (gswe_planet_info_get_planet(planet_info) == GSWE_PLANET_SUN) { | ||||
|         widget = gtk_image_new_from_resource("/eu/polonkai/gergely/Astrognome/default-icons/planet-sun.svg"); | ||||
|     } else { | ||||
|         widget = gtk_label_new(gswe_planet_info_get_name(planet_info)); | ||||
|     } | ||||
|  | ||||
|     return widget; | ||||
| } | ||||
|  | ||||
| void | ||||
| ag_window_redraw_chart(AgWindow *window) | ||||
| { | ||||
| @@ -298,11 +312,11 @@ ag_window_redraw_chart(AgWindow *window) | ||||
|             planet_data = gswe_moment_get_planet(GSWE_MOMENT(priv->chart), planet_id, NULL); | ||||
|             planet_info = gswe_planet_data_get_planet_info(planet_data); | ||||
|  | ||||
|             label_hor = gtk_label_new(gswe_planet_info_get_name(planet_info)); | ||||
|             label_hor = ag_window_create_planet_widget(planet_info); | ||||
|             gtk_grid_attach(GTK_GRID(priv->aspect_table), label_hor, i + 1, i, 1, 1); | ||||
|  | ||||
|             if (i > 0) { | ||||
|                 label_ver = gtk_label_new(gswe_planet_info_get_name(planet_info)); | ||||
|                 label_ver = ag_window_create_planet_widget(planet_info); | ||||
|                 gtk_grid_attach(GTK_GRID(priv->aspect_table), label_ver, 0, i, 1, 1); | ||||
|             } | ||||
|         } | ||||
|   | ||||
| @@ -4,5 +4,7 @@ | ||||
|     <file>ui/astrognome.ui</file> | ||||
|     <file>ui/ag-window.ui</file> | ||||
|     <file>ui/ag-preferences.ui</file> | ||||
|  | ||||
|     <file>default-icons/planet-sun.svg</file> | ||||
|   </gresource> | ||||
| </gresources> | ||||
|   | ||||
							
								
								
									
										69
									
								
								src/resources/default-icons/planet-sun.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								src/resources/default-icons/planet-sun.svg
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,69 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||||
| <!-- Created with Inkscape (http://www.inkscape.org/) --> | ||||
|  | ||||
| <svg | ||||
|    xmlns:dc="http://purl.org/dc/elements/1.1/" | ||||
|    xmlns:cc="http://creativecommons.org/ns#" | ||||
|    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||||
|    xmlns:svg="http://www.w3.org/2000/svg" | ||||
|    xmlns="http://www.w3.org/2000/svg" | ||||
|    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||||
|    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||||
|    width="29.21875" | ||||
|    height="29.21875" | ||||
|    id="svg2" | ||||
|    sodipodi:version="0.32" | ||||
|    inkscape:version="0.48.4 r9939" | ||||
|    version="1.0" | ||||
|    sodipodi:docname="planet_sun.svg"> | ||||
|   <defs | ||||
|      id="defs4" /> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#ffffff" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1.0" | ||||
|      gridtolerance="10000" | ||||
|      guidetolerance="10" | ||||
|      objecttolerance="10" | ||||
|      inkscape:pageopacity="0.0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="1.979899" | ||||
|      inkscape:cx="196.94243" | ||||
|      inkscape:cy="-23.0998" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:current-layer="layer1" | ||||
|      inkscape:window-width="1920" | ||||
|      inkscape:window-height="1021" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="27" | ||||
|      showgrid="false" | ||||
|      fit-margin-top="0" | ||||
|      fit-margin-left="0" | ||||
|      fit-margin-right="0" | ||||
|      fit-margin-bottom="0" | ||||
|      inkscape:window-maximized="1" /> | ||||
|   <metadata | ||||
|      id="metadata7"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title></dc:title> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      id="layer1" | ||||
|      transform="translate(-268.70513,-375.63652)"> | ||||
|     <path | ||||
|        inkscape:connector-curvature="0" | ||||
|        id="planet_sun" | ||||
|        style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Cantarell;-inkscape-font-specification:Cantarell" | ||||
|        d="m 297.92388,390.2459 c -4e-5,4.04949 -1.42582,7.5 -4.27735,10.35156 -2.85158,2.83854 -6.3021,4.25781 -10.35156,4.25781 -4.02345,0 -7.46095,-1.41927 -10.3125,-4.25781 -2.85157,-2.85156 -4.27735,-6.30207 -4.27734,-10.35156 -10e-6,-2.52603 0.65103,-4.96092 1.95312,-7.30469 1.3151,-2.35675 3.14452,-4.16013 5.48828,-5.41016 2.34374,-1.26299 4.72655,-1.8945 7.14844,-1.89453 2.46092,3e-5 4.86326,0.63154 7.20703,1.89453 2.34372,1.25003 4.16664,3.0469 5.46875,5.39063 1.30205,2.33075 1.95309,4.77215 1.95313,7.32422 m -27.79297,0 c -10e-6,3.64584 1.28254,6.75131 3.84765,9.3164 2.5651,2.55209 5.67056,3.82813 9.31641,3.82813 3.64581,0 6.75128,-1.27604 9.31641,-3.82813 2.56507,-2.56509 3.84762,-5.67056 3.84765,-9.3164 -3e-5,-2.30467 -0.58597,-4.50519 -1.75781,-6.60157 -1.1719,-2.09633 -2.81253,-3.71091 -4.92187,-4.84375 -2.1094,-1.13278 -4.27086,-1.69919 -6.48438,-1.69922 -2.21356,3e-5 -4.37501,0.56644 -6.48437,1.69922 -2.10939,1.13284 -3.75001,2.74742 -4.92188,4.84375 -1.17188,2.09638 -1.75782,4.2969 -1.75781,6.60157 m 16.83594,0 c -3e-5,1.01564 -0.3581,1.88152 -1.07422,2.59765 -0.70315,0.70314 -1.56252,1.0547 -2.57813,1.05469 -1.00262,1e-5 -1.86199,-0.35155 -2.57812,-1.05469 -0.71616,-0.71613 -1.07424,-1.58201 -1.07422,-2.59765 -2e-5,-0.63801 0.16274,-1.24999 0.48828,-1.83594 0.32551,-0.58592 0.78123,-1.03514 1.36719,-1.34766 0.58592,-0.31248 1.18488,-0.46873 1.79687,-0.46875 0.61196,2e-5 1.21092,0.15627 1.79688,0.46875 0.58591,0.31252 1.04164,0.76174 1.36718,1.34766 0.3255,0.58595 0.48826,1.19793 0.48829,1.83594" /> | ||||
|   </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 3.6 KiB | 
		Reference in New Issue
	
	Block a user