Color is not saved properly
Bug #273684 reported by
Hans de Graaff
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ScreenRuler |
Fix Released
|
High
|
Ian McIntosh |
Bug Description
The color of the screen ruler is not properly saved, and in fact even changes without going to the preferences pane on each different startup. It seems that only the saturation of the color is affected. Just starting screen ruler repeatedly is enough to get a paler color every time.
This happens with Screen Ruler 0.85 and compositing throught metacity enabled. I haven't seen this behaviour with older versions of Screen Ruler.
Related branches
Changed in screenruler: | |
assignee: | nobody → ian-mcintosh |
importance: | Undecided → High |
status: | New → Fix Committed |
Changed in screenruler: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The problem was incorrectly assuming that color components were 8-bit (as they appear in the color chooser dialog):
class Gdk::Color '#%x%x% x', red, green, blue)
def to_hex
sprintf(
end
end
Gdk::Color components are in fact 16-bit.
Revision 12 looks like this:
class Gdk::Color '#%02x% 02x%02x' , red / 257, green / 257, blue / 257) # because 255 * 257 == 65535
def to_hex
sprintf(
end
end