Skip to content

Commit

Permalink
use SVG 'darktable' name
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfbrown committed Sep 27, 2024
1 parent b94eec8 commit 55fd198
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 7 deletions.
52 changes: 52 additions & 0 deletions data/pixmaps/darktable.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions data/themes/darktable.css
Original file line number Diff line number Diff line change
Expand Up @@ -2322,17 +2322,17 @@ Details :

/* splash screen */
#splashscreen { background-color: @gray_20; border: 1px solid white; }
#splashscreen-header { background-color: @gray_20; }
#splashscreen-header { background-color: @gray_20; padding: 0; margin: 0; }
/* make the (nonexistent) title text very small to avoid an obvious bar at top */
#splashscreen-header label { font-size: 1%; }
/* hide the header button we were forced to instantiate */
#splashscreen-header button { opacity: 0; border: none; }
#splashscreen-header label { font-size: 1%; padding: 0; margin: 0; }
/* style the darktable icon */
#splashscreen-icon {}
/* position the darktable version next to the icon */
#splashscreen-version { margin-top: -30pt; margin-right: -90pt; font-size: 15pt; }
/* style the darktable program name */
#splashscreen-program { font-size: 400%; }
#splashscreen-program { font-size: 400%; margin: 2pt; }
/* style the darktable program description */
#splashscreen-description { font-size: 140%; font-family: serif; margin-top: 0pt; }
#splashscreen-description { font-size: 16pt; font-family: DejaVu Serif, serif; margin-top: 0pt; }
/* style the separating bar - without a style, it won't appear or take space! */
#splashscreen-separator { border: 3px solid @fg_color; margin-top: 15pt; margin-bottom: 15pt; }
/* style the progress message */
Expand Down
18 changes: 17 additions & 1 deletion src/gui/splash.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ void darktable_splash_screen_create(GtkWindow *parent_window, gboolean force)
splash_screen = gtk_dialog_new_with_buttons(_("darktable starting"), parent_window, flags,
NULL, GTK_RESPONSE_NONE, // <-- fake button list for compiler
NULL);
gtk_window_set_position(GTK_WINDOW(splash_screen), GTK_WIN_POS_CENTER);
gtk_widget_set_name(splash_screen,"splashscreen");
progress_text = gtk_label_new("initializing");
gtk_widget_set_name(progress_text,"splashscreen-progress");
Expand Down Expand Up @@ -83,13 +84,28 @@ void darktable_splash_screen_create(GtkWindow *parent_window, gboolean force)
GtkWidget *icon = gtk_image_new_from_icon_name("darktable", GTK_ICON_SIZE_DIALOG);
gtk_image_set_pixel_size(GTK_IMAGE(icon), 180);
gtk_widget_set_name(GTK_WIDGET(icon),"splashscreen-icon");
GtkWidget *program_name = GTK_WIDGET(gtk_label_new("darktable"));
gchar *version_str = g_strdup_printf("%.5s", darktable_package_version); //change to .6s for two-digit major ver
GtkWidget *version = GTK_WIDGET(gtk_label_new(version_str));
g_free(version_str);
gtk_widget_set_name(version, "splashscreen-version");
GtkWidget *program_name;
image_file = g_strdup_printf("%s/pixmaps/darktable.svg", darktable.datadir);
GdkPixbuf *prog_name_image = gdk_pixbuf_new_from_file_at_size(image_file, 300, -1, NULL);
g_free(image_file);
if(prog_name_image)
{
program_name = gtk_image_new_from_pixbuf(prog_name_image);
g_object_unref(prog_name_image);
}
else
program_name = GTK_WIDGET(gtk_label_new("darktable"));
gtk_widget_set_name(program_name, "splashscreen-program");
GtkWidget *program_desc = GTK_WIDGET(gtk_label_new(_("Photography workflow\napplication and\nRAW developer")));
gtk_label_set_justify(GTK_LABEL(program_desc), GTK_JUSTIFY_CENTER);
gtk_widget_set_name(program_desc, "splashscreen-description");
GtkBox *title_box = GTK_BOX(gtk_box_new(GTK_ORIENTATION_VERTICAL,5));
gtk_box_pack_start(title_box, icon, FALSE, FALSE, 0);
gtk_box_pack_start(title_box, version, FALSE, FALSE, 0);
gtk_box_pack_start(title_box, program_name, FALSE, FALSE, 0);
gtk_box_pack_start(title_box, program_desc, FALSE, FALSE, 0);
// now put the featured image to the right of the logo/name/description
Expand Down

0 comments on commit 55fd198

Please sign in to comment.