Software center have hardcoded colors and shows white font on white bg

Bug #899878 reported by Alexander Kabakow on 2011-12-04
360
This bug affects 88 people
Affects Status Importance Assigned to Milestone
Ubuntu GNOME
High
Bruce Pieterse
Ubuntu Software Center
Undecided
Unassigned
software-center (Ubuntu)
Medium
Unassigned

Bug Description

When using dark theme

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: software-center 5.0.2ubuntu0.1
ProcVersionSignature: Ubuntu 3.0.0-13.22-generic 3.0.6
Uname: Linux 3.0.0-13-generic i686
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Sun Dec 4 15:28:41 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
SourcePackage: software-center
UpgradeStatus: Upgraded to oneiric on 2011-10-16 (48 days ago)

Alexander Kabakow (alexzak) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in software-center (Ubuntu):
status: New → Confirmed
Rob Hamm (drhamm) wrote :

I've been poking about, but there are a lot of files associated with the software center, so if one of you could tell me which of those to edit, I'll happy do it manually for now. I tried editing /usr/share/software-center/ui/gtk3/css/softwarecenter.css, but a;as, while I could change some colors there (specifically, the ones on the first screen), still couldn't change the colors for font or background for the application information screen.

Rob Hamm (drhamm) wrote :

(Sorry--I missed the obvious. Went back and changed the line @define-color super-light-aubergine #F4F1F3 to @define-color super-light-aubergine #6d6d6d; and it's working fine for now.)

joshg (joshg) wrote :

It's the same with freshly installed 12.04

Changed in software-center (Ubuntu):
importance: Undecided → Medium
Adolfo Jayme (fitojb) on 2013-10-19
Changed in software-center:
status: New → Confirmed
HEXcube (hexcube) wrote :

I can't believe that this bug started in Oneiric(maybe even before that) and it's still not fixed after Raring (as per https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/913933 ). Ubuntu Software Center is a core feature of Ubuntu distribution and yet such a bug which affects its usability is left unnoticed! Why can't it just follow the system theme instead of using hardcoded colors.
Some Dark Theme developers have found workarounds involving replacing the softwarecenter.css with custom versions. One such fix by Delorean Dark theme developer is attached here. It is optimised for Dark Themes and works fine with light ones too. I don't know if it works perfectly with light themes,but it does try to use current theme colors instead of hardcoded ones,atleast in some places.

HEXcube (hexcube) wrote :

I forgot to mention : i'm using Ubuntu 12.04 LTS with Ubuntu Software Center ver 5.2.9 . The fix is from hellokitten/killhelllokitty(https://launchpad.net/~killhellokitty)'s Delorean Dark 1.55 theme(PPA- https://launchpad.net/~killhellokitty/+archive/themes.ppa)

The attachment "Delorean Dark's Software Center fix for Dark Themes" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
tags: removed: patch
Matthew Paul Thomas (mpt) wrote :

(I reported the incorrect patch detection as bug 1246487.)

HEXcube, thank you for that research. I think the next steps towards getting this bug fixed are:

A. Replace USC's normal CSS file with killhellokitty's CSS file, to see if it works in both of the standard Ubuntu themes.
B. If it does work, produce a diff of one file against the other so we can see exactly what is changed.

HEXcube (hexcube) wrote :

I tried both default themes Radiance and Ambience in Ubuntu 12.04 to check if they work well with killhellokitty's CSS file. Everything seems to be okay, except for selected items' text color in list view. Both background and foreground are light colors. this is because the CSS file was designed for dark themes.
ideally software center should show dark text with light background and light text on dark themes. killhellokitty's css theme is better than the default one, but needs a little more work to be the ideal theme.

Dudytz (dudytz) on 2013-11-15
tags: added: saucy
Auroral Xylon (avlabs314) wrote :

Hi, I'm currently developing/designing a Gtk theme which sets a white background for GtkTreeView:selected. In the softwarecenter.css file, the background is hard coded to be selection_bg_color, meaning that the red (which is the selection bg color defined in my theme) text is invisible on the red selection background, as shown in the screenshot. Would it not be more reasonable to let the themer set the value for this?

Matthew Paul Thomas (mpt) wrote :

Auroral, what happens if that CSS rule is removed? Is the selected row still an appropriate color? If so, perhaps you could attach a patch that removes it. Thanks!

Tommy Miller (tommydrum) wrote :

To all you people who want a temporary fix.. This is what I did (look inside the file and first 2 lines..) I changed the colors of the background that way. It /kindof/ fixes it.. but at least you can read most things.. just not when the windows is off focus.

File is at /usr/share/software-center/ui/gtk3/css/softwarecenter.css

Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/899878

tags: added: iso-testing
Sam Hewitt (snwh) wrote :

A better solution would be to separate the CSS from the USC altogether and let themes dictate what the software centre looks like as the hardcoded nature of the CSS means other problems arise for theme developers.

Gabriel Couto (gmcouto) wrote :

Or maybe hardcode everything.
If you make an application with hardcoded BG color, your text over that background SHOULD use hardcoded font color.
App content should use just theme colors or should use just hardcoded colors... not both.
You can't mix things up.
That practice is not functional and result in a half-assed application.

Narcis Garcia (narcisgarcia) wrote :

Affects Ubuntu-Gnome 14.04

Solution A) All colors hardcodes
Solution B) All collors from environment theme

