stacks_gui_curved.py can not display images very well

Bug #176069 reported by Peng Huang
4
Affects Status Importance Assigned to Milestone
Awn Extras
Fix Released
Low
Silentstorm

Bug Description

Stacks can not display images very well with curved gui. The images have a weird border. I think it's because of the icons do not have alpha channel. Below patch can fix this problem. But this patch will create new icons every time when drawing icons. It is not effective. You may create icon with alpha channel when loading the icon. (I did find the right place for icon loading )

=== modified file 'awn-applets/awn-extras-applets/src/stacks/stacks_gui_curved.py'
--- awn-applets/awn-extras-applets/src/stacks/stacks_gui_curved.py 2007-12-11 01:05:17 +0000
+++ awn-applets/awn-extras-applets/src/stacks/stacks_gui_curved.py 2007-12-13 07:38:36 +0000
@@ -910,7 +910,7 @@
                if iw < icon_size: x_adjust = (iw - icon_size) / 2
                if ih < icon_size: y_adjust = (ih - icon_size) / 2

- context.set_source_pixbuf(icon,x+x_adjust,y-y_adjust)
+ context.set_source_pixbuf(icon.add_alpha (True, '\0', '\0', '\0'), x + x_adjust, y - y_adjust)
                context.fill()
                context.paint()

moonbeam (rcryderman)
Changed in awn-extras:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Silentstorm (silentstorm) wrote :

Thanks for reporting this bug,
I will take a look at it.

Changed in awn-extras:
assignee: nobody → silentstorm
Revision history for this message
Silentstorm (silentstorm) wrote :
  • patch Edit (9.8 KiB, application/octet-stream)

It should be fixed in the following files

(contains stacks_gui_curved.py and stacks_icons.py)

- add alpha channel to the icon when it is loaded
- better adjustment of the x coordinate of the icon when it is smaller than the defined icon size.
- some support for the new configuration settings (not visible yet)

again thx for reporting this bug, and providing the proper solution.

Revision history for this message
moonbeam (rcryderman) wrote :
Changed in awn-extras:
status: Confirmed → Fix Committed
Revision history for this message
Silentstorm (silentstorm) wrote :

patch for the bug introduced with the previous patch ........ (uploaded wrong version)

http://www.mediafire.com/?a9lpmmxh423

Revision history for this message
moonbeam (rcryderman) wrote :
Revision history for this message
Peng Huang (shawn-p-huang) wrote :

What is drawForeground for in stacks_gui_curved.py? Can it be removed?

Revision history for this message
Silentstorm (silentstorm) wrote :

It draws a semi transparent shine above the icon, it won't hurt to disable or remove it.

why?

Revision history for this message
Peng Huang (shawn-p-huang) wrote :

I just can not see any different with or without it in my box. :)

Revision history for this message
Silentstorm (silentstorm) wrote :

It will depend on your screencontrast, but it will be more configurable in the near future

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :
Changed in awn-extras:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.