Opened 10 years ago
Last modified 9 years ago
#4149 assigned defect
Paint: text background while editing is white, not transparent
Reported by: | godiard | Owned by: | godiard |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | Unspecified |
Component: | Paint | Version: | Unspecified |
Severity: | Unspecified | Keywords: | |
Cc: | Distribution/OS: | Unspecified | |
Bug Status: | Unconfirmed |
Description
In activities where we need edit text over the canvas, like in Paint, the technique used is place a TextView inside a Gtk.Fixed, and move the TextView to the needed position in the canvas.
Until os7, we can do:
self.textview.override_background_color(Gtk.StateFlags.NORMAL,
Gdk.RGBA(0, 0, 0, 0))
And the text had a tranparent background.
This is not working anymore in os8, the background is black, and break the effect.
To test this problem, need apply Paint commit 45d6940a1e454b169243f7742780fa6b0942fc67.
This problem is affecting other activities like Portfolio, but can use a workaround changing the background color. (The background color can be overrided, but the alpha is applied like if behind there are a black object, then if alpha is 0, shows black)
Change History (7)
comment:1 Changed 10 years ago by godiard
- Owner changed from erikos to manuq
- Status changed from new to assigned
comment:2 Changed 10 years ago by walter
comment:3 Changed 10 years ago by manuq
Doing the views transparent with the css provokes the same issue in Paint, but views are transparent in other Sugar places. So seems like a bug in Paint/Cairo.
I tested setting the view to transparent with the theme and removing the Paint override. In gtk-widgets.css, the change is:
.view { border-width: 0px; border-style: none; border-radius: 0px; padding: 0px; - background-color: @white; + background-color: transparent; }
comment:4 Changed 10 years ago by godiard
- Component changed from sugar-toolkit-gtk3 to Paint
- Milestone changed from 0.98 to 1.0
- Owner changed from manuq to godiard
- Summary changed from sugar-artwork: Black background in transparent objects over Gtk.Fixed to Paint: text background while editing is white, not
I have reverted the change in Paint. We can try get this transparent in the next cycle.
comment:6 Changed 9 years ago by godiard
- Milestone set to Unspecified
- Summary changed from Paint: text background while editing is white, not to Paint: text background while editing is white, not transparent
comment:7 Changed 9 years ago by godiard
This is happening in the XO, but not in my desktop. Tested on xo-4
FWIW, I've implemented a work-around (the added complexity of determining the background color instead of using transparency) for Portfolio and can do the same for TurtleArt and Sliderule. But for Paint and some others will not allow that work-around.