The mix is the problem.

Sam Hewitt (snwh) wrote :

If it was simply changes to the general case and those exact CSS classes we added to Ambiance/Radiance the issue would be solved & it would solve problems with several other themes.. Further hardcoding of the CSS worse.

leoheck (leoheck) wrote :

I have the same problem here.
Please, fix it.
And, HARDCODE is never an option.

tags: added: trusty

Also affects freshly installed 15.04 release candidate as of 26th of January.

Bruce Pieterse (octoquad) wrote :

Also present in Gnome 14.10 with staging ppa.

Changed in ubuntu-gnome:
importance: Undecided → Medium
status: New → Confirmed
tags: added: amd64 utopic
removed: oneiric saucy
Thayne (thayne-u) wrote :

Why is this still not fixed? it seems like it wouldn't be that hard, and it has been years since it was first reported.

Jakey_TheSnake (clampstand) wrote :

Does anybody here understand how we can/whether it's possible to get the theme colours into CSS? Sort of like "gtk:bg[NORMAL]" in the XML metacity themes.

https://developer.gnome.org/gtk3/stable/gtk-migrating-GtkStyleContext-css.html

This page may be useful, but I don't fully understand it.

Commenting out GtkViewport, GtkTreeView and GtkTreeView:selected in the aforementioned softwarecentre.css seem to make the necessary changes: http://i.imgur.com/KwvaEdl.png but the front page still looks terrible thanks to the hardcoded background: http://i.imgur.com/Z1J9K42.png. Still looking to see where the background (stipple.png) is called from.

Interestingly in the css folder that contains softwarecentre.css there's also some css files labelled 'high contrast' and 'high contrast inverse' - it would be nice if we could find out how the software centre decides when to use these; then we could create a 'dark theme' one.

Jakey_TheSnake (clampstand) wrote :

'Stipple.png' is hardcoded in /usr/share/software-center/softwarecenter/ui/gtk3/views/catview.py:

jake@janux:/usr/share/software-center$ grep -r stipple *
Binary file softwarecenter/ui/gtk3/views/catview.pyc matches
softwarecenter/ui/gtk3/views/catview.py: "ui/gtk3/art/stipple.png")
softwarecenter/ui/gtk3/views/catview.py: assets["stipple"] = ptrn
softwarecenter/ui/gtk3/views/catview.py: cr.set_source(_asset_cache["stipple"])

