Black background on GtkSourceView widget

Reported by Dr. Amr Osman on 2012-06-29
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
indicator-stickynotes
Medium
Umang Varma

Bug Description

There is a black background on sticky notes when yellow is intended. Somehow, the GtkCssProvider doesn't respect or support the transparent background set to the TextView widget.

This bug initially reported the following issues:

Using stiky notes 0.1 in ubuntu with ambiance theme there is alot of bad UI
1) no monochrome Icon
2) using icons on buttons is against gnome recent behavior and generates inconsistencies (Now tracked separately on Bug #1021028)
3) the sticky note background color is black and font color is dark
4) sticky notes should use a simple handwriting font

Umang Varma (umang) wrote :

Hi!

Thank you for your comments.

1. I am planing to make a monochrome Icon soon. As this is the first release, I had not researched ways to have the icon depend on the current icon theme without touching the /usr/share/icons directory. I think this should be easy to do.

2. Thanks for bringing this point out. I did notice that icons on buttons were discouraged. However, I am not comfortable replacing them with text. I think that when a program has three buttons, there isn't much to poke at. Further, native gnome apps often use buttons themselves. Nautilus, for example, has back and forward buttons. In my opinion, for a simple application like Indicator StickyNotes, there is no benefit of switching to labels.

3. Hmm. Do the notes not look like this for you? https://myapps.developer.ubuntu.com/site_media/appmedia/2012/06/indicator-stickynotes.png If they don't, please attach a screenshot and the exact version of Ubuntu you are using along with which desktop environment you are using (check using echo $DESKTOP_SESSION).

4. That's an interesting point. I've thought about it. Do you have a font in mind? I am not keen on using a font that doesn't ship by default on Ubuntu and most Linux distributions. However, is there is one that is available is most repositories (or at the very least Ubuntu's repository), I would be open to considering it.

Thanks!

Dr. Amr Osman (dr3mro) wrote :

ubuntu 12.04 .. with unity 5.12
dr3mro@Amilo:~$ echo $DESKTOP_SESSION
ubuntu

screen shot :
http://img69.imageshack.us/img69/9379/screenshotfrom201206301.png

====================

i will search for a font for you !!

Dr. Amr Osman (dr3mro) wrote :

Oh .. wait
I have experinence in developing apps for linux
may i join your team
i can create a daily ppa
and stable ppa for indicator-stickynotes
and make contributions to the code :)

Umang Varma (umang) wrote :

Thanks for the screenshot, that is not what I expected. I'll need to look into this further.

Sure! I'm not sure if a small app like Indicator StickyNotes needs more than one PPA, but if you want to submit code, just branch my repository and send me either a patch or pull request or github. (I like git better, so I use github for code hosting). If you like bzr, feel free to make a bzr branch on Launchpad. I'm sure it should be easy to extract a patch from bzr and apply to git. If you're trying to fix a specific issue or add a new feature, file a bug for each issue and use a separate branch for each new feature/issue.

Umang Varma (umang) wrote :

I've got basic monochrome icons in the repository.

Could you send me more details about the black background you noticed. Does it happen all the time? Does it happen if you reinstall indicator-stickynotes? Does it happen only with certain settings? Could you try downloading the latest source code from https://github.com/umangv/indicator-stickynotes/downloads and running indicator-stickynotes.py ? Do you still see the black background?

Thanks.

Dr. Amr Osman (dr3mro) wrote :

yes it happens all the time
I use ubuntu 12.04 with gnome3 ppa to get some of 3.4 gnome pkgs that didn't reach the main repos but i don't think that is the cause
i use unity with latest updates and 3.5 kernel

Dr. Amr Osman (dr3mro) wrote :

and yes it still happen with the git version

Umang Varma (umang) on 2012-07-04
description: updated
Changed in indicator-stickynotes:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Umang Varma (umang)
summary: - stikcy notes UI
+ Black background on GtkSourceView widget
Umang Varma (umang) wrote :

Hmm. I've tried hard to reproduce this but haven't been able to.

