[f21/master] Add a placeholder for a product-specific logo

Vratislav Podzimek vpodzime at redhat.com
Fri Nov 7 06:46:29 UTC 2014


On Thu, 2014-11-06 at 15:24 -0500, David Shea wrote:
> This adds a product-logo class to BaseStandalone that will be rendered
> after the sidebar background and regular sidebar logo. The position and
> content of the logo can be set using
> /run/install/product/anaconda-gtk.css
> ---
>  data/anaconda-gtk.css        | 13 +++++++++++++
>  widgets/src/BaseStandalone.c |  4 ++++
>  2 files changed, 17 insertions(+)
> 
> diff --git a/data/anaconda-gtk.css b/data/anaconda-gtk.css
> index 36d299c..6cb6343 100644
> --- a/data/anaconda-gtk.css
> +++ b/data/anaconda-gtk.css
> @@ -116,12 +116,18 @@
>  @define-color fedora #2f4265;
>  
>  /* logo and sidebar classes for Fedora */
> +
> +/* The sidebar consists of three parts: a background, a logo, and a product logo,
> + * rendered in that order. The product logo is empty by default and is intended
> + * to be overridden by a stylesheet in product.img.
> + */
>  .logo-sidebar {
>      background-image: url('/usr/share/anaconda/pixmaps/sidebar-bg.png');
>      background-color: @fedora;
>      background-repeat: no-repeat;
>  }
>  
> +/* Add a logo to the sidebar */
>  .logo {
>      background-image: url('/usr/share/anaconda/pixmaps/sidebar-logo.png');
>      background-position: 50% 20px;
> @@ -129,6 +135,13 @@
>      background-color: transparent;
>  }
>  
> +/* This is a placeholder to be filled by a product-specific logo. */
> +.product-logo {
> +    background-image: none;
> +    background-color: transparent;
> +}
> +
> +
>  AnacondaSpokeWindow #nav-box {
>      background-color: @fedora;
>      background-image: url('/usr/share/anaconda/pixmaps/topbar-bg.png');
> diff --git a/widgets/src/BaseStandalone.c b/widgets/src/BaseStandalone.c
> index 0ff1049..c822cf4 100644
> --- a/widgets/src/BaseStandalone.c
> +++ b/widgets/src/BaseStandalone.c
> @@ -261,6 +261,10 @@ static gboolean anaconda_base_standalone_on_draw(GtkWidget *win, cairo_t *cr) {
>      gtk_render_background(context, cr, sidebar_x, 0, sidebar_width, get_sidebar_height(win));
>      gtk_style_context_remove_class(context, "logo");
>  
> +    gtk_style_context_add_class(context, "product-logo");
> +    gtk_render_background(context, cr, sidebar_x, 0, sidebar_width, get_sidebar_height(win));
> +    gtk_style_context_remove_class(context, "product-logo");
> +
>      gtk_style_context_restore (context);
>  
>      return TRUE; /* TRUE to avoid default draw handler */
ACK.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list