Set progressbar minimal width and height depending on the orientation (#12941,#12949)
							parent
							
								
									b2e899fabb
								
							
						
					
					
						commit
						3e169650ce
					
				|  | @ -558,9 +558,13 @@ static void set_progressbar_csscolor(GtkWidget* pbar, GdkRGBA* color) | |||
|     GtkCssProvider *css_provider; | ||||
|     gchar * css; | ||||
| #if GTK_CHECK_VERSION (3, 20, 0) | ||||
|     css = g_strdup_printf("progressbar trough { min-width: 4px; min-height: 4px; } \
 | ||||
|                            progressbar progress { min-width: 4px; min-height: 4px; \ | ||||
|     gchar * cssminsizes = "min-width: 4px; min-height: 0px"; | ||||
|     if (gtk_orientable_get_orientation(GTK_ORIENTABLE(pbar)) == GTK_ORIENTATION_HORIZONTAL) | ||||
|         cssminsizes = "min-width: 0px; min-height: 4px"; | ||||
|     css = g_strdup_printf("progressbar trough { %s } \
 | ||||
|                            progressbar progress { %s ; \ | ||||
|                                                   background-color: %s; background-image: none; }", | ||||
|                           cssminsizes, cssminsizes, | ||||
| #else | ||||
|     css = g_strdup_printf(".progressbar { background-color: %s; background-image: none; }", | ||||
| #endif | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Landry Breuil
						Landry Breuil