gtk_container_add(GTK_CONTAINER(fs->window), fs->imd->widget);
- if (options->image.use_custom_border_color)
- {
- image_background_set_color(fs->imd, &options->image.border_color);
- }
-
+ image_background_set_color_from_options(fs->imd, TRUE);
image_set_delay_flip(fs->imd, options->fullscreen.clean_flip);
image_auto_refresh_enable(fs->imd, fs->normal_imd->auto_refresh);
pixbuf_renderer_set_color((PixbufRenderer *)imd->pr, color);
}
+void image_background_set_color_from_options(ImageWindow *imd, gboolean fullscreen)
+{
+ GdkColor *color = NULL;
+
+ if (options->image.use_custom_border_color
+ && (!options->image.custom_border_fullscreen_only || fullscreen))
+ {
+ color = &options->image.border_color;
+ }
+
+ image_background_set_color(imd, color);
+}
+
void image_color_profile_set(ImageWindow *imd,
gint input_type,
gboolean use_image)
/* background of image */
void image_background_set_color(ImageWindow *imd, GdkColor *color);
+void image_background_set_color_from_options(ImageWindow *imd, gboolean fullscreen);
/* color profiles */
void image_color_profile_set(ImageWindow *imd,
vw->imd = image_new(FALSE);
- image_background_set_color(vw->imd, options->image.use_custom_border_color ? &options->image.border_color : NULL);
+ image_background_set_color_from_options(vw->imd, FALSE);
image_attach_window(vw->imd, vw->window, NULL, GQ_APPNAME, TRUE);
{
ViewWindow *vw = work->data;
work = work->next;
-
- image_background_set_color(vw->imd, options->image.use_custom_border_color ? &options->image.border_color : NULL);
+
+ image_background_set_color_from_options(vw->imd, !!vw->fs);
}
}
work = layout_window_list;
while (work)
{
+ gint i;
LayoutWindow *lw = work->data;
work = work->next;
-
+
if (!lw->image) continue;
- image_background_set_color(lw->image, options->image.use_custom_border_color ? &options->image.border_color : NULL);
+
+ for (i = 0; i < MAX_SPLIT_IMAGES; i++)
+ {
+ if (!lw->split_images[i]) continue;
+ image_background_set_color_from_options(lw->split_images[i], !!lw->full_screen);
+ }
+
+ image_background_set_color_from_options(lw->image, !!lw->full_screen);
}
}
g_signal_connect(G_OBJECT(lw->split_images[i]->pr), "update-pixel",
G_CALLBACK(layout_status_update_pixel_cb), lw);
- image_background_set_color(lw->split_images[i], options->image.use_custom_border_color ? &options->image.border_color : NULL);
+ image_background_set_color_from_options(lw->split_images[i], FALSE);
image_auto_refresh_enable(lw->split_images[i], TRUE);
options->image.tile_cache_max = 10;
options->image.image_cache_max = 128; /* 4 x 10MPix */
options->image.use_custom_border_color = FALSE;
+ options->image.custom_border_fullscreen_only = FALSE;
options->image.zoom_2pass = TRUE;
options->image.zoom_increment = 5;
options->image.zoom_mode = ZOOM_RESET_NONE;
guint zoom_quality;
gint zoom_increment; /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */
- gint use_custom_border_color;
+ gboolean custom_border_fullscreen_only;
+ gboolean use_custom_border_color;
GdkColor border_color;
} image;
options->image.enable_read_ahead = c_options->image.enable_read_ahead;
+
if (options->image.use_custom_border_color != c_options->image.use_custom_border_color
+ || options->image.custom_border_fullscreen_only != c_options->image.custom_border_fullscreen_only
|| !gdk_color_equal(&options->image.border_color, &c_options->image.border_color))
{
+ options->image.custom_border_fullscreen_only = c_options->image.custom_border_fullscreen_only;
options->image.use_custom_border_color = c_options->image.use_custom_border_color;
options->image.border_color = c_options->image.border_color;
layout_colors_update();
pref_checkbox_new_int(group, _("Custom border color"),
options->image.use_custom_border_color, &c_options->image.use_custom_border_color);
+
+ pref_checkbox_new_int(group, _("Apply custom border to fullscreen mode only"),
+ options->image.custom_border_fullscreen_only, &c_options->image.custom_border_fullscreen_only);
pref_color_button_new(group, _("Border color"), &options->image.border_color,
G_CALLBACK(pref_color_button_set_cb), &c_options->image.border_color);
WRITE_NL(); WRITE_BOOL(*options, image.enable_read_ahead);
WRITE_NL(); WRITE_BOOL(*options, image.exif_rotate_enable);
WRITE_NL(); WRITE_BOOL(*options, image.use_custom_border_color);
+ WRITE_NL(); WRITE_BOOL(*options, image.custom_border_fullscreen_only);
WRITE_NL(); WRITE_COLOR(*options, image.border_color);
// WRITE_SUBTITLE("Thumbnails Options");
if (READ_BOOL(*options, image.enable_read_ahead)) continue;
if (READ_BOOL(*options, image.exif_rotate_enable)) continue;
if (READ_BOOL(*options, image.use_custom_border_color)) continue;
+ if (READ_BOOL(*options, image.custom_border_fullscreen_only)) continue;
if (READ_COLOR(*options, image.border_color)) continue;
/* thumbnails options */