Kiba (kiba) wrote :

More than 4 years with this bug not being fixed, this is why i use synaptic.

Considering that ubuntu software center is the go to place when new users are installing packages, this issue should have been resolved a long time IMHO. The css file proposed by Tommy (post #13) makes the application usable again. I can't be assumed that new users all use the light theme...

Shawn Landden (0-shawn) wrote :

Guys. If you posted a small bounty on https://www.bountysource.com/ you might get a quick resolution to this bug. When the bug doesn't effect the default path that is kinda how free software works if you don't have the personal ability to fix the bug.

I am seeing this bug on my MacBook Pro and MacBook Air

Bruce Pieterse (octoquad) wrote :

I've started working on a patch for this two weeks ago and I'm hoping that I can get this finished by next week.

Currently I have a problem getting the fake ratings API to work under Ubuntu Gnome, but I have a work around in mind.

This is a separate style sheet that will only load if Adwaita is the GTK theme currently being used based off the Ubuntu Gnome palette.

Before officially linking the branch to this bug report I would like to run it through the Ubuntu Gnome Artwork team to see if they would like to tweak any colors.

Screen shots attached. Feedback is welcome.

Changed in ubuntu-gnome:
importance: Medium → High
assignee: nobody → Bruce Pieterse (octoquad)
Changed in ubuntu-gnome:
status: Confirmed → In Progress

keying a fix for this general problem to a specific theme seems like the wrong solution. The proper fix is to just honor the theme's foreground/background colors, whether it is Adwaita or some thing different.

I think the images look great.

On Thu, Jun 11, 2015 at 1:22 PM, David Biesack <email address hidden>
wrote:

> keying a fix for this general problem to a specific theme seems like the
> wrong solution. The proper fix is to just honor the theme's
> foreground/background colors, whether it is Adwaita or some thing
> different.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/899878
>
> Title:
> Software center have hardcoded colors and shows white font on white bg
>
> Status in Ubuntu Software Center:
> Confirmed
> Status in Ubuntu GNOME:
> In Progress
> Status in software-center package in Ubuntu:
> Confirmed
>
> Bug description:
> When using dark theme
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.10
> Package: software-center 5.0.2ubuntu0.1
> ProcVersionSignature: Ubuntu 3.0.0-13.22-generic 3.0.6
> Uname: Linux 3.0.0-13-generic i686
> ApportVersion: 1.23-0ubuntu4
> Architecture: i386
> Date: Sun Dec 4 15:28:41 2011
> InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386
> (20101007)
> PackageArchitecture: all
> ProcEnviron:
> PATH=(custom, user)
> LANG=en_US.UTF-8
> SHELL=/bin/zsh
> SourcePackage: software-center
> UpgradeStatus: Upgraded to oneiric on 2011-10-16 (48 days ago)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/software-center/+bug/899878/+subscriptions
>

Narcis Garcia (narcisgarcia) wrote :

Bruce's is not a fix for this bug. It's a workaround, because the bug is at "Software center" application.

Matthew Paul Thomas (mpt) wrote :

Jakey_TheSnake: "but the front page still looks terrible thanks to the hardcoded background: http://i.imgur.com/Z1J9K42.png"

So anyone fluent with Gimp could fix that part, even if you aren't a coder: edit or redraw <http://bazaar.launchpad.net/~ubuntuone-control-tower/software-center/trunk/view/head:/data/ui/gtk3/art/stipple.png> ("download file") so that it is stipple on a transparent background, rather than stipple on a hard-coded grey background.

Once we've done that, the colors won't need to be hard-coded for the sake of the stipple background, so maybe removing those CSS rules is enough to fix the bug.

Matthew Paul Thomas (mpt) wrote :

(I removed a drive-by comment from someone cursing a non-existent "ubuntu-software-center development group". If anyone wants to help fixing the bug, I suggest following the steps I wrote above.)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions