Allow unity-panel.menuitem to paint window title text for maximized window in new Unity Decorator(Trusty)

Bug #1296866 reported by Khurshid Alam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu theme
Fix Committed
Medium
Marco Trevisan (Treviño)
Unity
Fix Released
Medium
Marco Trevisan (Treviño)
ubuntu-themes (Ubuntu)
Fix Released
Undecided
Unassigned
unity (Ubuntu)
Fix Released
Undecided
Marco Trevisan (Treviño)

Bug Description

Some themes (Greybird, Elementary) use dark-panel & light window title-bar (When it is not maximized). As new Unity window decorator uses same title-bar foreground color for both normal & maximized windows, window title on unity-panel is not properly visible as it becomes dark-text on dark-panel. I have attached a screenshot.

This forces theme developer to use use same background color for both unity-panel & un-maximized windows, which breaks theme design. The idea is that theme-developers like to think unity-panel as a panel & not just a title-bar for maximized window.

According to https://wiki.ubuntu.com/Unity/Theming, color set in UnityDecoration.top is used for both unmaximized & maximized window.

UnityDecoration.top {
 color: @dark_fg_color
}

And when this is set, the color set in .unity-panel.menuitem is ignored for window title text in panel (it still paints some other text in panel like indicator-datetime)

.unity-panel .menuitem {
    border-width: 0 1px;
    color: @panel_fg_color; # this does not affect window title text anymore.
}

This color (OR unity.panel foreground color in UnityPanelWidget) should be used to paint the window tile text for maximized window, as it used to be in old compiz-decorator.

Tags: trusty

Related branches

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :
summary: - Allow .unity-panel.menuitem to paint window title text for maximized
+ Allow unity-panel.menuitem to paint window title text for maximized
window in new Unity Decorator(Trusty)
Revision history for this message
Brett Bogert (bbogert24) wrote :

Khurshid Alam is correct. According to the Unity theming documenation for Trusty 14.04 the panel text should be set by the UnityPanelWidget as follows:

UnityPanelWidget,
.unity-panel {
    background-color: shade (@dark_bg_color, 1.5);

    color: @dark_fg_color; /* Text color */ <--- ***SHOULD BE SET HERE***
 }

but it is actually being set by the UnityDecoration "top" code here:

/* This will theme the top decoration, so the whole space above the window */
UnityDecoration.top {
    border: 1px solid shade (@bg_color, 0.5);
    border-bottom-width: 0;
    border-radius: 8px 8px 0 0; /* Corner radius, only the top ones should be */
    padding: 1px 8px 0 8px; /* This padding will be applied to the content of the top layout */
    background-color: shade (@dark_bg_color, 1.5); /* Decoration background */
    color: @dark_fg_color; /* The foreground color will be used to paint the text */ <--- ***ACTUALLY BEING SET HERE ***
    text-shadow: 1px 0 #333, -1px 0 #333, 0 1px #333, 0 -1px #333;
}

This makes it impossible to use a dark panel with light window treatment as the title color for light window treatment is dark making the panel label (e.g. "Ubuntu Desktop") and maximized title unreadable on a dark panel.

In short the panel text color should be set by the unity panel widget class not by the unity decoration class.

Since this problem is already bug reported I will not open another bug report but track progress under this bug report number.

Thanks,
B.Bogert

Changed in unity:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in unity (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in unity:
milestone: none → 7.2.0
Changed in unity (Ubuntu):
status: New → In Progress
Changed in ubuntu-themes:
importance: Undecided → Medium
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
status: New → In Progress
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

FYI, the fix will land soon, I've updated the wiki with few new parameters we now handle.

Please check if everything is fine for you ;)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-themes - 14.04+14.04.20140402-0ubuntu1

---------------
ubuntu-themes (14.04+14.04.20140402-0ubuntu1) trusty; urgency=low

  [ Marco Trevisan (Treviño) ]
  * Ambiance,Radiance: set the backdrop color for unity-panel widgets
    (LP: #1296866)
 -- Ubuntu daily release <email address hidden> Wed, 02 Apr 2014 11:14:22 +0000

Changed in ubuntu-themes (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 7.2.0+14.04.20140402-0ubuntu1

---------------
unity (7.2.0+14.04.20140402-0ubuntu1) trusty; urgency=medium

  [ Stephen M. Webb ]
  * Release 7.2.0.

  [ Marco Trevisan (Treviño) ]
  * CompizUtils: only shadow-decorate alpha windows that have full
    decorations as well Since alpha windows might have custom shapes,
    it's safer not to shadow-decorate them unless they don't provide,
    for sure, a full decoration. (LP: #1281825)
  * Panel, Decorations: draw the background under the text glyphs before
    the text itself (LP: #723167)
  * PanelMenuView: use panel style context for painting the panel title
    (LP: #1296866)
  * SpreadFilter: use launcher width, scale on HiDPI, match also
    application names Launcher Width is now considered in setting the
    offset of the scale filter (fixes padding when launcher is in
    autohide mode). The search bar is correctly scaled when in HiDPI
    mode. We use ApplicationManager and thus BAMF to match windows by
    their name or app name. (LP: #1281297)
 -- Ubuntu daily release <email address hidden> Wed, 02 Apr 2014 11:04:11 +0000

Changed in unity (Ubuntu):
status: In Progress → Fix Released
Changed in unity:
milestone: 7.2.0 → 7.2.1
status: In Progress → Fix Committed
Changed in ubuntu-themes:
status: In Progress → Fix Committed
Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

Thanks. This bug is fixed for me.

Stephen M. Webb (bregma)
Changed in unity:
milestone: 7.2.1 → 7.2.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.