#4056 closed defect (fixed)
Write. text selection have fg & bg black
| Reported by: | godiard | Owned by: | godiard |
|---|---|---|---|
| Priority: | Unspecified by Maintainer | Milestone: | |
| Component: | Write | Version: | Unspecified |
| Severity: | Unspecified | Keywords: | r+, 13.1.0, olpc-test-passed |
| Cc: | Distribution/OS: | Unspecified | |
| Bug Status: | Unconfirmed |
Description (last modified by godiard)
Similar to #4055, but didn't found the solution yet.
When use abiword in gnome, the selection have a blue background and in sugar have a black background.
Attachments (2)
Change History (9)
comment:1 Changed 10 years ago by godiard
- Description modified (diff)
comment:2 Changed 10 years ago by godiard
Changed 10 years ago by godiard
comment:3 Changed 10 years ago by garnacho
Rendering in Abiword is delegated to an internal widget deriving from GtkDrawingArea, so the CSS rule that does black on black is likely aiming to theme those generically, a more specific rule can be set in the theme to specifically fix this for Abiword text view:
ApDocView:selected {
color: ...;
background-color: ...;
}
Changed 10 years ago by godiard
comment:4 Changed 10 years ago by manuq
- Resolution set to fixed
- Status changed from new to closed
Thanks Carlos, pushed to artwork together with the Evince styling. http://bugs.sugarlabs.org/ticket/4055#comment:2
comment:5 Changed 10 years ago by manuq
- Keywords r+ 13.1.0 olpc-test-pending added
comment:6 Changed 10 years ago by greenfeld
- Keywords olpc-test-passed added; olpc-test-pending removed
Selected text will always be shown with black text and highlighted in gray (regardless of original text color) in OLPC 13.1.0 os8.
Tried different options:
AbiWidget *:selected { background-color: @selection_grey; }diff --git a/AbiWordActivity.py b/AbiWordActivity.py index 2dff90b..f594709 100644 --- a/AbiWordActivity.py +++ b/AbiWordActivity.py @@ -25,6 +25,7 @@ from gi.repository import GObject GObject.threads_init() from gi.repository import Gtk +from gi.repository import Gdk from gi.repository import Abi from gi.repository import GdkPixbuf import telepathy @@ -215,6 +216,15 @@ class AbiWordActivity(activity.Activity): self.abiword_canvas.set_font_name('Sans') self.abiword_canvas.moveto_bod() + # set selection color + selection_color = style.Color('#A6A6A6') + rgba = Gdk.RGBA() + rgba.red, rgba.green, rgba.blue, rgba.alpha = \ + selection_color.get_rgba() + logging.error('set selection bacground %s', rgba) + self.abiword_canvas.override_background_color(Gtk.StateFlags.SELECTED, + rgba) + def get_preview(self): if not hasattr(self.abiword_canvas, 'render_page_to_image'): return activity.Activity.get_preview(self)I think the code relevant in abiword is in wp/ap/gtk/ap_UnixFrameImpl.cpp method AP_UnixFrameImpl::getColorSelBackground