Monday, November 21, 2011

[Selene] Giving more love to Gnome-Panel?! :)

I'm cooking gnome-panel again...






Because I love these features for panel:

  1. Really configurable for theming. Especially font shadows, backgrounds and button appearances...
  2. Centre Clock. I've been waiting for this!! :) So I love Wingpanel as well.
  3. Window List. It's really important for navigating windows. 
Now we could use gnome-panel with some Ubuntu Indicators by applying "Indicator-applet" packages... Wow!! cool!!
But now we sometimes experiences ugly situation with gnome-panel. Yep, If you guys want to try to put pixmaps as Background of panel, Then gnome-panel might load mismatched rendering, something like "shrunk images" with "black band" placed bottom of panel. :(

Why?

Yeah It seams to be caused gtk3 theming... damned!
So we could fix it by polishing own theming especially "padding" of panel components! :P In my case, I could fix it to change padding from "3" to "0" for panel.css:
/* Fallback Mode Panel */
.gnome-panel,
.unity-panel,
.unity-2d-panel,
.wingpanel,
.xfce-panel,
PanelWidget,
PanelApplet,
PanelToplevel {
    color: @text_color;
    padding: 0;
    background-image: -gtk-gradient (linear,
                     left top,
                     left bottom,
                     from (shade (@bg_color, 1.08)),
                                     color-stop (0.05, shade (@bg_color, 1.02)),   
                                     color-stop (0.93, shade (@bg_color, 0.82)),
                                     color-stop (0.94, shade (@bg_color, 0.89)),
                                     color-stop (0.96, shade (@bg_color, 0.69)),
                                     color-stop (0.98, shade (@bg_color, 0.55)),
                     to (shade (@bg_color, 0.55)));
    border-width: 0;

    -unico-outer-stroke-gradient: -gtk-gradient (linear,
                    left top, left bottom,
                    from (alpha (#000, 0.60)),
                    to (alpha (#000, 0.00)));   
}

.gnome-panel-menu-bar,
.unity-panel-menu-bar,
.wingpanel-menu-bar,
.gnome-panel-menu-bar.unity-panel,
PanelApplet > GtkMenuBar.menubar,
PanelApplet > GtkMenuBar.menubar.menuitem,
PanelMenuBar.menubar,
PanelMenuBar.menubar.menuitem {
    color: #383838;
    background-image: -gtk-gradient (linear,
                     left top,
                     left bottom,
                     from (shade (@bg_color, 1.08)),
                                     color-stop (0.05, shade (@bg_color, 1.02)),
                                     color-stop (0.93, shade (@bg_color, 0.82)),
                                     color-stop (0.94, shade (@bg_color, 0.89)),
                                     color-stop (0.96, shade (@bg_color, 0.69)),
                                     color-stop (0.99, shade (@bg_color, 0.55)),
                     to (shade (@bg_color, 0.55)));
    border-width: 0;
}

PanelAppletFrame {
    background-image: -gtk-gradient (linear,
                     left top,
                     left bottom,
                     from (shade (@bg_color, 1.08)),
                                     color-stop (0.05, shade (@bg_color, 1.02)),
                                     color-stop (0.93, shade (@bg_color, 0.82)),
                                     color-stop (0.94, shade (@bg_color, 0.89)),
                                     color-stop (0.96, shade (@bg_color, 0.69)),
                                     color-stop (0.99, shade (@bg_color, 0.55)),
                     to (shade (@bg_color, 0.55)));
    border-width: 0;
}

PanelApplet .button {
    border-radius: 0;
    border-width:0;
    color: #383838;   
    background-image: -gtk-gradient (linear,
                     left top,
                     left bottom,
                     from (shade (@bg_color, 1.08)),
                                     color-stop (0.05, shade (@bg_color, 1.02)),
                                     color-stop (0.93, shade (@bg_color, 0.82)),
                                     color-stop (0.94, shade (@bg_color, 0.89)),
                                     color-stop (0.96, shade (@bg_color, 0.69)),
                                     color-stop (0.99, shade (@bg_color, 0.55)),
                     to (shade (@bg_color, 0.55)));
    border-width: 0;
}

PanelApplet .button:prelight:active,
PanelApplet .button:active {
    color: #4a90d9;
    font-weight: bold;
}

PanelApplet .button:prelight {
    color: #4a90d9;
    font-weight: bold;   
}

ClockBox {
    color: @fg_color;
}

WnckPager, WnckTasklist {
    color: #dedede;
    background-image: -gtk-gradient (linear,
                     left top,
                     left bottom,
                     from (shade (@bg_color, 1.08)),
                                     color-stop (0.05, shade (@bg_color, 1.02)),
                                     color-stop (0.93, shade (@bg_color, 0.82)),
                                     color-stop (0.94, shade (@bg_color, 0.89)),
                                     color-stop (0.96, shade (@bg_color, 0.69)),
                                     color-stop (0.99, shade (@bg_color, 0.55)),
                     to (shade (@bg_color, 0.55)));
    border-width: 0;    
}

That's my panel theming for gtk3 today. :)
I hope this could help someone...

Have a nice day!

2 comments:

  1. Hi!

    Does setting gtk-gradient for PanelToplevel really work for you? For me, it seems that it just uses the second colour (see https://launchpadlibrarian.net/84345859/changed_colors.png), and I've even filed a bug for that (https://bugzilla.gnome.org/show_bug.cgi?id=663397).

    ReplyDelete
  2. Hi mitya57,

    You're right. still "whole panel gradient" didn't work...
    Although gnome-panel has "unconfigurable spacer/wrapper" for centering objects, So this wrapper area could not accept for its gtk3 theming now... :S

    My screenshot uses pixmap image for background.
    I suppose now it's only way to be filled with our desired theming on "whole panel"...

    But, Wingpanel has "themerable" spacer/wrapper for centering.
    It didn't need such pixmaps for covering background. :)

    Anyway, Thanks for your filing bug report! :-) I could confirm this issue on gnome-panel3...

    Regards,
    Tista

    ReplyDelete