Could you try again with this download? https://github.com/umangv/indicator-stickynotes/tarball/sourcestyle

Umang Varma (umang) wrote :

Also, if that doesn't fix it, could you run `find . -iname "*sourceview*"` in your home directory (without the `backticks`, obviously) and tell me if there is any output? (it might take a while). I feel as though some sourceview setting, probably theme, is overriding the background set in style.css.

You're also not the only one with this issue: http://osarena.net/logismiko/applications/sticky-notes-thimase-ta-kitrina-aftokollita-chartakia.html

Dr. Amr Osman (dr3mro) wrote :

sudo find / -iname "*sourceview*"
[sudo] password for dr3mro:
/usr/share/locale-langpack/en_GB/LC_MESSAGES/gtksourceview-3.0.mo
/usr/share/locale-langpack/en_CA/LC_MESSAGES/gtksourceview-3.0.mo
/usr/share/locale-langpack/en_AU/LC_MESSAGES/gtksourceview-3.0.mo
/usr/share/webkitgtk-3.0/webinspector/resourceView.css
/usr/share/webkitgtk-3.0/webinspector/ResourceView.js
/usr/share/gtksourceview-3.0
/usr/share/doc/libgtksourceview-3.0-common
/usr/share/doc/libgtksourceview-3.0-0
/usr/share/webkitgtk-1.0/webinspector/resourceView.css
/usr/share/webkitgtk-1.0/webinspector/ResourceView.js
/usr/share/vala-0.14/vapi/gtksourceview-3.0.deps
/usr/share/vala-0.14/vapi/gtksourceview-3.0.vapi
/usr/share/vala-0.14/vapi/gtksourceview-2.0.vapi
/usr/share/vala-0.14/vapi/gtksourceview-2.0.deps
/usr/lib/i386-linux-gnu/libgtksourceview-3.0.so.0.0.0
/usr/lib/i386-linux-gnu/libgtksourceview-3.0.so.0
/home/dr3mro/evolve/vala/valadoc.org/gtksourceview-2.0
/home/dr3mro/evolve/vala/valadoc.org/gtksourceview-2.0/Gtk.SourceViewMarkTooltipFunc.html
/home/dr3mro/evolve/vala/valadoc.org/gtksourceview-2.0/Gtk.SourceView.html
/home/dr3mro/evolve/vala/valadoc.org/gtksourceview-2.0/gtksourceview-2.0.tar.bz2
/home/dr3mro/evolve/vala/valadoc.org/gtksourceview-2.0/Gtk.SourceViewGutterPosition.html
/home/dr3mro/evolve/vala/valadoc.org/gtksourceview-3.0
/home/dr3mro/evolve/vala/valadoc.org/gtksourceview-3.0/Gtk.SourceView.html
/home/dr3mro/evolve/vala/valadoc.org/gtksourceview-3.0/Gtk.SourceViewGutterPosition.html
/home/dr3mro/evolve/vala/valadoc.org/gtksourceview-3.0/gtksourceview-3.0.tar.bz2
/home/dr3mro/eLiberary/programing/python/dist/pygtksourceview.tar.bz2
/var/lib/dpkg/info/libgtksourceview-3.0-0:i386.symbols
/var/lib/dpkg/info/libgtksourceview-3.0-common.list
/var/lib/dpkg/info/libgtksourceview-3.0-0:i386.md5sums
/var/lib/dpkg/info/libgtksourceview-3.0-0:i386.postrm
/var/lib/dpkg/info/libgtksourceview-3.0-0:i386.list
/var/lib/dpkg/info/libgtksourceview-3.0-0:i386.postinst
/var/lib/dpkg/info/libgtksourceview-3.0-0:i386.shlibs
/var/lib/dpkg/info/libgtksourceview-3.0-common.md5sums

Umang Varma (umang) wrote :

OK. So, I'm assuming that the new github file didn't fix it for you. I'm going to try to examine this further on a virtual machine. If you ever manage to find a clue as to why this is happening, let me know.

