[Sugar-devel] [PATCH sugar-artwork][DESIGN][PROPOSAL] Use the same style as Browse in all GtkNotebooks

Manuel Quiñones manuq at laptop.org
Mon Sep 17 20:56:34 EDT 2012


Awesome Daniel, thank you very much for your patch, looks great.
Comments below:

2012/9/16 Daniel Francis <francis at sugarlabs.org>:
> BrowseNotebook is already used in Terminal and Browse, let's set it as the default GtkNotebook style.
>
> Signed-off-by: Daniel Francis <francis at sugarlabs.org>
> ---
>  gtk3/theme/gtk-widgets.css.em | 26 +++++++++-----------------
>  1 file changed, 9 insertions(+), 17 deletions(-)
>
> diff --git a/gtk3/theme/gtk-widgets.css.em b/gtk3/theme/gtk-widgets.css.em
> index 9059b49..c2351f0 100644
> --- a/gtk3/theme/gtk-widgets.css.em
> +++ b/gtk3/theme/gtk-widgets.css.em
> @@ -297,36 +297,28 @@ GtkComboBox .separator {
>  }
>
>  .notebook tab {
> -    background-color: @button_grey;
> -    color: @white;
> -}
> -
> -.notebook tab:active {
> -    background-color: @selection_grey;
> -}
> -
> -/* Browse notebook */
> -
> -BrowseNotebook.notebook tab {
>      background-color: @selection_grey;
> +    color: @white;
>  }
>
> -BrowseNotebook.notebook tab GtkLabel {
> +.notebook tab GtkLabel {
>      color: @white;
>  }

For the label in the tab we will need to add some padding to get the
tab height to the right size when the tabs have no buttons. We'll have
to play with the calculations until we reach the same height as with
buttons (like in Browse and Terminal gtk3).  You can see that
currently the tab enlarges vertically to fit the close button. I think
we can do that in a separate patch, so I added this ticket to follow
up: http://bugs.sugarlabs.org/ticket/3923

>
> -BrowseNotebook.notebook tab .button {
> -    border-radius: $(toolbutton_padding)px;
> +.notebook tab:active {
> +    background-color: @toolbar_grey;
>  }
>
> -BrowseNotebook.notebook tab:active {
> -    background-color: @toolbar_grey;
> +.notebook tab .button {
> +    border-radius: $(toolbutton_padding)px;
>  }
>
> -BrowseNotebook.notebook tab:active *:active {
> +.notebook tab:active *:active {
>      color: @white;
>  }

I removed that rule and nothing broke :P  I think we are safe removing
it, as it was there to override the *:active {} global rule already
removed.

> +/* Browse Widgets */
> +
>  BrowseLinkInfo {
>      color: @white;
>  }

We don't have that BrowseLinkInfo class in Browse anymore so I'll
remove it too, adding it to  the commit message.

We will also need to style the background color for the buttons in
mouse over (:prelight state) and when they are clicked/tapped (:active
state maybe?)

I attach a patch with the modifications above.  Thanks again!

> --
> 1.7.11.4
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel



-- 
.. manuq ..
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-the-same-style-as-Browse-in-all-GtkNotebooks-SL-.patch
Type: application/octet-stream
Size: 1885 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120917/69128886/attachment.obj>


More information about the Sugar-devel mailing list