Umang Varma (umang) wrote :

Also, do you have the same version of GtkSourceView that I have?

$ apt-cache policy libgtksourceview-3.0-0
libgtksourceview-3.0-0:
  Installed: 3.4.2-0ubuntu1
  Candidate: 3.4.2-0ubuntu1

Dr. Amr Osman (dr3mro) wrote :

libgtksourceview-3.0-0:
  Installed: 3.4.2-0ubuntu1
  Candidate: 3.4.2-0ubuntu1
  Version table:
 *** 3.4.2-0ubuntu1 0
        500 http://eg.archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages
        100 /var/lib/dpkg/status
     3.4.1-0ubuntu1 0
        500 http://eg.archive.ubuntu.com/ubuntu/ precise/main i386 Packages

Dr. Amr Osman (dr3mro) wrote :

I have found a work around and here is the diff

20,21c20
<
< GtkTextView
---
> GtkSourceView
23,26c22,25
< /*background-image-source: -gtk-gradient(linear,
< left top, right bottom,
< from(#ff0), to(#0ff));*/
< background-color:transparent;
---
> background-image: -gtk-gradient(linear,
> left top, left bottom,
> color-stop (0.0, #ff7),
> color-stop (0.0, #fe0));
28c27
< GtkTextView:selected
---
> GtkSourceView:selected
37,38c36,37
< color-stop (0, #ff7),
< color-stop (0.66, #fe0));
---
> color-stop (0.0, #ff7),
> color-stop (0.0, #fe0));

Umang Varma (umang) wrote :

Thanks for your patch!

I applied the patch, but that didn't help. I had tried setting the gradient on the SourceView initially, but that always set it to a flat color rather than a gradient and I seem to have the same problem here.

I wonder why GtkSourceView doesn't like transparent backgrounds on some computers. I have tried very hard to reproduce this in three different virtual machines (one with regular Unity, one with a GNOME3 desktop environment, and a final with the GNOME 3.4 PPA). I've tried installing GtkSourceView themes, but even that doesn't affect the stickynotes.

On 07/07/2012 03:26 PM, Umang Varma wrote:
> I wonder why GtkSourceView doesn't like transparent backgrounds on some
> computers. I have tried very hard to reproduce this in three different
> virtual machines (one with regular Unity, one with a GNOME3 desktop
> environment, and a final with the GNOME 3.4 PPA). I've tried installing
> GtkSourceView themes, but even that doesn't affect the stickynotes.

Might be due to some hardware issues with transparency !!

Umang Varma (umang) wrote :

Hmm. Do you have hardware acceleration? I have disabled acceleration on my virtual machines and it still works fine.

Dr. Amr Osman (dr3mro) wrote :

On 07/07/2012 03:48 PM, Umang Varma wrote:
> s and it still works fine.
yes i have hardware acc intel gma 450 and unity 3d works fine
but when i modified the code to make it loss the dark background yes it
lacks the gradient but better than dark ..
i dont know but it might be a bug with gtk ?

Umang Varma (umang) wrote :

Yes, probably. If you're interested in helping me find out what causes this, could you take install Ubuntu 12.04 in VirtualBox (or similar) and install indicator-stickynotes on it. Then, step-by-step install your ppas and themes onto it and see what causes it to break. My guess is that it's probably some GNOME/GTK related package or a Gtk or GtkSourceView theme that breaks it. Don't do it if it seems like too much to do, I'll keep investigating anyway.

Thanks again for your help with this.

Umang Varma (umang) wrote :

Hi,

If you have upgraded to 12.10, could you see if you are still affected?

Changed in indicator-stickynotes:
status: Confirmed → Incomplete
Patrick (patrickstar777) wrote :

I don't know about this, but this bug might have to do with GTK or something since:

I also get the black text on black ground when renaming folders or files in nautilus or nemo (the text-field that turns black when being edited, text is only readable when selected, just like on the sticky-notes).

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

Other bug subscribers